From d9028cdcfcb36af0582e42ac568bbb2be2fb7fc1 Mon Sep 17 00:00:00 2001 From: costero-e Date: Thu, 17 Oct 2024 16:45:27 +0200 Subject: [PATCH] more updates --- genomicVariations_vcf.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/genomicVariations_vcf.py b/genomicVariations_vcf.py index c03c4bf..3e68f5c 100644 --- a/genomicVariations_vcf.py +++ b/genomicVariations_vcf.py @@ -97,15 +97,13 @@ def generate(dict_properties): print(vcf_filename) vcf = VCF(vcf_filename) vcf.set_samples([]) - vcf.set_index(index_path="files/vcf/files_to_read/pop11_sub2_chr1.vcf.bgz.tbi") + #my_target_list = vcf.samples count=0 pbar = tqdm(total = num_rows) - r=0 - for v in vcf: #print(v) @@ -813,8 +811,8 @@ def generate(dict_properties): try: definitivedict["frequencyInPopulations"][0]["frequencies"][0]["alleleCount"]=allele_count definitivedict["frequencyInPopulations"][0]["frequencies"][0]["alleleNumber"]=allele_number - #definitivedict["frequencyInPopulations"][0]["frequencies"][0]["alleleCountHomozygous"]=ac_hom - #definitivedict["frequencyInPopulations"][0]["frequencies"][0]["alleleCountHeterozygous"]=ac_het + definitivedict["frequencyInPopulations"][0]["frequencies"][0]["alleleCountHomozygous"]=ac_hom + definitivedict["frequencyInPopulations"][0]["frequencies"][0]["alleleCountHeterozygous"]=ac_het except Exception: pass total_dict.append(definitivedict)