public class SimpleGFFRecord extends Object implements GFFRecord
NATURAL_ORDER, NO_FRAME, NO_SCORE
Constructor and Description |
---|
SimpleGFFRecord()
Create a new SimpleGFFRecord with values set to null or zero
|
SimpleGFFRecord(GFFRecord rec)
Create a new SimpleGFFRecord from GFFRecord object
|
SimpleGFFRecord(String seqName,
String source,
String feature,
int start,
int end,
double score,
StrandedFeature.Strand strand,
int frame,
String comment,
Map groupAttributes) |
Modifier and Type | Method and Description |
---|---|
String |
getComment()
The feature comment.
|
int |
getEnd()
The end of this feature within the source sequence.
|
String |
getFeature()
The feature type filed.
|
int |
getFrame()
The frame of the feature.
|
Map |
getGroupAttributes()
A Map containing the group / attribute information.
|
double |
getScore()
The score of the feature.
|
String |
getSeqName()
The sequence name field.
|
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(String comment)
Set the comment to comment.
|
void |
setEnd(int end)
Set the end coordinate to end.
|
void |
setFeature(String feature)
Set the feature type to type.
|
void |
setFrame(int frame)
Set the frame to frame.
|
void |
setGroupAttributes(Map ga)
Replace the group-attribute Map with
ga.
|
void |
setScore(double score)
Set the score to score.
|
void |
setSeqName(String seqName)
Set the sequence name to seqName.
|
void |
setSource(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 String |
stringifyAttributes(Map attMap)
Create a String representation of
attMap.
|
public SimpleGFFRecord(GFFRecord rec)
rec
- - A GFFRecord objectpublic SimpleGFFRecord(String seqName, String source, String feature, int start, int end, double score, StrandedFeature.Strand strand, int frame, String comment, Map groupAttributes)
public SimpleGFFRecord()
public void setSeqName(String seqName)
seqName
- the new namepublic String getSeqName()
GFFRecord
This should be the name of the sequence that this GFF record is within.
getSeqName
in interface GFFRecord
public void setSource(String source)
source
- the new sourcepublic String getSource()
GFFRecord
This is usualy a program name.
public void setFeature(String feature)
feature
- the new feature typepublic 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
public void setEnd(int end)
end
- the new end coordinatepublic int getEnd()
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.
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.
public void setFrame(int frame)
The score must be one of {0, 1, 2}
or
GFFRecord.NO_FRAME.
frame
- the frameIllegalArgumentException
- if score is not valid.public int getFrame()
GFFRecord
This will be one of {1, 2, 3}
or
GFFRecord.NO_FRAME.
public void setGroupAttributes(Map ga)
To efficiently add a key, call getGroupAttributes() and modify the Map.
ga
- the new group-attribute Mappublic Map getGroupAttributes()
GFFRecord
This will be a Map of group-names to List objects.
getGroupAttributes
in interface GFFRecord
public void setComment(String comment)
If you set it to null, then the comment for this line will be ignored.
comment
- the new commentpublic String getComment()
GFFRecord
getComment
in interface GFFRecord
public static String stringifyAttributes(Map attMap)
attMap
- the Map of attributes and value listsCopyright © 2014 BioJava. All rights reserved.