Skip to content

Instantly share code, notes, and snippets.

@rjpbonnal
Created May 11, 2012 07:36
Show Gist options
  • Save rjpbonnal/2658172 to your computer and use it in GitHub Desktop.
Save rjpbonnal/2658172 to your computer and use it in GitHub Desktop.
Parsing Cufflinks Gtf file/data, in an ActiveRecord style
g=Bio::Ngs::Cufflinks::Gtf.new "./spec/fixture/transcripts.gtf"
g.set_lazy
a=g.multi_exon.coverage_gt(3).length_gt(200)
#not yet parsed until you iterate of the transcripts
a.multi_exons.each_transcript {|t| puts t; break}
#accessing to an exon using the indexin:
g.read_transcript(10) #return a string of the block
g.get_tranascript(10) #return an object transcript.
@rjpbonnal
Copy link
Author

also g[] works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment