tforest преди 3 години
родител
ревизия
77991f07ad
променени са 1 файла, в които са добавени 10 реда и са изтрити 10 реда
  1. 10 10
      vcf_to_sfs.py

+ 10 - 10
vcf_to_sfs.py Целия файл

@@ -82,16 +82,16 @@ with gzip.open(sys.argv[1], "rb") as inputgz:
82 82
             if folded :
83 83
                 #allele_counts_list = list(allele_counts.keys())
84 84
                 ##print("ALC", allele_counts_list, "POLY", polyallelic, ALT)
85
-                # for al in range(polyallelic-1):
86
-                #     SFS_values[min(allele_counts_list)-1] += 1/len(ALT)
87
-                #     allele_counts_list.remove(min(allele_counts_list))
88
-                if len(ALT) == 1:
89
-                    SFS_values[min(allele_counts_list)-1] += 1
90
-                else:
91
-                    for al in range(polyallelic-1):
92
-                        SFS_values[min(allele_counts_list)-1] += 1/len(ALT)
93
-                        allele_counts_list.remove(min(allele_counts_list))
94
-                        polycount += 1
85
+                for al in range(polyallelic-1):
86
+                    SFS_values[min(allele_counts_list)-1] += 1/len(ALT)
87
+                    allele_counts_list.remove(min(allele_counts_list))
88
+                # if len(ALT) == 1:
89
+                #     SFS_values[min(allele_counts_list)-1] += 1
90
+                # else:
91
+                #     for al in range(polyallelic-1):
92
+                #         SFS_values[min(allele_counts_list)-1] += 1/len(ALT)
93
+                #         allele_counts_list.remove(min(allele_counts_list))
94
+                #         polycount += 1
95 95
         line = inputgz.readline()
96 96
         print(SFS_values)
97 97
 print(polycount)