Repository 'medaka_variant'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/medaka_variant

Changeset 5:19f3b583a9b3 (2020-10-16)
 Previous changeset 4:2308bc523659 (2020-10-13) Next changeset 6:aabb4e1c0b7b (2021-02-10) Commit message: "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/medaka commit 13769e7d51b30a1d15eb62a9ba89ee2064f3ddc3" modified: annotateVCF.py variant.xml b diff -r 2308bc523659 -r 19f3b583a9b3 annotateVCF.py--- a/annotateVCF.py Tue Oct 13 16:00:16 2020 +0000+++ b/annotateVCF.py Fri Oct 16 17:05:21 2020 +0000 [ @@ -75,6 +75,7 @@                 ins_str += base             else:                 ins_len = int(ins_str) - 1+                ins_str = ""                 insertion = base                 ins_flag = False         elif del_flag:@@ -82,6 +83,7 @@                 del_str += base             else:                 del_len = int(del_str) - 1+                del_str = ""                 deletion = base                 del_flag = False         else:@@ -107,7 +109,10 @@             else:                 counts[base_to_idx[base]] += 1                 stranded_counts[base_to_idx_stranded[base]] += 1-    af = float(counts[base_to_idx[alt_base]]) / float(sum(counts))+    if sum(counts) == 0:+        af = float("nan")+    else:+        af = float(counts[base_to_idx[alt_base]]) / float(sum(counts))     if float(sum(stranded_counts[0:4])) == 0:         faf = float("nan")     else:@@ -293,7 +298,10 @@             else:                 counts[8] += 1     dp = int(fields[3])-    af = float(counts[3]) / float(sum([counts[0], counts[3], counts[6]]))+    if sum([counts[0], counts[3], counts[6]]) == 0:+        af = float("nan")+    else:+        af = float(counts[3]) / float(sum([counts[0], counts[3], counts[6]]))     if sum([counts[1], counts[4], counts[7]]) == 0:         faf = float("nan")     else:@@ -317,7 +325,7 @@         if line[0:2] == "##":             out_vcf.write(line)         elif line[0] == "#":-            out_vcf.write("##annotateVCFVersion=0.1\n")+            out_vcf.write("##annotateVCFVersion=0.2\n")             out_vcf.write("##INFO=\n")             out_vcf.write("##INFO=\n")             out_vcf.write("##INFO=\n")@@ -376,7 +384,10 @@         else:             info = fields[7].split(';')         info.append("DP=%d" % (dp))-        info.append("AF=%.6f" % (af))+        if isnan(af):+            info.append("AF=NaN")+        else:+            info.append("AF=%.6f" % (af))         if isnan(faf):             info.append("FAF=NaN")         else: b diff -r 2308bc523659 -r 19f3b583a9b3 variant.xml--- a/variant.xml Tue Oct 13 16:00:16 2020 +0000+++ b/variant.xml Fri Oct 16 17:05:21 2020 +0000 b @@ -1,5 +1,5 @@ -+     Probability decoding              macros.xml@@ -133,7 +133,7 @@                                                               -                    +                                                               @@ -170,7 +170,7 @@                                                               -                    +