Class: Bio::MutationArray
- Inherits:
-
Array
- Object
- Array
- Bio::MutationArray
- Includes:
- VepHgvs
- Defined in:
- lib/bio-sam-mutation/bio/mutation_array.rb
Instance Method Summary collapse
Methods included from VepHgvs
consequences_for_transcript, #vep
Instance Method Details
#to_hgvs(reference_type = nil) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/bio-sam-mutation/bio/mutation_array.rb', line 3 def to_hgvs(reference_type=nil) if length > 0 && reference_type.nil? reference_type = first.seqname.match(/^ENS/) ? "c" : "g" end if length == 1 first.to_hgvs(reference_type) elsif length > 1 [first.seqname,":",reference_type,".["].join + map(&:to_hgvs).join(";") + "]" elsif length == 0 nil end end |