2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/gene_assembler/gff_snp.rb', line 2
def report(snp, parent, seqid,n)
depth="Depth=#{snp.depth};"
if snp.depth.nil?
depth=nil
end
zygosity="Zygosity=#{snp.zygosity};"
if snp.zygosity.nil?
zygosity=nil
end
mapping_qual="Mapping_qual=#{snp.mapping_qual};"
if snp.mapping_qual.nil?
mapping_qual=nil
end
strand_bias="Strand_bias=#{snp.strand_bias};"
if snp.strand_bias.nil?
end
snp_text="#{seqid}\t#{snp.source}\tSNP\t#{snp.position}\t#{snp.position}\t.\t+\t.\tID=#{parent}_SNP_#{n};Parent=#{parent};Name=#{snp.ref} -> #{snp.var};Note=#{snp.ref} -> #{snp.var};#{depth}#{zygosity}#{mapping_qual}#{strand_bias}"
return snp_text
end
|