MatteoSchiavinato / all2vcf

Toolkit to convert the output of common variant calling programs to VCF
GNU General Public License v3.0
21 stars 3 forks source link

index out of range when using all2vcf stats #3

Open mrmrwinter opened 2 years ago

mrmrwinter commented 2 years ago

Hi,

Im getting the following output when trying to run all2vcf stats on my vcf files.

[Wed Jun 29 10:59:38 2022] ### Working on pairs/indels/vcfs/Scaffold_8.Scaffold_17.vcf ### 

[Wed Jun 29 10:59:38 2022] Found 883 candidate indels that where the annotation did not comply the VCF standard
[Wed Jun 29 10:59:38 2022] The annotation was fixed for these 883 indels
[Wed Jun 29 10:59:38 2022] Extracting information on the retained variants ... Traceback (most recent call last):
  File "/home/mike/software/all2vcf/src/stats", line 197, in <module>
    stats["INFO"] = stats["INFO"].str.split(";").apply(lambda x:convert_to_dictionary(x))
  File "/home/mike/miniconda3/envs/appraisal/envs/appraisal/lib/python3.9/site-packages/pandas/core/series.py", line 4357, in apply
    return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
  File "/home/mike/miniconda3/envs/appraisal/envs/appraisal/lib/python3.9/site-packages/pandas/core/apply.py", line 1043, in apply
    return self.apply_standard()
  File "/home/mike/miniconda3/envs/appraisal/envs/appraisal/lib/python3.9/site-packages/pandas/core/apply.py", line 1098, in apply_standard
    mapped = lib.map_infer(
  File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer
  File "/home/mike/software/all2vcf/src/stats", line 197, in <lambda>
    stats["INFO"] = stats["INFO"].str.split(";").apply(lambda x:convert_to_dictionary(x))
  File "/home/mike/software/all2vcf/src/stats", line 71, in convert_to_dictionary
    dict = { x[0]:x[1] for x in dict }
  File "/home/mike/software/all2vcf/src/stats", line 71, in <dictcomp>
    dict = { x[0]:x[1] for x in dict }
IndexError: list index out of range

The vcfs are called from a converted mummer show-snps output, of a nucmer alignment between two assembly contigs.

Any help would be hugely appreciated. Thank you.

MatteoSchiavinato commented 2 years ago

Hi, could you send me a file that I can use for testing?