Skip to content

Instantly share code, notes, and snippets.

@danmaclean
Created April 22, 2013 19:00
Show Gist options
  • Save danmaclean/5437571 to your computer and use it in GitHub Desktop.
Save danmaclean/5437571 to your computer and use it in GitHub Desktop.
finding a reference and creating the feature in experiments_controller.rb (lines 76 - 93)
ref = Reference.find(:first, :conditions => ["name = ? AND genome_id = ?", "#{ record.seqname }", "#{@experiment.genome_id}"])
feature = Feature.new(
:group => "#{attribute}",
:feature => "#{record.feature}",
:source => "#{record.source}",
:start => "#{record.start}",
:end => "#{record.end}",
:strand => "#{record.strand}",
:phase => "#{record.frame}",
:seqid => "#{record.seqname}",
:score => "#{record.score}",
#:experiment_id => "#{exp.id}",
:gff_id => "#{gff_id}",
:sequence => "#{seq}",
:quality => "#{qual}",
:reference_id => "#{ref.id}"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment