Class SimpleGFFRecord
- All Implemented Interfaces:
GFFRecord
- Author:
- Matthew Pocock, Greg Cox, Aroul Ramadass, Len Trigg, Richard Holland
-
Field Summary
Fields inherited from interface org.biojava.bio.program.gff.GFFRecord
NATURAL_ORDER, NO_FRAME, NO_SCORE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new SimpleGFFRecord with values set to null or zeroSimpleGFFRecord(String seqName, String source, String feature, int start, int end, double score, StrandedFeature.Strand strand, int frame, String comment, Map groupAttributes) SimpleGFFRecord(GFFRecord rec) Create a new SimpleGFFRecord from GFFRecord object -
Method Summary
Modifier and TypeMethodDescriptionThe feature comment.intgetEnd()The end of this feature within the source sequence.The feature type filed.intgetFrame()The frame of the feature.A Map containing the group / attribute information.doublegetScore()The score of the feature.The sequence name field.The source, or creator of this feature.intgetStart()The start of this feature within the source sequence.The strand of the feature.voidsetComment(String comment) Set the comment to comment.voidsetEnd(int end) Set the end coordinate to end.voidsetFeature(String feature) Set the feature type to type.voidsetFrame(int frame) Set the frame to frame.voidReplace the group-attribute Map with ga.voidsetScore(double score) Set the score to score.voidsetSeqName(String seqName) Set the sequence name to seqName.voidSet the feature source to source.voidsetStart(int start) Set the start coordinate to start.voidsetStrand(StrandedFeature.Strand strand) Set the strand to strand.static StringstringifyAttributes(Map attMap) Create a String representation of attMap.
-
Constructor Details
-
SimpleGFFRecord
Create a new SimpleGFFRecord from GFFRecord object- Parameters:
rec- - A GFFRecord object
-
SimpleGFFRecord
public SimpleGFFRecord(String seqName, String source, String feature, int start, int end, double score, StrandedFeature.Strand strand, int frame, String comment, Map groupAttributes) -
SimpleGFFRecord
public SimpleGFFRecord()Create a new SimpleGFFRecord with values set to null or zero
-
-
Method Details
-
setSeqName
Set the sequence name to seqName.- Parameters:
seqName- the new name
-
getSeqName
Description copied from interface:GFFRecordThe sequence name field.This should be the name of the sequence that this GFF record is within.
- Specified by:
getSeqNamein interfaceGFFRecord- Returns:
- the name of the sequence
-
setSource
Set the feature source to source.- Parameters:
source- the new source
-
getSource
Description copied from interface:GFFRecordThe source, or creator of this feature.This is usualy a program name.
-
setFeature
Set the feature type to type.- Parameters:
feature- the new feature type
-
getFeature
Description copied from interface:GFFRecordThe feature type filed.This is something like "exon" - usualy corresponds to an EMBL term.
- Specified by:
getFeaturein interfaceGFFRecord- Returns:
- the feature type
-
setStart
Set the start coordinate to start.- Parameters:
start- the new start coordinate
-
getStart
Description copied from interface:GFFRecordThe start of this feature within the source sequence. -
setEnd
Set the end coordinate to end.- Parameters:
end- the new end coordinate
-
getEnd
Description copied from interface:GFFRecordThe end of this feature within the source sequence. -
setScore
Set the score to 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.- Parameters:
score- the new score
-
getScore
Description copied from interface:GFFRecordThe score of the feature.For sequences that have no score, this will be set to GFFRecord.NO_SCORE.
-
setStrand
Set the strand to strand.- Parameters:
strand- the new Strand
-
getStrand
Description copied from interface:GFFRecordThe strand of the feature.This will be one of GFFRecord.POSITIVE_STRAND, GFFRecord.NEGATIVE_STRAND, or GFFRecord.NO_STRAND.
-
setFrame
Set the frame to frame.The score must be one of
{0, 1, 2}or GFFRecord.NO_FRAME.- Parameters:
frame- the frame- Throws:
IllegalArgumentException- if score is not valid.
-
getFrame
Description copied from interface:GFFRecordThe frame of the feature.This will be one of
{1, 2, 3}or GFFRecord.NO_FRAME. -
setGroupAttributes
Replace the group-attribute Map with ga.To efficiently add a key, call getGroupAttributes() and modify the Map.
- Parameters:
ga- the new group-attribute Map
-
getGroupAttributes
Description copied from interface:GFFRecordA Map containing the group / attribute information.This will be a Map of group-names to List objects.
- Specified by:
getGroupAttributesin interfaceGFFRecord- Returns:
- a Map containing the group and attribute info.
-
setComment
Set the comment to comment.If you set it to null, then the comment for this line will be ignored.
- Parameters:
comment- the new comment
-
getComment
Description copied from interface:GFFRecordThe feature comment.- Specified by:
getCommentin interfaceGFFRecord- Returns:
- null or the feature comment
-
stringifyAttributes
Create a String representation of attMap. attMap is assumed to contain String keys and List values.- Parameters:
attMap- the Map of attributes and value lists- Returns:
- a GFF attribute/value String
-