popgenmethods / momi2

Infer demographic history with the Moran model
GNU General Public License v3.0
47 stars 11 forks source link

ValueError: I/O operation on closed file #68

Open tobitliyandja opened 1 year ago

tobitliyandja commented 1 year ago

Hi All, I am trying to generate the allele counts file using the following line in in momi2: python -m momi.read_vcf --no_aa --verbose sorex.vcf.gz sorex_pops.txt sorex_allele_counts.gz --bed sorex.bed. I am getting the following value Error: Traceback (most recent call last): File "/home/tliyandja/miniconda3/envs/momi-py36/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/tliyandja/miniconda3/envs/momi-py36/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/tliyandja/miniconda3/envs/momi-py36/lib/python3.6/site-packages/momi/read_vcf.py", line 45, in info_aa_field=args.info_aa_field).dump(args.out_file) File "/home/tliyandja/miniconda3/envs/momi-py36/lib/python3.6/site-packages/momi/data/snps.py", line 96, in read_vcf bcf_in.subset_samples(list(ind2pop.keys())) File "pysam/cbcf.pyx", line 2407, in pysam.cbcf.VariantFile.subset_samples (pysam/cbcf.c:32879) ValueError: I/O operation on closed file Can someone help in solving this issue? Thanks, Tobit