|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectowltools.gaf.GafDocument
public class GafDocument
Representation of a gene annotation file (GAF). It holds all relevant
GeneAnnotation
and Bioentity
objects.
GafObjectsBuilder
Constructor Summary | |
---|---|
GafDocument(String id,
String documentPath)
Create a new document instance. |
|
GafDocument(String id,
String documentPath,
Map<String,Bioentity> bioentities)
Create a new document instance. |
Method Summary | |
---|---|
Bioentity |
addBioentity(Bioentity bioentity)
Add a Bioentity object to the document. |
void |
addComment(String c)
Add a comment line. |
void |
addGeneAnnotation(GeneAnnotation ga)
Add a single annotation to the document. |
Collection<Bioentity> |
getBioentities()
Get all registered Bioentity objects. |
Bioentity |
getBioentity(String id)
Retrieve the Bioentity object for the given id. |
List<String> |
getComments()
Get the current set of comments. |
String |
getDocumentPath()
Retrieve the source path for this document |
GeneAnnotation |
getGeneAnnotationByLineNumber(int lineNumber)
Retrieve the (first) annotation for the given line number or null. |
List<GeneAnnotation> |
getGeneAnnotations()
Get all annotations from this document. |
Collection<GeneAnnotation> |
getGeneAnnotations(String bioentity)
Get all annotations for a given Bioentity id. |
List<GeneAnnotation> |
getGeneAnnotationsByDirectGoCls(String cls)
Search for all annotations with the given cls String. |
String |
getId()
|
void |
index()
Index all current annotations of this document. |
void |
setGeneAnnotations(List<GeneAnnotation> annotations)
Replace the current set of annotations with the given list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GafDocument(String id, String documentPath)
id
- documentPath
- public GafDocument(String id, String documentPath, Map<String,Bioentity> bioentities)
id
- documentPath
- bioentities
- Method Detail |
---|
public String getId()
public String getDocumentPath()
public Bioentity getBioentity(String id)
Bioentity
object for the given id.
id
-
public Collection<Bioentity> getBioentities()
Bioentity
objects.
public List<GeneAnnotation> getGeneAnnotations()
public Collection<GeneAnnotation> getGeneAnnotations(String bioentity)
Bioentity
id. If index()
was called, this is a lookup operation, otherwise this is a linear scan
of all annotations.
bioentity
-
index()
public void index()
getGeneAnnotations(String)
public List<GeneAnnotation> getGeneAnnotationsByDirectGoCls(String cls)
cls
-
public GeneAnnotation getGeneAnnotationByLineNumber(int lineNumber)
lineNumber
-
public Bioentity addBioentity(Bioentity bioentity)
Bioentity
object to the document. Will return the canonical
instance for the entity in this GAF.
bioentity
-
public void addGeneAnnotation(GeneAnnotation ga)
ga
- public void setGeneAnnotations(List<GeneAnnotation> annotations)
annotations
- public List<String> getComments()
public void addComment(String c)
c
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |