Class: PositionedGene
- Inherits:
-
Object
- Object
- PositionedGene
- Defined in:
- lib/jgi_genes.rb
Overview
A gene as read from the gff file. cds and exons are assumed to be in increasing order in terms of their positions along the positive strand.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cds ⇒ Object
Returns the value of attribute cds.
-
#exons ⇒ Object
Returns the value of attribute exons.
-
#name ⇒ Object
Returns the value of attribute name.
-
#protein_id ⇒ Object
Returns the value of attribute protein_id.
-
#seqname ⇒ Object
Returns the value of attribute seqname.
-
#start ⇒ Object
Returns the value of attribute start.
-
#strand ⇒ Object
Returns the value of attribute strand.
Instance Method Summary collapse
- #cds_end ⇒ Object
-
#cds_start ⇒ Object
Return the position of the cds end.
- #positive_strand? ⇒ Boolean
Instance Attribute Details
#cds ⇒ Object
Returns the value of attribute cds.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def cds @cds end |
#exons ⇒ Object
Returns the value of attribute exons.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def exons @exons end |
#name ⇒ Object
Returns the value of attribute name.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def name @name end |
#protein_id ⇒ Object
Returns the value of attribute protein_id.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def protein_id @protein_id end |
#seqname ⇒ Object
Returns the value of attribute seqname.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def seqname @seqname end |
#start ⇒ Object
Returns the value of attribute start.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def start @start end |
#strand ⇒ Object
Returns the value of attribute strand.
137 138 139 |
# File 'lib/jgi_genes.rb', line 137 def strand @strand end |
Instance Method Details
#cds_end ⇒ Object
148 149 150 151 152 153 154 |
# File 'lib/jgi_genes.rb', line 148 def cds_end # If gene has no coding regions, I guess if !@cds[@cds.length-1] return nil end return @cds[@cds.length-1].to end |
#cds_start ⇒ Object
Return the position of the cds end
140 141 142 143 144 145 146 |
# File 'lib/jgi_genes.rb', line 140 def cds_start # If gene has no coding regions, I guess if !@cds[0] return nil end return @cds[0].from end |
#positive_strand? ⇒ Boolean
156 157 158 |
# File 'lib/jgi_genes.rb', line 156 def positive_strand? return @strand === '+' end |