Atkinson-Lab / Tractor

Scripts for implementing the Tractor pipeline
MIT License
44 stars 6 forks source link

IndexError #18

Closed ZikunY closed 1 year ago

ZikunY commented 1 year ago

Hi,

I had this error while running the function of extracting the tracts, ExtractTracts.py. The input vcf file is not phased, though RFMix still gave reasonable results. So my question is that does Tractor here require phased vcf file to run the function? Thanks a lot for the help!

INFO (main 42): Creating output files for 2 ancestries INFO (main 48): Opening input and output files for reading and writing Traceback (most recent call last): File "/Tractor/ExtractTracts.py", line 184, in extract_tracts(**vars(args)) File "/Tractor/ExtractTracts.py", line 126, in extract_tracts geno_b = str(geno[1])


IndexError: list index out of range
mike-w-wilson commented 1 year ago

Hi @ZikunY, Tractor does require a phased VCF file as it expects the GT delimiter to be "|" instead of "/". Without a phased GT, the code cannot split the GT field into appropriate ancestries.

ZikunY commented 1 year ago

Yes, it is exactly the problem. I phased the vcf by Shapeit, and the error was no more, thanks for the help!