Class FastaReaderHelper


  • public class FastaReaderHelper
    extends Object
    Author:
    Scooter Willis
    • Constructor Detail

      • FastaReaderHelper

        public FastaReaderHelper()
    • Method Detail

      • readFastaDNASequence

        public static LinkedHashMap<String,​DNASequence> readFastaDNASequence​(File file,
                                                                                   boolean lazySequenceLoad)
                                                                            throws IOException
        Selecting lazySequenceLoad=true will parse the FASTA file and figure out the accessionid and offsets and return sequence objects that can in the future read the sequence from the disk. This allows the loading of large fasta files where you are only interested in one sequence based on accession id.
        Parameters:
        file -
        lazySequenceLoad -
        Returns:
        Throws:
        IOException
      • readFastaRNASequence

        public static LinkedHashMap<String,​RNASequence> readFastaRNASequence​(File file,
                                                                                   boolean lazySequenceLoad)
                                                                            throws IOException
        Selecting lazySequenceLoad=true will parse the FASTA file and figure out the accessionid and offsets and return sequence objects that can in the future read the sequence from the disk. This allows the loading of large fasta files where you are only interested in one sequence based on accession id.
        Parameters:
        file -
        lazySequenceLoad -
        Returns:
        Throws:
        IOException
      • readFastaProteinSequence

        public static LinkedHashMap<String,​ProteinSequence> readFastaProteinSequence​(InputStream inStream)
                                                                                    throws IOException
        Read a fasta file containing amino acids with setup that would handle most cases. User is responsible for closing InputStream because you opened it
        Parameters:
        inStream -
        Returns:
        Throws:
        IOException