Interface SequenceProvider
- All Known Implementing Classes:
FMIndex
,SingleProteinSequenceProvider
public interface SequenceProvider
Interface for a class able to retrieve the sequence of a given protein.
- Author:
- Marc Vaudel
-
Method Summary
Modifier and Type Method Description Collection<String>
getAccessions()
Returns all accessions loaded in the provider.HashSet<String>
getDecoyAccessions()
Returns the decoy accessions.String
getHeader(String proteinAccession)
Returns the FASTA header of the protein as found in the FASTA file.String
getSequence(String proteinAccession)
Returns the protein sequence for the given accession.String
getSubsequence(String accession, int start, int end)
Returns the subsequence of the sequence of a given protein.
-
Method Details
-
getAccessions
Collection<String> getAccessions()Returns all accessions loaded in the provider.- Returns:
- all accessions loaded in the provider
-
getDecoyAccessions
Returns the decoy accessions.- Returns:
- the decoy accessions
-
getSequence
Returns the protein sequence for the given accession.- Parameters:
proteinAccession
- the accession of the protein- Returns:
- the sequence of the protein
-
getSubsequence
Returns 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.- Parameters:
accession
- the accession of the proteinstart
- the start indexend
- the end index- Returns:
- the subsequence as string
-
getHeader
Returns the FASTA header of the protein as found in the FASTA file.- Parameters:
proteinAccession
- the accession of the protein- Returns:
- the FASTA header of the protein as found in the FASTA file
-