|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sbc.orthoxml.io.OrthoXMLReader
public class OrthoXMLReader
Parser for OrthoXML(http://orthoXML.org). Supports OrthoXML versions 0.1 to
0.3. Global definitions are read into memory at construction time. Groups are
read in a streaming fashion using the the next()
method. It is possible to
set a species filter in this case only groups contains containing genes from
the given species are parsed. Filtering preserve the topology of the
groups/trees but empty branches and groups containing genes from less then
two species are removed.
OrthoXMLReader reader = new OrthoXMLReader(new File("myFile.orthoXML"));
Group group;
while( (group = reader.next()) != null)
{
group.getGeneMembers();
}
Constructor Summary | |
---|---|
OrthoXMLReader(java.io.File orthoXMLFile)
Creates an OrthoXMLReader that reads OrthoXML from the given file. |
|
OrthoXMLReader(java.io.File orthoXMLFile,
java.util.List<java.lang.Integer> taxonomyIds)
Creates an OrthoXMLReader that reads OrthoXML from the given file. |
|
OrthoXMLReader(java.io.Reader orthoXMLStream)
Creates an OrthoXMLReader that reads OrthoXML from the given stream. |
|
OrthoXMLReader(java.io.Reader orthoXMLStream,
java.util.List<java.lang.Integer> taxonomyIds)
Creates an OrthoXMLReader that reads OrthoXML from the given stream. |
Method Summary | |
---|---|
java.lang.String |
getOrigin()
Returns the origin of the OrthoXML. |
java.lang.String |
getOriginVersion()
Returns the version of the OrthoXML origin. |
java.util.Map<java.lang.String,ScoreDefinition> |
getScoreDefinitions()
Returns a Map with scores defined in the OrthoXML file. |
java.util.List<Species> |
getSpecies()
Returns a list of the species defined in the OrthoXML file. |
java.lang.Double |
getVersion()
The OrthoXML version. |
Group |
next()
Returns the next group top level ortholog group from the OrthoXML file/stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrthoXMLReader(java.io.Reader orthoXMLStream) throws javax.xml.stream.XMLStreamException, javax.management.modelmbean.XMLParseException
orthoXMLStream
- the stream to read from.
javax.xml.stream.XMLStreamException
javax.management.modelmbean.XMLParseException
public OrthoXMLReader(java.io.Reader orthoXMLStream, java.util.List<java.lang.Integer> taxonomyIds) throws javax.xml.stream.XMLStreamException, javax.management.modelmbean.XMLParseException
next()
for more details.
orthoXMLStream
- the stream to read from.taxonomyIds
- list of NCBI taxonomy identifier to filter for.
javax.xml.stream.XMLStreamException
javax.management.modelmbean.XMLParseException
public OrthoXMLReader(java.io.File orthoXMLFile, java.util.List<java.lang.Integer> taxonomyIds) throws java.io.FileNotFoundException, javax.xml.stream.XMLStreamException, javax.management.modelmbean.XMLParseException
next()
for more details.
orthoXMLFile
- the orthoXML file to read from.taxonomyIds
- list of NCBI taxonomy identifier to filter for.
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException
javax.management.modelmbean.XMLParseException
public OrthoXMLReader(java.io.File orthoXMLFile) throws java.io.FileNotFoundException, javax.xml.stream.XMLStreamException, javax.management.modelmbean.XMLParseException
orthoXMLFile
- the orthoXML file to read from.
java.io.FileNotFoundException
javax.xml.stream.XMLStreamException
javax.management.modelmbean.XMLParseException
Method Detail |
---|
public java.util.List<Species> getSpecies()
public java.util.Map<java.lang.String,ScoreDefinition> getScoreDefinitions()
ScoreDefinition
public java.lang.String getOrigin()
public java.lang.Double getVersion()
public java.lang.String getOriginVersion()
public Group next() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |