|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.bio.seq.RichSequence.IOTools
public static final class RichSequence.IOTools
A set of convenience methods for handling common file formats.
Nested Class Summary | |
---|---|
static class |
RichSequence.IOTools.SingleRichSeqIterator
Used to iterate over a single rich sequence |
Method Summary | |
---|---|
static SymbolTokenization |
getDNAParser()
Creates a DNA symbol tokenizer. |
static SymbolTokenization |
getNucleotideParser()
Creates a nucleotide symbol tokenizer. |
static SymbolTokenization |
getProteinParser()
Creates a protein symbol tokenizer. |
static SymbolTokenization |
getRNAParser()
Creates a RNA symbol tokenizer. |
static RichSequenceIterator |
readEMBL(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a EMBL file using a custom type of SymbolList. |
static RichSequenceIterator |
readEMBLDNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an EMBL-format stream of DNA sequences. |
static RichSequenceIterator |
readEMBLProtein(BufferedReader br,
Namespace ns)
Iterate over the sequences in an EMBL-format stream of Protein sequences. |
static RichSequenceIterator |
readEMBLRNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an EMBL-format stream of RNA sequences. |
static RichSequenceIterator |
readEMBLxml(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a EMBLxml file using a custom type of SymbolList. |
static RichSequenceIterator |
readEMBLxmlDNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an EMBLxml-format stream of DNA sequences. |
static RichSequenceIterator |
readEMBLxmlProtein(BufferedReader br,
Namespace ns)
Iterate over the sequences in an EMBLxml-format stream of Protein sequences. |
static RichSequenceIterator |
readEMBLxmlRNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an EMBLxml-format stream of RNA sequences. |
static RichSequenceIterator |
readFasta(BufferedReader br,
SymbolTokenization sTok,
Namespace ns)
Read a fasta file. |
static RichSequenceIterator |
readFasta(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a fasta file building a custom type of RichSequence . |
static RichSequenceIterator |
readFastaDNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an FASTA-format stream of DNA sequences. |
static RichSequenceIterator |
readFastaProtein(BufferedReader br,
Namespace ns)
Iterate over the sequences in an FASTA-format stream of Protein sequences. |
static RichSequenceIterator |
readFastaRNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an FASTA-format stream of RNA sequences. |
static RichSequenceIterator |
readFile(File file,
Namespace ns)
Guess which format a file is then attempt to read it. |
static RichSequenceIterator |
readFile(File file,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Guess which format a file is then attempt to read it. |
static RichSequenceIterator |
readGenbank(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a GenBank file using a custom type of SymbolList. |
static RichSequenceIterator |
readGenbankDNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an GenBank-format stream of DNA sequences. |
static RichSequenceIterator |
readGenbankProtein(BufferedReader br,
Namespace ns)
Iterate over the sequences in an GenBank-format stream of Protein sequences. |
static RichSequenceIterator |
readGenbankRNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an GenBank-format stream of RNA sequences. |
static RichSequenceIterator |
readINSDseq(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a INSDseq file using a custom type of SymbolList. |
static RichSequenceIterator |
readINSDseqDNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an INSDseq-format stream of DNA sequences. |
static RichSequenceIterator |
readINSDseqProtein(BufferedReader br,
Namespace ns)
Iterate over the sequences in an INSDseq-format stream of Protein sequences. |
static RichSequenceIterator |
readINSDseqRNA(BufferedReader br,
Namespace ns)
Iterate over the sequences in an INSDseq-format stream of RNA sequences. |
static RichSequenceIterator |
readStream(BufferedInputStream stream,
Namespace ns)
Guess which format a stream is then attempt to read it. |
static RichSequenceIterator |
readStream(BufferedInputStream stream,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Guess which format a stream is then attempt to read it. |
static RichSequenceIterator |
readUniProt(BufferedReader br,
Namespace ns)
Iterate over the sequences in an UniProt-format stream of RNA sequences. |
static RichSequenceIterator |
readUniProt(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a UniProt file using a custom type of SymbolList. |
static RichSequenceIterator |
readUniProtXML(BufferedReader br,
Namespace ns)
Iterate over the sequences in an UniProt XML-format stream of RNA sequences. |
static RichSequenceIterator |
readUniProtXML(BufferedReader br,
SymbolTokenization sTok,
RichSequenceBuilderFactory seqFactory,
Namespace ns)
Read a UniProt XML file using a custom type of SymbolList. |
static void |
registerFormat(Class formatClass)
Register a new format with IOTools for auto-guessing. |
static void |
writeEMBL(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes sequences from a SequenceIterator to an OutputStream in
EMBL Format. |
static void |
writeEMBL(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in EMBL format. |
static void |
writeEMBLxml(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes sequences from a SequenceIterator to an OutputStream in
EMBLxml Format. |
static void |
writeEMBLxml(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in EMBLxml format. |
static void |
writeFasta(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes Sequence s from a SequenceIterator to an OutputStream in
Fasta Format. |
static void |
writeFasta(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in Fasta format. |
static void |
writeGenbank(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes sequences from a SequenceIterator to an OutputStream in
GenBank Format. |
static void |
writeGenbank(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in GenBank format. |
static void |
writeINSDseq(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes sequences from a SequenceIterator to an OutputStream in
INSDseq Format. |
static void |
writeINSDseq(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in INSDseq format. |
static void |
writeUniProt(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes sequences from a SequenceIterator to an OutputStream in
UniProt Format. |
static void |
writeUniProt(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in UniProt format. |
static void |
writeUniProtXML(OutputStream os,
SequenceIterator in,
Namespace ns)
Writes sequences from a SequenceIterator to an OutputStream in
UniProt XML Format. |
static void |
writeUniProtXML(OutputStream os,
Sequence seq,
Namespace ns)
Writes a single Sequence to an OutputStream in UniProt XML format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void registerFormat(Class formatClass)
formatClass
- the RichSequenceFormat
object to register.public static RichSequenceIterator readStream(BufferedInputStream stream, RichSequenceBuilderFactory seqFactory, Namespace ns) throws IOException
stream
- the BufferedInputStream
to attempt to read.seqFactory
- a factory used to build a RichSequence
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then
RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the file
IOException
- in case the stream is unrecognisable or problems occur in reading it.public static RichSequenceIterator readStream(BufferedInputStream stream, Namespace ns) throws IOException
stream
- the BufferedInputStream
to attempt to read.ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then
RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the file
IOException
- If the file cannot be read.public static RichSequenceIterator readFile(File file, RichSequenceBuilderFactory seqFactory, Namespace ns) throws IOException
file
- the File
to attempt to read.seqFactory
- a factory used to build a RichSequence
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then
RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the file
IOException
- in case the file is unrecognisable or problems occur in reading it.public static RichSequenceIterator readFile(File file, Namespace ns) throws IOException
file
- the File
to attempt to read.ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then
RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the file
IOException
- If the file cannot be read.public static RichSequenceIterator readFasta(BufferedReader br, SymbolTokenization sTok, Namespace ns)
br
- the BufferedReader to read data fromsTok
- a SymbolTokenization
that understands the sequencesns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then
RichObjectFactory.getDefaultNamespace()
is used.
- Returns:
- a
RichSequenceIterator
over each sequence in the fasta file
public static RichSequenceIterator readFasta(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
RichSequence
.
For example, use RichSequenceBuilderFactory.FACTORY
to emulate readFasta(BufferedReader, SymbolTokenization)
and RichSequenceBuilderFactory.PACKED
to force all symbols
to be encoded using bit-packing.
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a RichSequence
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readFastaDNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readFastaRNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readFastaProtein(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readGenbank(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a SymbolList
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readGenbankDNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readGenbankRNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readGenbankProtein(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readINSDseq(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a SymbolList
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readINSDseqDNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readINSDseqRNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readINSDseqProtein(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLxml(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a SymbolList
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLxmlDNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLxmlRNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLxmlProtein(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBL(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a SymbolList
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLDNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLRNA(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readEMBLProtein(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readUniProt(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a SymbolList
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readUniProt(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readUniProtXML(BufferedReader br, SymbolTokenization sTok, RichSequenceBuilderFactory seqFactory, Namespace ns)
br
- the BufferedReader
to read data fromsTok
- a SymbolTokenization
that understands the sequencesseqFactory
- a factory used to build a SymbolList
ns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static RichSequenceIterator readUniProtXML(BufferedReader br, Namespace ns)
br
- the BufferedReader
to read data fromns
- a Namespace
to load the sequences into. Null implies that it should
use the namespace specified in the file. If no namespace is
specified in the file, then RichObjectFactory.getDefaultNamespace()
is used.
RichSequenceIterator
over each sequence in the fasta filepublic static void writeFasta(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
Sequence
s from a SequenceIterator
to an OutputStream
in
Fasta Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input RichSequence
sns
- a Namespace
to write the RichSequence
s to. Null
implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeFasta(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in Fasta format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeGenbank(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
SequenceIterator
to an OutputStream
in
GenBank Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input Sequencesns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeGenbank(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in GenBank format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeINSDseq(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
SequenceIterator
to an OutputStream
in
INSDseq Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input Sequencesns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeINSDseq(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in INSDseq format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeEMBLxml(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
SequenceIterator
to an OutputStream
in
EMBLxml Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input Sequencesns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeEMBLxml(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in EMBLxml format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeEMBL(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
SequenceIterator
to an OutputStream
in
EMBL Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input Sequencesns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeEMBL(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in EMBL format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeUniProt(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
SequenceIterator
to an OutputStream
in
UniProt Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input Sequencesns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeUniProt(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in UniProt format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeUniProtXML(OutputStream os, SequenceIterator in, Namespace ns) throws IOException
SequenceIterator
to an OutputStream
in
UniProt XML Format. This makes for a useful format filter where a
StreamReader
can be sent to the RichStreamWriter
after formatting.
os
- The stream to write fasta formatted data toin
- The source of input Sequencesns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static void writeUniProtXML(OutputStream os, Sequence seq, Namespace ns) throws IOException
Sequence
to an OutputStream
in UniProt XML format.
os
- the OutputStream
.seq
- the Sequence
.ns
- a Namespace
to write the sequences to. Null implies that it should
use the namespace specified in the individual sequence.
IOException
- if there is an IO problempublic static SymbolTokenization getDNAParser()
SymbolTokenization
for parsing DNA.public static SymbolTokenization getRNAParser()
SymbolTokenization
for parsing RNA.public static SymbolTokenization getNucleotideParser()
SymbolTokenization
for parsing nucleotides.public static SymbolTokenization getProteinParser()
SymbolTokenization
for parsing protein.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |