Class FastaReaderHelper
- java.lang.Object
-
- org.biojava.nbio.core.sequence.io.FastaReaderHelper
-
public class FastaReaderHelper extends java.lang.Object
- Author:
- Scooter Willis
-
-
Constructor Summary
Constructors Constructor Description FastaReaderHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
static java.util.LinkedHashMap<java.lang.String,DNASequence>
readFastaDNASequence(java.io.File file)
static java.util.LinkedHashMap<java.lang.String,DNASequence>
readFastaDNASequence(java.io.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 java.util.LinkedHashMap<java.lang.String,DNASequence>
readFastaDNASequence(java.io.InputStream inStream)
Read a fasta DNA sequencestatic java.util.LinkedHashMap<java.lang.String,ProteinSequence>
readFastaProteinSequence(java.io.File file)
Read a fasta file containing amino acids with setup that would handle most cases.static java.util.LinkedHashMap<java.lang.String,ProteinSequence>
readFastaProteinSequence(java.io.InputStream inStream)
Read a fasta file containing amino acids with setup that would handle most cases.static java.util.LinkedHashMap<java.lang.String,RNASequence>
readFastaRNASequence(java.io.File file)
static java.util.LinkedHashMap<java.lang.String,RNASequence>
readFastaRNASequence(java.io.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 java.util.LinkedHashMap<java.lang.String,RNASequence>
readFastaRNASequence(java.io.InputStream inStream)
Read a fasta RNA sequence
-
-
-
Method Detail
-
readFastaDNASequence
public static java.util.LinkedHashMap<java.lang.String,DNASequence> readFastaDNASequence(java.io.File file, boolean lazySequenceLoad) throws java.io.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:
java.io.IOException
-
readFastaRNASequence
public static java.util.LinkedHashMap<java.lang.String,RNASequence> readFastaRNASequence(java.io.File file, boolean lazySequenceLoad) throws java.io.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:
java.io.IOException
-
readFastaProteinSequence
public static java.util.LinkedHashMap<java.lang.String,ProteinSequence> readFastaProteinSequence(java.io.File file) throws java.io.IOException
Read a fasta file containing amino acids with setup that would handle most cases.- Parameters:
file
-- Returns:
- Throws:
java.io.IOException
-
readFastaProteinSequence
public static java.util.LinkedHashMap<java.lang.String,ProteinSequence> readFastaProteinSequence(java.io.InputStream inStream) throws java.io.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:
java.io.IOException
-
readFastaDNASequence
public static java.util.LinkedHashMap<java.lang.String,DNASequence> readFastaDNASequence(java.io.InputStream inStream) throws java.io.IOException
Read a fasta DNA sequence- Parameters:
inStream
-- Returns:
- Throws:
java.io.IOException
-
readFastaDNASequence
public static java.util.LinkedHashMap<java.lang.String,DNASequence> readFastaDNASequence(java.io.File file) throws java.io.IOException
- Parameters:
file
-- Returns:
- Throws:
java.io.IOException
-
readFastaRNASequence
public static java.util.LinkedHashMap<java.lang.String,RNASequence> readFastaRNASequence(java.io.InputStream inStream) throws java.io.IOException
Read a fasta RNA sequence- Parameters:
inStream
-- Returns:
- Throws:
java.io.IOException
-
readFastaRNASequence
public static java.util.LinkedHashMap<java.lang.String,RNASequence> readFastaRNASequence(java.io.File file) throws java.io.IOException
- Parameters:
file
-- Returns:
- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-