Package: b2bTools
Bio2Byte ToolsThis package provides you structural predictions for protein sequences made by Bio2Byte group.🧪 About this Python packageThis package, calledb2bTools, offers biophysical feature predictors for protein sequences as well as different file parses and other utilities to help you with your protein data analysis.
If your input data consists on one or more sequences not aligned, we provide you with the Single Sequence mode. On the other hand, if your input is a Multiple Sequence Alignment (MSA), we provide the MSA mode. For NMR data, we have the predictor ShiftCrypt.About the available predictors:PredictorUsageBio.ToolsOnline predictorDynaMineFast predictor of protein backbone dynamics using only sequence information as input. The version here also predicts side-chain dynamics and secondary structure predictors using the same principle.LinkStart predicting online ▶️DisoMinePredicts protein disorder with recurrent neural networks not directly from the amino acid sequence, but instead from more generic predictions of key biophysical properties, here protein dynamics, secondary structure and early folding.LinkStart predicting online ▶️EfoldMinePredicts from the primary amino acid sequence of a protein, which amino acids are likely involved in early folding events.LinkStart predicting online ▶️AgMataSingle-sequence based predictor of protein regions that are likely to cause beta-aggregation.LinkStart predicting online ▶️PSPerPSP (Phase Separating Protein) predicts whether a protein is likely to phase-separate with a particular mechanism involving RNA interacts (FUS-like proteins). It will highlight the regions in your protein that are involved mechanistically, and provide an overall score.LinkStart predicting online ▶️ShiftCryptAuto-encoding NMR chemical shifts from their native vector space to a residue-level biophysical indexLinkStart predicting online ▶️🔗 Related link:These tools are described on the Bio2Byte website inside theTools section.Galaxyis an open source, web-based platform for data intensive biomedical research. There is an available version of the Single Sequence predictors on Galaxy Europe. Start predicting online using Galaxy fromthis link.Usage and examplesTo install the latest version of this package:$pipinstallb2bTools⚠️ Important notes:HmmerandT-Coffeeare required to run several features. Please install them following their official guidelines.Single Sequence predictionsUse this example as an entry point when you have a FASTA file containing one or more sequences. There is a live demo available onGoogle Colab.Predicting biophysical features in JSON formatimportjsonfromb2bToolsimportSingleSeq,constantsinput_fasta="/path/to/example.fasta"single_seq=SingleSeq(input_fasta)# Predict features using 'dynamine', 'disomine', 'efoldmine', 'agmata', 'psper'single_seq.predict(tools=constants.PREDICTOR_NAMES)predictions=single_seq.get_all_predictions()forsequence_id,prediction_valuesinpredictions.items():withopen(f"{input_fasta}_{sequence_id}.json","w")asfp:json.dump(prediction_values,fp,indent=4)Predicting biophysical features in tabular formats (CSV, TSV)importjsonfromb2bToolsimportSingleSeq,constantsinput_fasta="/path/to/example.fasta"single_seq=SingleSeq(input_fasta)# Predict features using 'dynamine', 'disomine', 'efoldmine', 'agmata', 'psper'single_seq.predict(tools=constants.PREDICTOR_NAMES)single_seq.get_all_predictions_tabular(f"{input_fasta}_residues.csv",sep=",")single_seq.get_all_predictions_tabular(f"{input_fasta}_residues.tsv",sep="\t")The output contains these columns:PredictorValueData typeNonesequence_idStringNoneresidueCharNoneresidue_indexIntegerPSPerRRMFloatAgMataagmataFloatPSPerargFloatDynaMinebackboneFloatDynaMinecoilFloatPSPercomplexityFloatDisoMinedisoMineFloatPSPerdisorderFloatEFoldMineearlyFoldingFloatDynaMinehelixFloatDynaMineppIIFloatDynaMinesheetFloatDynaMinesidechainFloatPSPertyrFloatPlotting biophysical featuresIn case you need to plot the prediction values:importjsonfromb2bToolsimportSingleSeq,constantsfrommatplotlibimportpyplotaspltinput_fasta="/path/to/example.fasta"single_seq=SingleSeq(input_fasta)sequence_id="SEQ001"# Predict features using 'dynamine'single_seq.predict(tools=constants.TOOL_DYNAMINE)predictions=single_seq.get_all_predictions()backbone_pred=predictions[sequence_id]['backbone']sidechain_pred=predictions[sequence_id]['sidechain']plt.plot(range(len(backbone_pred)),backbone_pred,label="Backbone")plt.plot(range(len(backbone_pred)),sidechain_pred,label="Sidechain")plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()Extracting metadataFor extracting metadata from the prediction values in tabular format when analyzing Single Sequence input:fromb2bToolsimportSingleSeq,constantsinput_fasta="/path/to/example.fasta"single_seq=SingleSeq(input_fasta)# Predict features using 'dynamine', 'disomine', 'efoldmine', 'agmata', 'psper'single_seq.predict(tools=constants.PREDICTOR_NAMES)predictions=single_seq.get_all_predictions()single_seq.get_metadata(f"{input_fasta}.csv")The output will include these columns:sequence_idlengthExecution times:dynamine_execution_timedisomine_execution_timeefoldmine_execution_timeagmata_execution_timepsper_execution_timeDynaMine:Backbone:backbone_meanbackbone_medianbackbone_variancebackbone_stdevbackbone_pvariancebackbone_pstdevbackbone_minbackbone_maxSide chain:sidechain_meansidechain_mediansidechain_variancesidechain_stdevsidechain_pvariancesidechain_pstdevsidechain_minsidechain_maxppII:ppII_meanppII_medianppII_varianceppII_stdevppII_pvarianceppII_pstdevppII_minppII_maxCoil:coil_meancoil_mediancoil_variancecoil_stdevcoil_pvariancecoil_pstdevcoil_mincoil_maxSheet:sheet_meansheet_mediansheet_variancesheet_stdevsheet_pvariancesheet_pstdevsheet_minsheet_maxHelix:helix_meanhelix_medianhelix_variancehelix_stdevhelix_pvariancehelix_pstdevhelix_minhelix_maxEFoldMine:earlyFolding_meanearlyFolding_medianearlyFolding_varianceearlyFolding_stdevearlyFolding_pvarianceearlyFolding_pstdevearlyFolding_minearlyFolding_maxAgMata:agmata_meanagmata_medianagmata_varianceagmata_stdevagmata_pvarianceagmata_pstdevagmata_minagmata_maxDisoMine:disoMine_meandisoMine_mediandisoMine_variancedisoMine_stdevdisoMine_pvariancedisoMine_pstdevdisoMine_mindisoMine_maxPSPer:Protein Score:protein_scoreComplexity:complexity_meancomplexity_mediancomplexity_variancecomplexity_stdevcomplexity_pvariancecomplexity_pstdevcomplexity_mincomplexity_maxARG:arg_meanarg_medianarg_variancearg_stdevarg_pvariancearg_pstdevarg_minarg_maxTYR:tyr_meantyr_mediantyr_variancetyr_stdevtyr_pvariancetyr_pstdevtyr_mintyr_maxRRM:RRM_meanRRM_medianRRM_varianceRRM_stdevRRM_pvarianceRRM_pstdevRRM_minRRM_maxDisorder:disorder_meandisorder_mediandisorder_variancedisorder_stdevdisorder_pvariancedisorder_pstdevdisorder_mindisorder_maxMultiple Sequences Alignment predictionsUse the following example as an entry point when you have a MSA file input. There is a live demo available on Google Colab:linkPredicting biophysical features in JSON formatimportjsonfromb2bToolsimportMultipleSeq,constantsinput_msa="/path/to/example.afa"multiple_seq=MultipleSeq()multiple_seq.from_aligned_file(input_msa,tools=constants.PREDICTOR_NAMES)predictions=multiple_seq.get_all_predictions_msa()forsequence_id,prediction_valuesinpredictions.items():withopen(f"{input_msa}_{sequence_id}.json","w")asfp:json.dump(prediction_values,fp,indent=4)distributions_dict=multiple_seq.get_all_predictions_msa_distrib()distributions=distributions_dict['results']withopen(f"{input_msa}_distributions.json","w")asfp:json.dump(distributions,fp,indent=4)Predicting biophysical features in tabular formats (CSV, TSV)fromb2bToolsimportMultipleSeq,constantsinput_msa="/path/to/example.afa"multiple_seq=MultipleSeq()multiple_seq.from_aligned_file(input_msa,tools=constants.PREDICTOR_NAMES)multiple_seq.get_all_predictions_tabular(f"{input_msa}_residues.csv",sep=",")multiple_seq.get_all_predictions_tabular(f"{input_msa}_residues.tsv",sep="\t")The output contains these columns:PredictorValueData typeNonesequence_idStringNoneresidueCharNoneresidue_indexIntegerPSPerRRMFloatAgMataagmataFloatPSPerargFloatDynaMinebackboneFloatDynaMinecoilFloatPSPercomplexityFloatDisoMinedisoMineFloatPSPerdisorderFloatEFoldMineearlyFoldingFloatDynaMinehelixFloatDynaMineppIIFloatDynaMinesheetFloatDynaMinesidechainFloatPSPertyrFloatExtracting metadataFor extracting metadata from the prediction values in tabular format when analyzing MSA input:fromb2bToolsimportMultipleSeq,constantsinput_msa="/path/to/example.afa"multiple_seq=MultipleSeq()multiple_seq.from_aligned_file(input_msa,tools=constants.PREDICTOR_NAMES)multiple_seq.get_metadata(f"{input_msa}.csv")💻 InstallationFrom the official documentation:pipis the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes.To install the b2bTools package in your local environment:$pipinstallb2bTools💡 Notes:If you are usingJupyter NotebookorGoogle Colab, install the package directly frompipinside acode blockcell:!pipinstallb2bTools📦  Package content🔍 General ToolsBesides the prediction tools, this package includes general bioinformatics tools useful to manipulate files.📄 Single Sequences files (FASTA format)The classFastaIOprovides the following static methods:read_fasta_from_fileread_fasta_from_stringwrite_fastaUsage:fromb2bTools.general.parsers.fastaimportFastaIO📄 Multiple Sequences Alignments filesThe classAlignmentsIOprovides the following static methods:read_alignmentsread_alignments_fastaread_alignments_A3Mread_alignments_blastread_alignments_balibaseread_alignments_clustalread_alignments_psiread_alignments_phylipread_alignments_stockholmwrite_fasta_from_alignmentwrite_fasta_from_seq_alignment_dictjson_preds_to_csv_singleseqjson_preds_to_csv_msaUsage:fromb2bTools.general.parsers.alignmentsimportAlignmentsIO📄 NEF filesThe classNefIOprovides the following static methods:read_nef_fileread_nef_file_sequence_shiftsUsage:fromb2bTools.general.parsers.alignmentsimportAlignmentsIO📄 NMR-STAR filesThe classNMRStarIOprovides the following static methods:read_nmr_star_projectread_nmr_star_sequence_shiftsUsage:fromb2bTools.general.parsers.nmr_starimportNMRStarIO🔍 Biophysical features predictorsGiven a predictor might be built on top of other, it is usual to get more output predictions than the expected:PredictorDepends onDynamine-EfoldMineDynamineDisomineEfoldMine, DynamineAgMataEfoldMine, DynamineThese are all the available options to use inside the tools array parameter:Predictorconstant valueliteral valueDynamineconstants.TOOL_DYNAMINE"dynamine"EfoldMineconstants.TOOL_EFOLDMINE"efoldmine"Disomineconstants.TOOL_DISOMINE"disomine"AgMataconstants.TOOL_AGMATA"agmata"PSPerconstants.TOOL_PSP"psper"The next table shows all the available predictor values by predictor:PredictorOutput keyOutput values (type)Dynamine"backbone"[Float]Dynamine"sidechain"[Float]Dynamine"helix"[Float]Dynamine"ppII"[Float]Dynamine"coil"[Float]Dynamine"sheet"[Float]EfoldMine"earlyFolding"[Float]Disomine"disoMine"[Float]AgMata"agmata"[Float]PSPer"viterbi"[Float]PSPer"complexity"[Float]PSPer"tyr"[Float]PSPer"arg"[Float]PSPer"RRM"[Float]PSPer"disorder"[Float]For MSA input files, the distribution dictionary and/or JSON will include:multiple_seq.get_all_predictions_msa_distrib()['results']PredictorOutput keyOutput values (type)Dynamine"backbone"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']Dynamine"sidechain"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']Dynamine"helix"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']Dynamine"ppII"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']Dynamine"coil"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']Dynamine"sheet"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']EfoldMine"earlyFolding"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']Disomine"disoMine"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']AgMata"agmata"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']PSPer"viterbi"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']PSPer"complexity"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']PSPer"tyr"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']PSPer"arg"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']PSPer"RRM"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']PSPer"disorder"['median', 'thirdQuartile', 'firstQuartile', 'topOutlier', 'bottomOutlier']The methodget_all_predictionswill return a dictionary with the following structure:{"SEQUENCE_ID_000":{"seq":"the input sequence 0","result001":[0.001,0.002,...,0.00],"result002":[0.001,0.002,...,0.00],"...":[...],"resultN":[0.001,0.002,...,0.00]},"SEQUENCE_ID_001":{"seq":"the input sequence 1","result001":[0.001,0.002,...,0.00],"result002":[0.001,0.002,...,0.00],"...":[...],"resultN":[0.001,0.002,...,0.00]},"...":{...},"SEQUENCE_ID_N":{"seq":"the input sequence N","result001":[0.001,0.002,...,0.00],"result002":[0.001,0.002,...,0.00],"...":[...],"resultN":[0.001,0.002,...,0.00]},}You are ready to use the sequence and predictions to work with them. Here is an example of plotting the data.backbone_pred=predictions['SEQ001']['backbone']sidechain_pred=predictions['SEQ001']['sidechain']plt.plot(range(len(backbone_pred)),backbone_pred,label="Backbone")plt.plot(range(len(sidechain_pred)),sidechain_pred,label="Sidechain")plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()Running as Python module (no Python code involved)You are able to use this package directly from your console session with no Python code involved. Further details available onthe official Python documentation siteusage: b2bTools [-h] [-v] -i INPUT_FILE -o OUTPUT_JSON_FILE[-t OUTPUT_TABULAR_FILE] [-m METADATA_FILE][-dj DISTRIBUTION_JSON_FILE] [-dt DISTRIBUTION_TABULAR_FILE][-s {comma,tab}] [--short_ids] [--mode {single_seq,msa}][--dynamine] [--disomine] [--efoldmine] [--agmata] [--psper]Bio2Byte Tool - Command Line Interfaceoptional arguments:-h, --help            show this help message and exit-v, --version         show program's version number and exit-i INPUT_FILE, --input_file INPUT_FILEFile to process-o OUTPUT_JSON_FILE, --output_json_file OUTPUT_JSON_FILEPath to JSON output file-t OUTPUT_TABULAR_FILE, --output_tabular_file OUTPUT_TABULAR_FILEPath to tabular output file-m METADATA_FILE, --metadata_file METADATA_FILEPath to tabular metadata file-dj DISTRIBUTION_JSON_FILE, --distribution_json_file DISTRIBUTION_JSON_FILEPath to distribution output JSON file-dt DISTRIBUTION_TABULAR_FILE, --distribution_tabular_file DISTRIBUTION_TABULAR_FILEPath to distribution output JSON file-s {comma,tab}, --sep {comma,tab}Tabular separator--short_ids           Trim sequence ids (up to 20 chars per seq)--mode {single_seq,msa}Execution mode: Single Sequence or MSA Analysis--dynamine            Run DynaMine predictor--disomine            Run DisoMine predictor--efoldmine           Run EFoldMine predictor--agmata              Run AgMata predictor--psper               Run PSPer predictorTo display the help sectionb2bTools --helpTo visualize the versionb2bTools --versionExample for Single SequencePlease run this command to get all the predictions from your input FASTA file:b2bTools \--input_file /path/to/input/example_toy.fasta \--output_json_file /path/to/output/example_toy.json \--output_tabular_file /path/to/output/example_toy.csv \--metadata_file /path/to/output/example_toy.meta.csvExpected output:2023-07-04 16:04:23,630 [b2bTools v3.0.6 INFO] Arguments parsed with success2023-07-04 16:04:23,630 [b2bTools v3.0.6 INFO] Reading sequences from: /path/to/input/example_toy.fasta2023-07-04 16:04:23,630 [b2bTools v3.0.6 INFO] Tools to execute: ['dynamine']2023-07-04 16:04:23,630 [b2bTools v3.0.6 INFO] Predicting sequence(s)...2023-07-04 16:04:23,986 [b2bTools v3.0.6 INFO] Saving results in JSON format in: /path/to/output/example_toy.json2023-07-04 16:04:24,006 [b2bTools v3.0.6 INFO] Saving results in tabular format in: /path/to/output/example_toy.csv2023-07-04 16:04:24,040 [b2bTools v3.0.6 INFO] Saving metadata in tabular format in: /path/to/output/example_toy.meta.csv2023-07-04 16:04:24,279 [b2bTools v3.0.6 INFO] Execution finished with successOtherwise, if you need to extract only one sequence from the input file:b2bTools \--sequence_id Q647G9 \--input_file /path/to/input/example_toy.fasta \--output_json_file /path/to/output/example_toy.json \--output_tabular_file /path/to/output/example_toy.csv \--metadata_file /path/to/output/example_toy.meta.csv2023-07-04 16:25:35,486 [b2bTools v3.0.6 INFO] Arguments parsed with success2023-07-04 16:25:35,486 [b2bTools v3.0.6 INFO] Reading sequences from: /path/to/input/example_toy.fasta2023-07-04 16:25:35,486 [b2bTools v3.0.6 INFO] Sequence to filter: Q647G92023-07-04 16:25:35,486 [b2bTools v3.0.6 INFO] Tools to execute: ['dynamine']2023-07-04 16:25:35,486 [b2bTools v3.0.6 INFO] Predicting sequence(s)...2023-07-04 16:25:35,842 [b2bTools v3.0.6 INFO] Saving results for Q647G9 in JSON format in: /path/to/output/example_toy.json2023-07-04 16:25:35,845 [b2bTools v3.0.6 INFO] Saving results for Q647G9 in tabular format in: /path/to/output/example_toy.csv2023-07-04 16:25:35,860 [b2bTools v3.0.6 INFO] Saving metadata for Q647G9 in tabular format in: /path/to/output/example_toy.meta.csv2023-07-04 16:25:35,893 [b2bTools v3.0.6 INFO] Execution finished with successExample for MSAPlease run this command to get all the predictions from your input MSA file:b2bTools \--mode msa \--input_file /path/to/input/small_alignment.clustal \--output_json_file /path/to/output/small_alignment.clustal.json \--output_tabular_file /path/to/output/small_alignment.clustal.csv \--metadata_file /path/to/output/small_alignment.clustal.meta.csv \--distribution_json_file /path/to/output/small_alignment.clustal.distrib.json \--distribution_tabular_file /path/to/output/small_alignment.clustal.distrib.csvExpected output:2023-07-04 16:06:40,524 [b2bTools v3.0.6 INFO] Arguments parsed with success2023-07-04 16:06:40,524 [b2bTools v3.0.6 INFO] Reading sequences from: /path/to/input/small_alignment.clustal2023-07-04 16:06:40,524 [b2bTools v3.0.6 INFO] Tools to execute: ['dynamine']2023-07-04 16:06:40,524 [b2bTools v3.0.6 INFO] Predicting sequence(s)...2023-07-04 16:06:40,749 [b2bTools v3.0.6 INFO] Saving results in JSON format in: /path/to/output/small_alignment.clustal.json2023-07-04 16:06:40,751 [b2bTools v3.0.6 INFO] Saving distributions in JSON format in: /path/to/output/small_alignment.clustal.distrib.json2023-07-04 16:06:40,760 [b2bTools v3.0.6 INFO] Saving distributions in tabular format in: /path/to/output/small_alignment.clustal.distrib.csv2023-07-04 16:06:40,784 [b2bTools v3.0.6 INFO] Saving results in tabular format in: /path/to/output/small_alignment.clustal.csv2023-07-04 16:06:40,788 [b2bTools v3.0.6 INFO] Saving metadata in tabular format in: /path/to/output/small_alignment.clustal.meta.csv2023-07-04 16:06:40,807 [b2bTools v3.0.6 INFO] Execution finished with successOtherwise, if you need to extract only one sequence from the input file:b2bTools \--mode msa \--sequence_id SEQ_1--input_file /path/to/input/small_alignment.clustal \--output_json_file /path/to/output/small_alignment.clustal.json \--output_tabular_file /path/to/output/small_alignment.clustal.csv \--metadata_file /path/to/output/small_alignment.clustal.meta.csv \--distribution_json_file /path/to/output/small_alignment.clustal.distrib.json \--distribution_tabular_file /path/to/output/small_alignment.clustal.distrib.csv2023-07-04 16:28:34,388 [b2bTools v3.0.6 INFO] Arguments parsed with success2023-07-04 16:28:34,388 [b2bTools v3.0.6 INFO] Reading sequences from: /path/to/input/small_alignment.clustal2023-07-04 16:28:34,388 [b2bTools v3.0.6 INFO] Sequence to filter: SEQ_12023-07-04 16:28:34,388 [b2bTools v3.0.6 INFO] Tools to execute: ['dynamine']2023-07-04 16:28:34,388 [b2bTools v3.0.6 INFO] Predicting sequence(s)...2023-07-04 16:28:34,602 [b2bTools v3.0.6 INFO] Saving results for SEQ_1 in JSON format in: /path/to/output/small_alignment.clustal.json2023-07-04 16:28:34,603 [b2bTools v3.0.6 INFO] Saving distributions in JSON format in: /path/to/output/small_alignment.clustal.distrib.json2023-07-04 16:28:34,612 [b2bTools v3.0.6 INFO] Saving distributions in tabular format in: /path/to/output/small_alignment.clustal.distrib.csv2023-07-04 16:28:34,632 [b2bTools v3.0.6 INFO] Saving results for SEQ_1 in tabular format in: /path/to/output/small_alignment.clustal.csv2023-07-04 16:28:34,635 [b2bTools v3.0.6 INFO] Saving metadata for SEQ_1 in tabular format in: /path/to/output/small_alignment.clustal.meta.csv2023-07-04 16:28:34,651 [b2bTools v3.0.6 INFO] Execution finished with successFrom an aligned fileimportmatplotlib.pyplotaspltfromb2bToolsimportMultipleSeqmultiple_seq=MultipleSeq()multiple_seq.from_aligned_file("/path/to/example.fasta")predictions=multiple_seq.get_all_predictions_msa("SEQ001")backbone_pred=predictions['backbone']sidechain_pred=predictions['sidechain']plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()From two MSA filesimportmatplotlib.pyplotaspltfromb2bToolsimportMultipleSeqmultiple_seq=MultipleSeq()multiple_seq.from_two_msa("/path/to/example_a.fasta","/path/to/example_b.fasta")predictions=multiple_seq.get_all_predictions_msa("SEQ001")backbone_pred=predictions['backbone']sidechain_pred=predictions['sidechain']plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()From a JSON with variations fileIn this case, we support a JSON format to introduce variants in a sequence. For instance:{"metadata":{"name":"target_fasta_file"},"WT":"MAKSTILALLALVLVAHASAMRRERGRQGDSSSCERQVDRVNLKPCEQHIMQRIMGEQEQYDSYDIRSTRSSDQQQRCCDELNEMENTQRCMCEALQQIMENQCDRLQDRQMVQQFKRELMNLPQQCNFRAPQRCDLDVSGGRC","Variants":{"Var1":["A3S","A11G"],"Var2":["A2G","K3_S4insPH","T5del"]}}Where WT is the wild-type sequence, and the Variants key includes a dictionary of different variations. Each of them are handled by an array of replacements:(For example: Replace the A at the position 3 with a S would be"A3S")Regarding the input fasta file, themetadatakey contains the name of the input, remember it should stored in the same directory than the json file.The code snippet is:importmatplotlib.pyplotaspltfromb2bToolsimportMultipleSeqmultiple_seq=MultipleSeq()multiple_seq.from_json("/path/to/example.json")predictions=multiple_seq.get_all_predictions_msa("SEQ001")backbone_pred=predictions['backbone']sidechain_pred=predictions['sidechain']plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()From a sequence performing a BLAST before running the predictionsIn case you want to perform a mutation of a residue at one specific position, you have the parametersmut_position,mut_residueand the value ofmut_optionmust be"y".importmatplotlib.pyplotaspltfromb2bToolsimportMultipleSeqmultiple_seq=MultipleSeq()multiple_seq.from_blast("path/to/example.fasta",mut_option="y",mut_position=1,mut_residue="A")predictions=multiple_seq.get_all_predictions_msa("SEQ001")backbone_pred=predictions['backbone']sidechain_pred=predictions['sidechain']plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()From an UniRef ID performing a BLAST before running the predictionsimportmatplotlib.pyplotaspltfromb2bToolsimportMultipleSeqmultiple_seq=MultipleSeq()multiple_seq.from_uniref("A2R2V4")predictions=multiple_seq.get_all_predictions_msa("SEQ001")backbone_pred=predictions['backbone']sidechain_pred=predictions['sidechain']plt.legend()plt.xlabel('aa_position')plt.ylabel('pred_values')plt.show()⚠️ Note: the query using the UniRef ID was limited to 25 results to increase the time performance.🔍 ShiftCrypt predictor (NMR data)importjsonfromb2bTools.nmr.shiftCrypt.PredictorimportShiftCryptfromb2bTools.nmr.shiftCrypt.shiftcrypt_pkgimportshiftcrypt_parserasparsershiftcrypt_instance=ShiftCrypt()path_to_input='/path/to/example.nef'allProteinShifts=parser.parse_official(path_to_input)result_list=shiftcrypt_instance.predictShifts(allProteinShifts,modelClass='1')withopen(f"{path_to_input}.json","w")asfp:json.dump(result_list,fp,indent=4)Regarding themodelClassparameter of methodpredictShifts:modelClass='1': the method with the full set of Cs. this may retur a lot of -10 (missing values) because of the scarcity of cs data for some residuesmodelClass='2': the method with just the most common Cs valuesmodelClass='3': the method with only N and H CS. Used for dimersThe next table shows all the available predictor values fromshiftcrypt_instance.predictShifts. Please remind that the returning value is a list of dictionaries with these values:PredictorOutput keyOutput values (type)ShiftCrypt"ID_file"StringShiftCrypt"sequence"[Char]ShiftCrypt"seqCodes"[Integer]ShiftCrypt"shiftCrypt"[Float]ShiftCrypt"chainCode"String📚 Documentation: classes & methodsIf you are interested in further details, please read the full documentation onthe Bio2Byte website.To generate locally the documentation you can follow the next steps described in this section.Download the source code of the Bio2Byte Tools in your local environment:$gitclonegit@bitbucket.org:bio2byte/b2btools.git&&cdb2btoolsRun the following command:$makegenerate-docsAnd then open folder./wrapped_documentation💡 Notes:At any moment, you can read the docs of a method invoking the__doc__method (e.g.print(SingleSeq.predict.__doc__)).📖 How to citeIf you use this package or data in this package, please cite:PredictorAuthorsCiteDigital Object Identifier (DOI)DynamineElisa Cilia, Rita Pancsa, Peter Tompa, Tom Lenaerts, and Wim VrankenElisa Cilia, Rita Pancsa, Peter Tompa, Tom Lenaerts, and Wim Vranken.From protein sequence to dynamics and disorder with DynaMineNature Communications 4:2741 (2013)https://www.nature.com/articles/ncomms3741DisomineGabriele Orlando, Daniele Raimondi, Francesco Codice, Francesco Tabaro, Wim VrankenGabriele Orlando, Daniele Raimondi, Francesco Codice, Francesco Tabaro, Wim Vranken.Prediction of disordered regions in proteins with recurrent Neural Networks and protein dynamics.bioRxiv 2020.05.25.115253 (2020)https://www.biorxiv.org/content/10.1101/2020.05.25.115253v1EfoldMineRaimondi, D., Orlando, G., Pancsa, R. et alRaimondi, D., Orlando, G., Pancsa, R. et al.Exploring the Sequence-based Prediction of Folding Initiation Sites in Proteins.Sci Rep 7, 8826 (2017)https://doi.org/10.1038/s41598-017-08366-3AgMataGabriele Orlando, Alexandra Silva, Sandra Macedo-Ribeiro, Daniele Raimondi, Wim VrankenGabriele Orlando, Alexandra Silva, Sandra Macedo-Ribeiro, Daniele Raimondi, Wim Vranken.Accurate prediction of protein beta-aggregation with generalized statistical potentialsBioinformatics , Volume 36, Issue 7, 1 April 2020, Pages 2076–2081 (2020)https://academic.oup.com/bioinformatics/article/36/7/2076/5670527PSPerGabriele Orlando,  Daniele Raimondi,  Francesco Tabaro,  Francesco Codicè,  Yves Moreau, Wim F VrankenGabriele Orlando and others, Computational identification of prion-like RNA-binding proteins that form liquid phase-separated condensates,Bioinformatics, Volume 35, Issue 22, November 2019, Pages 4617–4623https://doi.org/10.1093/bioinformatics/btz274ShiftCryptGabriele Orlando,  Daniele Raimondi,  Luciano Porto Kagami,  Wim F VrankenGabriele Orlando and others. ShiftCrypt: a web server to understand and biophysically align proteins through their NMR chemical shift values,Nucleic Acids Research, Volume 48, Issue W1, 02 July 2020, Pages W36–W40https://doi.org/10.1093/nar/gkaa391📝 Terms of useThe Bio2Byte group aims to promote open science by providing freely available online services, database and software relating to the life sciences, with focus on proteins. Where we present scientific data generated by others we impose no additional restriction on the use of the contributed data than those provided by the data owner.The Bio2Byte group expects attribution (e.g. in publications, services or products) for any of its online services, databases or software in accordance with good scientific practice. The expected attribution will be indicated in 'How to cite' sections (or equivalent).The Bio2Byte group is not liable to you or third parties claiming through you, for any loss or damage.Any questions or comments concerning these Terms of Use can be addressed toWim Vranken.© Wim Vranken, Bio2Byte group, VUB, Belgiumhttps://bio2byte.be/