Class SingleProteinSequenceProvider
java.lang.Object
com.compomics.util.experiment.identification.protein_sequences.SingleProteinSequenceProvider
- All Implemented Interfaces:
SequenceProvider
Sequence provider for a single protein.
- Author:
- Marc Vaudel
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructor.SingleProteinSequenceProvider(Protein protein) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns all accessions loaded in the provider.Returns the decoy accessions.getHeaderAsString(String proteinAccession) Returns the FASTA header of the protein as found in the FASTA file.getSequence(String proteinAccession) Returns the protein sequence for the given accession.getSubsequence(String accession, int start, int end) Returns the subsequence of the sequence of a given protein.
-
Constructor Details
-
SingleProteinSequenceProvider
public SingleProteinSequenceProvider()Empty default constructor. -
SingleProteinSequenceProvider
Constructor.- Parameters:
protein- the protein
-
-
Method Details
-
getAccessions
Description copied from interface:SequenceProviderReturns all accessions loaded in the provider.- Specified by:
getAccessionsin interfaceSequenceProvider- Returns:
- all accessions loaded in the provider
-
getDecoyAccessions
Description copied from interface:SequenceProviderReturns the decoy accessions.- Specified by:
getDecoyAccessionsin interfaceSequenceProvider- Returns:
- the decoy accessions
-
getSequence
Description copied from interface:SequenceProviderReturns the protein sequence for the given accession.- Specified by:
getSequencein interfaceSequenceProvider- Parameters:
proteinAccession- the accession of the protein- Returns:
- the sequence of the protein
-
getSubsequence
Description copied from interface:SequenceProviderReturns the subsequence of the sequence of a given protein. Indexes are 0-based like for strings and no exception is thrown if indexes are out of bounds, the substring is trimmed.- Specified by:
getSubsequencein interfaceSequenceProvider- Parameters:
accession- the accession of the proteinstart- the start indexend- the end index- Returns:
- the subsequence as string
-
getHeaderAsString
Description copied from interface:SequenceProviderReturns the FASTA header of the protein as found in the FASTA file.- Specified by:
getHeaderAsStringin interfaceSequenceProvider- Parameters:
proteinAccession- the accession of the protein- Returns:
- the FASTA header of the protein as found in the FASTA file
-