-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got "IndexError: list index out of range" in generate_multihetsep.py #31
Comments
Are you sure you have a correct mask file here? It seems you're giving it a VCF instead of a BED file for the mask. |
Hi! I'm facing a similar error message but this time while reading the vcf file. Traceback (most recent call last): The command I used is this: Python version: Python 3.7.3 |
could you post the error message, not just the Traceback, please? |
The error message was the same as in the first message: "IndexError: list index out of range" |
Well, if the error occurred with the command |
@stschiff I saw @Hjorvik had a similar problem, the difference is that the last line of output returned by my command is What is the cause of this error, and how can I fix it? |
This means that one of your VCFs is not in the right shape. My program expects the genotypes (e.g. |
Hi! @stschiff I encountered a similar IndexError but this time about "alleles = [fields[3]]": Traceback (most recent call last): The code I am applying is: Would you please suggest why this issue potentially occurs? Thanks and look forward to your reply! |
As above, please check that your VCF file is the shape that my scripts expects it. See my previous comment. |
Hi! @stschiff Thank you so much for your quick response. I would like to provide additional information regarding the issue I'm facing. Initially, I thought that including the trio information in the script would eliminate the need to phase the VCF files. However, as a troubleshooting step, I decided to phase the VCF files anyway. The heterozygotes are consistently represented as '0|1' or '1|0' after phasing. Unfortunately, despite this effort, I am still encountering the same error. I would greatly appreciate any further suggestions or guidance you can offer to help resolve this issue. Thank you for your attention. |
Hi @stschiff After some investigation, I find it's actually the problem with the output file from SNPable. It works when I remove the mapability masks. What do you think the potential impact of removing this mask to my final results? Thanks! |
Could it just be that you use |
I am trying to use MSMC in the Cat species. But I got an error as follows.
msmc-tools-master/generate_multihetsep.py --chr=${CHR} --mask=${BAM}out_mask_chr${CHR}.vcf.gz ${VCF}${CHR}phased.vcf.gz > ${VCF}${CHR}_multihetsep.txt
generating msmc input file with 2 haplotypes
adding mask: cat_msmc_test/bam/ERR2497923_sorted.bam_out_mask_chrA1.vcf.gz
Traceback (most recent call last):
File "msmc-tools-master/generate_multihetsep.py", line 200, in
maskIterators.append(MaskIterator(f))
File "msmc-tools-master/generate_multihetsep.py", line 19, in init
self.readLine()
File "msmc-tools-master/generate_multihetsep.py", line 29, in readLine
self.start = int(fields[1]) + 1
IndexError: list index out of range
I am wondering about one possibility getting the error is Chromosome number in Cat (e.g. A1, A2...). Do you have any ideas to solve it? Thank you!
The text was updated successfully, but these errors were encountered: