Package org.dishevelled.bio.feature.gff3
Class Gff3Record
- java.lang.Object
-
- org.dishevelled.bio.feature.gff3.Gff3Record
-
@Immutable public final class Gff3Record extends Object
GFF3 record.- Author:
- Michael Heuer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)com.google.common.collect.ListMultimap<String,String>getAttributes()Return the attributes for this GFF3 record.longgetEnd()Return the end for this GFF3 record in 0-based coordinate system, closed open range.StringgetFeatureType()Return the feature type for this GFF3 record.IntegergetPhase()Return the phase for this GFF3 record, if any.DoublegetScore()Return the score for this GFF3 record, if any.StringgetSeqid()Return the seqid for this GFF3 record.StringgetSource()Return the source for this GFF3 record.longgetStart()Return the start for this GFF3 record in 0-based coordinate system, closed open range.StringgetStrand()Return the strand for this GFF3 record.inthashCode()(package private) static booleanisMissingValue(String value)Return true if the specified value is the missing value (".").(package private) static com.google.common.collect.ListMultimap<String,String>parseAttributes(String attributes)Parse the GFF3 attributes column into a list multimap of<String, String>entries.com.google.common.collect.Range<Long>toRange()Return this GFF3 record as a 0-based coordinate system, closed open range.StringtoString()static Gff3RecordvalueOf(String value)Return a new GFF3 record parsed from the specified value.(package private) static StringwriteAttributes(com.google.common.collect.ListMultimap<String,String> attributes)Write the list multimap of<String, String>entries as GFF3 attributes column format.
-
-
-
Constructor Detail
-
Gff3Record
public Gff3Record(String seqid, String source, String featureType, long start, long end, Double score, String strand, Integer phase, com.google.common.collect.ListMultimap<String,String> attributes)
Create a new GFF3 record.- Parameters:
seqid- seqid, must not be nullsource- source, must not be nullfeatureType- feature type, must not be nullstart- start, must be at least 0Lend- end, must be at least zero, and greater than or equal to startscore- scorestrand- strand, if present must be-,+, or?phase- phase, if present must be0,1, or2attributes- attributes, must not be null
-
-
Method Detail
-
getSeqid
public String getSeqid()
Return the seqid for this GFF3 record.- Returns:
- the seqid for this GFF3 record
-
getSource
public String getSource()
Return the source for this GFF3 record.- Returns:
- the source for this GFF3 record
-
getFeatureType
public String getFeatureType()
Return the feature type for this GFF3 record.- Returns:
- the feature type for this GFF3 record
-
getStart
public long getStart()
Return the start for this GFF3 record in 0-based coordinate system, closed open range.- Returns:
- the start for this GFF3 record in 0-based coordinate system, closed open range
-
getEnd
public long getEnd()
Return the end for this GFF3 record in 0-based coordinate system, closed open range.- Returns:
- the end for this GFF3 record in 0-based coordinate system, closed open range
-
getScore
public Double getScore()
Return the score for this GFF3 record, if any.- Returns:
- the score for this GFF3 record, if any
-
getStrand
public String getStrand()
Return the strand for this GFF3 record.- Returns:
- the strand for this GFF3 record
-
getPhase
public Integer getPhase()
Return the phase for this GFF3 record, if any.- Returns:
- the phase for this GFF3 record, if any
-
getAttributes
public com.google.common.collect.ListMultimap<String,String> getAttributes()
Return the attributes for this GFF3 record.- Returns:
- the attributes for this GFF3 record
-
toRange
public com.google.common.collect.Range<Long> toRange()
Return this GFF3 record as a 0-based coordinate system, closed open range.- Returns:
- this GFF3 record as a 0-based coordinate system, closed open range
-
parseAttributes
static com.google.common.collect.ListMultimap<String,String> parseAttributes(String attributes)
Parse the GFF3 attributes column into a list multimap of<String, String>entries.- Parameters:
attributes- attributes to parse, must not be null- Returns:
- the GFF3 attributes column parsed into a list multimap of
<String, String>entries
-
writeAttributes
static String writeAttributes(com.google.common.collect.ListMultimap<String,String> attributes)
Write the list multimap of<String, String>entries as GFF3 attributes column format.- Parameters:
attributes- attributes to write, must not be null- Returns:
- the list multimap of
<String, String>entries written as GFF3 attributes column format
-
isMissingValue
static boolean isMissingValue(String value)
Return true if the specified value is the missing value (".").- Parameters:
value- value- Returns:
- true if the specified value is the missing value (
".")
-
valueOf
public static Gff3Record valueOf(String value)
Return a new GFF3 record parsed from the specified value.- Parameters:
value- value to parse- Returns:
- a new GFF3 record parsed from the specified value
- Throws:
IllegalArgumentException- if the value is not valid GFF3 formatNumberFormatException- if a number valued field cannot be parsed as a number
-
-