|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.program.gff.SimpleGFFRecord
A no-frills implementation of a GFFRecord.
Field Summary |
Fields inherited from interface org.biojava.bio.program.gff.GFFRecord |
NO_FRAME, NO_SCORE |
Constructor Summary | |
SimpleGFFRecord()
Create a new SimpleGFFRecord with values set to null or zero |
|
SimpleGFFRecord(GFFRecord rec)
Create a new SimpleGFFRecord from GFFRecord object |
|
SimpleGFFRecord(java.lang.String seqName,
java.lang.String source,
java.lang.String feature,
int start,
int end,
double score,
StrandedFeature.Strand strand,
int frame,
java.lang.String comment,
java.util.Map groupAttributes)
|
Method Summary | |
java.lang.String |
getComment()
The feature comment. |
int |
getEnd()
The end of this feature within the source sequence. |
java.lang.String |
getFeature()
The feature type filed. |
int |
getFrame()
The frame of the feature. |
java.util.Map |
getGroupAttributes()
A Map containing the group / attribute information. |
double |
getScore()
The score of the feature. |
java.lang.String |
getSeqName()
The sequence name field. |
java.lang.String |
getSource()
The source, or creator of this feature. |
int |
getStart()
The start of this feature within the source sequence. |
StrandedFeature.Strand |
getStrand()
The strand of the feature. |
void |
setComment(java.lang.String comment)
Set the comment to comment. |
void |
setEnd(int end)
Set the end coordinate to end. |
void |
setFeature(java.lang.String feature)
Set the feature type to type. |
void |
setFrame(int frame)
Set the frame to frame. |
void |
setGroupAttributes(java.util.Map ga)
Replace the group-attribute Map with ga. |
void |
setScore(double score)
Set the score to score. |
void |
setSeqName(java.lang.String seqName)
Set the sequence name to seqName. |
void |
setSource(java.lang.String source)
Set the feature source to source. |
void |
setStart(int start)
Set the start coordinate to start. |
void |
setStrand(StrandedFeature.Strand strand)
Set the strand to strand. |
static java.lang.String |
stringifyAttributes(java.util.Map attMap)
Create a String representation of attMap. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleGFFRecord(GFFRecord rec)
rec
- - A GFFRecord objectpublic SimpleGFFRecord(java.lang.String seqName, java.lang.String source, java.lang.String feature, int start, int end, double score, StrandedFeature.Strand strand, int frame, java.lang.String comment, java.util.Map groupAttributes)
public SimpleGFFRecord()
Method Detail |
public void setSeqName(java.lang.String seqName)
seqName
- the new namepublic java.lang.String getSeqName()
GFFRecord
This should be the name of the sequence that this GFF record is within.
getSeqName
in interface GFFRecord
public void setSource(java.lang.String source)
source
- the new sourcepublic java.lang.String getSource()
GFFRecord
This is usualy a program name.
getSource
in interface GFFRecord
public void setFeature(java.lang.String feature)
feature
- the new feature typepublic java.lang.String getFeature()
GFFRecord
This is something like "exon" - usualy corresponds to an EMBL term.
getFeature
in interface GFFRecord
public void setStart(int start)
start
- the new start coordinatepublic int getStart()
GFFRecord
getStart
in interface GFFRecord
public void setEnd(int end)
end
- the new end coordinatepublic int getEnd()
GFFRecord
getEnd
in interface GFFRecord
public void setScore(double score)
The score must be a double, inclusive of 0
.
If you wish to indicate that there is no score, then use
GFFRecord.NO_SCORE.
score
- the new scorepublic double getScore()
GFFRecord
For sequences that have no score, this will be set to GFFRecord.NO_SCORE.
getScore
in interface GFFRecord
public void setStrand(StrandedFeature.Strand strand)
strand
- the new Strandpublic StrandedFeature.Strand getStrand()
GFFRecord
This will be one of GFFRecord.POSITIVE_STRAND, GFFRecord.NEGATIVE_STRAND, or GFFRecord.NO_STRAND.
getStrand
in interface GFFRecord
public void setFrame(int frame) throws java.lang.IllegalArgumentException
The score must be one of {0, 1, 2}
or
GFFRecord.NO_FRAME.
java.lang.IllegalArgumentException
- if score is not valid.public int getFrame()
GFFRecord
This will be one of {1, 2, 3}
or
GFFRecord.NO_FRAME.
getFrame
in interface GFFRecord
public void setGroupAttributes(java.util.Map ga)
To efficiently add a key, call getGroupAttributes() and modify the Map.
ga
- the new group-attribute Mappublic java.util.Map getGroupAttributes()
GFFRecord
This will be a Map of group-names to List objects.
getGroupAttributes
in interface GFFRecord
public void setComment(java.lang.String comment)
If you set it to null, then the comment for this line will be ignored.
public java.lang.String getComment()
GFFRecord
getComment
in interface GFFRecord
public static java.lang.String stringifyAttributes(java.util.Map attMap)
attMap
- the Map of attributes and value lists
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |