Package org.helm.notation2.tools
Class FastaFormat
java.lang.Object
org.helm.notation2.tools.FastaFormat
public final class FastaFormat extends Object
FastaFormat, class to convert FastaFiles to HELMNotation and vice versa
- Author:
- hecht
-
Method Summary
Modifier and Type Method Description static org.helm.notation2.parser.notation.HELM2NotationconvertIntoAnalogSequence(org.helm.notation2.parser.notation.HELM2Notation helm2Notation)method to convert all Peptides and RNAs into the natural analogue sequence and generates HELM2Notationprotected static org.helm.notation2.parser.notation.polymer.PolymerListElementsgenerateElementsforRNA(String sequence, org.helm.notation2.parser.notation.polymer.HELMEntity entity)method to fill a rna polymer with its elements (MonomerNotationUnits)protected static org.helm.notation2.parser.notation.polymer.PolymerListElementsgenerateElementsOfPeptide(String sequence, org.helm.notation2.parser.notation.polymer.HELMEntity entity)method to fill a peptide polymer with its elements (MonomerNotationUnits)static StringgenerateFasta(org.helm.notation2.parser.notation.HELM2Notation helm2Notation2)method to generate for the whole HELM2Notation fasta-files, it contains fasta for all rna and peptidesprotected static StringgenerateFastaFromPeptide(List<Monomer> monomers)method to generate Fasta for a list of peptide monomersstatic StringgenerateFastaFromPeptidePolymer(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)method to generate Fasta for peptide polymersprotected static StringgenerateFastaFromRNA(List<Monomer> monomers)method to generate Fasta for a list of rna monomersstatic StringgenerateFastaFromRNAPolymer(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers)method to generate Fasta for rna polymersstatic org.helm.notation2.parser.notation.HELM2NotationgeneratePeptidePolymersFromFASTAFormatHELM1(String fasta)method to read the information from a FastaFile-Format + generate peptide polymers, be careful, it produces only polymers in the HELM1 standard, no ambiguitystatic org.helm.notation2.parser.notation.HELM2NotationgenerateRNAPolymersFromFastaFormatHELM1(String fasta)method to read the information from a FastaFile-Format + generate RNA Polymers be careful, it produces only polymers in the HELM1 standard, no ambiguitystatic booleanisNormalDirection(String sequence)method to check if the sequence is in normal direction 5' to 3'
-
Method Details
-
generatePeptidePolymersFromFASTAFormatHELM1
public static org.helm.notation2.parser.notation.HELM2Notation generatePeptidePolymersFromFASTAFormatHELM1(String fasta) throws FastaFormatException, ChemistryExceptionmethod to read the information from a FastaFile-Format + generate peptide polymers, be careful, it produces only polymers in the HELM1 standard, no ambiguity- Parameters:
fasta- FastaFile in string format- Returns:
- HELM2Notation generated HELM2Notation
- Throws:
FastaFormatException- if the input is not correctChemistryException- if chemistry engine can not be initialized
-
generateRNAPolymersFromFastaFormatHELM1
public static org.helm.notation2.parser.notation.HELM2Notation generateRNAPolymersFromFastaFormatHELM1(String fasta) throws FastaFormatException, org.helm.notation2.parser.exceptionparser.NotationException, ChemistryException, NucleotideLoadingExceptionmethod to read the information from a FastaFile-Format + generate RNA Polymers be careful, it produces only polymers in the HELM1 standard, no ambiguity- Parameters:
fasta- FastaFile in string format- Returns:
- HELM2Notation generated HELM2Notation
- Throws:
FastaFormatException- if the input is not correctorg.helm.notation2.parser.exceptionparser.NotationException- if notation is not validChemistryException- if chemistry engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
generateElementsOfPeptide
protected static org.helm.notation2.parser.notation.polymer.PolymerListElements generateElementsOfPeptide(String sequence, org.helm.notation2.parser.notation.polymer.HELMEntity entity) throws FastaFormatException, ChemistryExceptionmethod to fill a peptide polymer with its elements (MonomerNotationUnits)- Parameters:
sequence- peptide sequenceentity- HELMEntity- Returns:
- PolymerListElements
- Throws:
FastaFormatException- if the input sequence is not correctChemistryException- if chemistry engine can not be initialized
-
generateElementsforRNA
protected static org.helm.notation2.parser.notation.polymer.PolymerListElements generateElementsforRNA(String sequence, org.helm.notation2.parser.notation.polymer.HELMEntity entity) throws FastaFormatException, org.helm.notation2.parser.exceptionparser.NotationException, ChemistryException, NucleotideLoadingExceptionmethod to fill a rna polymer with its elements (MonomerNotationUnits)- Parameters:
sequence- rna sequenceentity- HELMEntity- Returns:
- PolymerListElements
- Throws:
FastaFormatException- if the input sequence is not correctorg.helm.notation2.parser.exceptionparser.NotationException- if notation is not validChemistryException- if chemistry engine can not be initializedNucleotideLoadingException- if nucleotides can not be loaded
-
generateFastaFromPeptidePolymer
public static String generateFastaFromPeptidePolymer(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers) throws FastaFormatException, ChemistryExceptionmethod to generate Fasta for peptide polymers- Parameters:
polymers- List of peptide PolymerNotation- Returns:
- generated FASTA
- Throws:
FastaFormatException- if the peptides can not be transformed to FASTAChemistryException- if the Chemistry Engine can not be initialized
-
generateFastaFromPeptide
method to generate Fasta for a list of peptide monomers- Parameters:
monomers- peptide monomers- Returns:
- Fasta sequence
-
generateFastaFromRNAPolymer
public static String generateFastaFromRNAPolymer(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers) throws FastaFormatException, ChemistryExceptionmethod to generate Fasta for rna polymers- Parameters:
polymers- list of rna PolymerNotation- Returns:
- Fasta
- Throws:
FastaFormatException- if the polymers can not be transformed into FASTAChemistryException- if the Chemistry Engine can not be initialized
-
generateFastaFromRNA
method to generate Fasta for a list of rna monomers- Parameters:
monomers- list of monomers- Returns:
- sequence
-
generateFasta
public static String generateFasta(org.helm.notation2.parser.notation.HELM2Notation helm2Notation2) throws FastaFormatException, ChemistryExceptionmethod to generate for the whole HELM2Notation fasta-files, it contains fasta for all rna and peptides- Parameters:
helm2Notation2- HELM2Notation- Returns:
- FASTA-File-Format
- Throws:
FastaFormatException- if the HELM2Notation can not be transformed to FASTAChemistryException- if the Chemistry Engine can not be initialized
-
convertIntoAnalogSequence
public static org.helm.notation2.parser.notation.HELM2Notation convertIntoAnalogSequence(org.helm.notation2.parser.notation.HELM2Notation helm2Notation) throws FastaFormatException, AnalogSequenceException, ChemistryException, org.helm.chemtoolkit.CTKExceptionmethod to convert all Peptides and RNAs into the natural analogue sequence and generates HELM2Notation- Parameters:
helm2Notation-HELM2Notation- Returns:
- analog helm2notation
- Throws:
FastaFormatException- if it can not be converted to analog sequenceAnalogSequenceException- if the natural analogue sequence can not be producedChemistryException- if chemistry engine can not be initializedorg.helm.chemtoolkit.CTKException- general ChemToolKit exception passed to HELMToolKit
-
isNormalDirection
method to check if the sequence is in normal direction 5' to 3'- Parameters:
sequence- rna sequence- Returns:
- true, if the sequence is in normal direction, false otherwise
-