mitoNGS / MToolBox

A bioinformatics pipeline to analyze mtDNA from NGS data
http://sourceforge.net/projects/mtoolbox/?source=navbar
GNU General Public License v3.0
86 stars 37 forks source link

vcfoutput bug #85

Open Pilibeibei opened 4 years ago

Pilibeibei commented 4 years ago

When I used the updated 1.1 version, the analysis running smoothly and I got test.vcf file. However, when I try the latest version 1.2, it showed errors. I got all result files except for test.vcf. when I use vcf_dict_tmp to run VCFoutput.py, it shows:

Reference sequence used for VCF: RCRS Traceback (most recent call last): File "/home/MToolBox-master/MToolBox/VCFoutput.py", line 38, in VCFoutput(VCF_dict, reference=reference_sequence, name=sample_vcf_name) File "/home/MToolBox-master/MToolBox/mtVariantCaller.py", line 935, in VCFoutput i._sample_indexes[sample][0].append(genotype) AttributeError: 'int' object has no attribute 'append'

However, this issue was only shown up when I run put several samples in the lst file. If just run one sample, no problem at all.

Please help.

Thanks

clody23 commented 4 years ago

Hi, can you please try again a git pull to upload your local copy of MToolBox? Since the v. 1.2 release we have done additional fixes, which might solve your problem.

Also, can you please run using one list file per sample. The current version of MToolBox might have problems in handling multiple samples indeed. This is going to be solved with the snakemake version of MToolBox, that we are planning to release soon.

Best wishes, Claudia

Pilibeibei commented 4 years ago

Thanks, Claudia,

I think that's the case. When I run one list file per sample, it works, and I get vcf_dict_tmp and sample1.vcf. Then, I have to put the sample1.vcf in another folder so when I run the second list file iI can get sample2.vcf, otherwise I can only get vcf_dict_tmp and see the same error for VCFoutput.py as

Traceback (most recent call last): File "/home/MToolBox-master/MToolBox/VCFoutput.py", line 38, in VCFoutput(VCF_dict, reference=reference_sequence, name=sample_vcf_name) File "/home/MToolBox-master/MToolBox/mtVariantCaller.py", line 935, in VCFoutput i._sample_indexes[sample][0].append(genotype) AttributeError: 'int' object has no attribute 'append'

I have several hundreds of samples for analysis, it would be great if you can fix that problem for multiple samples.

Thanks

J

bjstewart1 commented 4 years ago

I am also getting this error with MToolBox-1.2.1 Works for one sample, but will not produce a vcf file when tasked with multiple input samples.

em-arpy commented 4 years ago

I have downloaded the latest release and have the same issue. The vcf file generates for a single sample and not for multiple.

Qinqiword commented 3 years ago

Hi,

I also encountered the same error with MToolBox-1.2.1.

When I run one list file per sample, it works,when put 2 samples in one list, it also works, but when I put 20 samples in one list file, it shows:

Reference sequence used for VCF: RCRS
Traceback (most recent call last):
  File "/home/gengzhx/software/MToolBox-1.2.1/MToolBox/VCFoutput.py", line 38, in <module>
    VCFoutput(VCF_dict, reference=reference_sequence, name=sample_vcf_name)
  File "/home/gengzhx/software/MToolBox-1.2.1/MToolBox/mtVariantCaller.py", line 868, in VCFoutput
    i._sample_indexes[sample][0].append(aplotype)
AttributeError: 'int' object has no attribute 'append'

In fact, I have several thousands of samples. So I‘m looking forward to fixing this error. Alternatively, is it possible to generate a gvcf file for each sample? In this way, more variation information can be retained when merging population data.

Thanks

Wangj