mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
fixed dump rake task for plots
This commit is contained in:
@@ -12,21 +12,21 @@ namespace :numbers do
|
||||
|
||||
# now let's get the genotypes
|
||||
File.open("#{Rails.root}/public/data/plot_data/number_genotypes.csv","w"){ |file|
|
||||
Genotype.find_each do |u|
|
||||
Genotype.find_each.with_index do |u,i|
|
||||
file.write("#{i + 1}\t#{u.created_at}\n")
|
||||
end
|
||||
}
|
||||
|
||||
# what else do we need? oh yes, phenotypes
|
||||
File.open("#{Rails.root}/public/data/plot_data/number_phenotypes.csv","w"){ |file|
|
||||
Phenotype.find_each do |u|
|
||||
Phenotype.find_each.with_index do |u,i|
|
||||
file.write("#{i + 1}\t#{u.created_at}\n")
|
||||
end
|
||||
}
|
||||
|
||||
# and lastly the user phenotypes
|
||||
File.open("#{Rails.root}/public/data/number_user_phenotypes.csv","w"){ |file|
|
||||
UserPhenotype.find_each do |u|
|
||||
File.open("#{Rails.root}/public/data/plot_data/number_user_phenotypes.csv","w"){ |file|
|
||||
UserPhenotype.find_each.with_index do |u,i|
|
||||
file.write("#{i + 1}\t#{u.created_at}\n")
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user