Skip to content

Commit

Permalink
Updated flux sensitivity data loading so that nil value may created g…
Browse files Browse the repository at this point in the history
…ene column
  • Loading branch information
michaelbarton committed Oct 20, 2008
1 parent e982208 commit 65f694f
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions analysis/005_gene_sensitivity_analysis/analysis.rake
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ namespace '005' do
FasterCSV.open(data,:headers => true,:col_sep => "\t").each do |row|
gene = Gene.find_by_name(row['gene'])
if gene
cost_types.each do |name,cost|
FluxSensitivity.new(
:gene_id => gene.id,
:condition_id => conditions[row['environment']],
:cost_type_id => cost,
:reaction_name => row['reaction'],
:estimate => row[name]
).save!
end
gene_id = gene.id
else
gene_id = nil
end

cost_types.each do |name,cost|
FluxSensitivity.new(
:gene_id => gene_id,
:condition_id => conditions[row['environment']],
:cost_type_id => cost,
:reaction_name => row['reaction'],
:estimate => row[name]
).save!
end
end
end
Expand Down

0 comments on commit 65f694f

Please sign in to comment.