Class: SamMutationCLI
- Inherits:
-
Thor
- Object
- Thor
- SamMutationCLI
- Defined in:
- bin/sam-mutation
Instance Method Summary collapse
Instance Method Details
#tag(file_name) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'bin/sam-mutation', line 8 def tag (file_name) File.open(file_name).each do |line| next if line.match(/^@/) sam = Bio::DB::Alignment.new(line) if sam.mutations new_tag = Bio::DB::Tag.new("YH:m:"+sam.mutations.to_hgvs) puts sam.add_tag(new_tag) end end end |