mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
added task for updating chromosome names (closes #348)
This commit is contained in:
12
lib/tasks/update_mt_chromosome_name.rake
Normal file
12
lib/tasks/update_mt_chromosome_name.rake
Normal 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
|
||||
Reference in New Issue
Block a user