added task for updating chromosome names (closes #348)

This commit is contained in:
Bastian Greshake
2017-06-20 08:33:36 +02:00
parent b6e35e3056
commit 18ad862c4a

View File

@@ -0,0 +1,12 @@
# frozen_string_literal: true
namespace :snps do
desc "change mitochondrial snp names from 'mt' to 'm'."
task :update_mt_snps => :environment do
Snp.where(:chromosome => "MT").each do |s|
s.chromosome = "M"
s.position = s.position.strip
s.save
end
end
end