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 Details

    • getAccessions

      Collection<String> getAccessions()
      Returns all accessions loaded in the provider.
      Returns:
      all accessions loaded in the provider
    • getDecoyAccessions

      HashSet<String> getDecoyAccessions()
      Returns the decoy accessions.
      Returns:
      the decoy accessions
    • getSequence

      String getSequence​(String proteinAccession)
      Returns the protein sequence for the given accession.
      Parameters:
      proteinAccession - the accession of the protein
      Returns:
      the sequence of the protein
    • getSubsequence

      String getSubsequence​(String accession, int start, int end)
      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 protein
      start - the start index
      end - the end index
      Returns:
      the subsequence as string
    • getHeader

      String getHeader​(String proteinAccession)
      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