Package org.biojava3.core.sequence.io
Class FastaReaderHelper
java.lang.Object
org.biojava3.core.sequence.io.FastaReaderHelper
- Author:
- Scooter Willis
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static LinkedHashMap<String,
DNASequence> readFastaDNASequence
(File file) static LinkedHashMap<String,
DNASequence> readFastaDNASequence
(File file, boolean lazySequenceLoad) 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.static LinkedHashMap<String,
DNASequence> readFastaDNASequence
(InputStream inStream) Read a fasta DNA sequencestatic LinkedHashMap<String,
ProteinSequence> readFastaProteinSequence
(File file) Read a fasta file containing amino acids with setup that would handle most cases.static LinkedHashMap<String,
ProteinSequence> readFastaProteinSequence
(InputStream inStream) Read a fasta file containing amino acids with setup that would handle most cases.
-
Constructor Details
-
FastaReaderHelper
public FastaReaderHelper()
-
-
Method Details
-
readFastaDNASequence
public static LinkedHashMap<String,DNASequence> readFastaDNASequence(File file, boolean lazySequenceLoad) throws Exception 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:
Exception
-
readFastaProteinSequence
public static LinkedHashMap<String,ProteinSequence> readFastaProteinSequence(File file) throws Exception Read a fasta file containing amino acids with setup that would handle most cases.- Parameters:
file
-- Returns:
- Throws:
Exception
-
readFastaProteinSequence
public static LinkedHashMap<String,ProteinSequence> readFastaProteinSequence(InputStream inStream) throws Exception 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:
Exception
-
readFastaDNASequence
public static LinkedHashMap<String,DNASequence> readFastaDNASequence(InputStream inStream) throws Exception Read a fasta DNA sequence- Parameters:
inStream
-- Returns:
- Throws:
Exception
-
readFastaDNASequence
- Parameters:
file
-- Returns:
- Throws:
Exception
-
main
- Throws:
Exception
-