public class StockholmFileParser extends Object
Pfam DESCRIPTION OF FIELDS Compulsory fields: ------------------ AC Accession number: Accession number in form PFxxxxx.version or PBxxxxxx. ID Identification: One word name for family. DE Definition: Short description of family. AU Author: Authors of the entry. SE Source of seed: The source suggesting the seed members belong to one family. GA Gathering method: Search threshold to build the full alignment. TC Trusted Cutoff: Lowest sequence score and domain score of match in the full alignment. NC Noise Cutoff: Highest sequence score and domain score of match not in full alignment. TP Type: Type of family -- presently Family, Domain, Motif or Repeat. SQ Sequence: Number of sequences in alignment. // End of alignment. Optional fields: ---------------- DC Database Comment: Comment about database reference. DR Database Reference: Reference to external database. RC Reference Comment: Comment about literature reference. RN Reference Number: Reference Number. RM Reference Medline: Eight digit medline UI number. RT Reference Title: Reference Title. RA Reference Author: Reference Author RL Reference Location: Journal location. PI Previous identifier: Record of all previous ID lines. KW Keywords: Keywords. CC Comment: Comments. NE Pfam accession: Indicates a nested domain. NL Location: Location of nested domains - sequence ID, start and end of insert. WK Wikipedia Reference: Reference to wikipedia. Obsolete fields: ----------- AL Alignment method of seed: The method used to align the seed members. AM Alignment Method: The order ls and fs hits are aligned to the model to build the full align.
Modifier and Type | Field and Description |
---|---|
static int |
INFINITY
indicates reading as much as possible, without limits
|
Constructor and Description |
---|
StockholmFileParser() |
Modifier and Type | Method and Description |
---|---|
StockholmStructure |
parse(InputStream inStream)
parses
InputStream and returns a the first contained alignment in a StockholmStructure object. |
List<StockholmStructure> |
parse(InputStream inStream,
int max)
parses an
InputStream and returns at maximum max objects contained in that file. |
StockholmStructure |
parse(String filename)
Parses a Stockholm file and returns a
StockholmStructure object with its content. |
List<StockholmStructure> |
parse(String filename,
int max)
Parses a Stockholm file and returns a
StockholmStructure object with its content. |
List<StockholmStructure> |
parseNext(int max)
Tries to parse and return as maximum as
max structures in the last used file or input stream. |
public static final int INFINITY
public StockholmFileParser()
public StockholmStructure parse(String filename) throws IOException, ParserException
StockholmStructure
object with its content.parseNext(int)
will throw an exception or will function with
unpredicted behavior.filename
- complete(?) path to the file from where to read the contentIOException
- when an exception occurred while opening/reading/closing the file+ParserException
- if unexpected format is encounteredpublic List<StockholmStructure> parse(String filename, int max) throws IOException, ParserException
StockholmStructure
object with its content.parseNext(int)
.filename
- file from where to read the content. see InputStreamProvider
for more details.max
- maximum number of files to read, INFINITY
for all.StockholmStructure
containing parsed structures.IOException
- when an exception occurred while opening/reading/closing the file.ParserException
- if unexpected format is encounteredparseNext(int)
public StockholmStructure parse(InputStream inStream) throws ParserException, IOException
InputStream
and returns a the first contained alignment in a StockholmStructure
object.
Used mainly for multiple files within the same input stream, (e.g. when reading from Pfam flat files. parseNext(int)
.inStream
- the InputStream
containing the file to read.StockholmStructure
object representing file contents.IOException
ParserException
parseNext(int)
public List<StockholmStructure> parse(InputStream inStream, int max) throws IOException
InputStream
and returns at maximum max
objects contained in that file.parse(InputStream, int)
(same function) or
parseNext(int)
.inStream
- the stream to parsemax
- maximum number of structures to try to parse, INFINITY
to try to obtain as much as possible.List
of StockholmStructure
objects. If there are no more structures, an empty list is
returned.IOException
- in case an I/O Exception occurred.parseNext(int)
public List<StockholmStructure> parseNext(int max) throws IOException
max
structures in the last used file or input stream.parse(InputStream)
, parse(InputStream, int)
, or
parse(String, int)
before calling this function.max
- IOException
Copyright © 2000–2018 BioJava. All rights reserved.