Skip to content
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

IndexError: list index out of range #10

Closed
liuy0421 opened this issue Jun 7, 2023 · 5 comments
Closed

IndexError: list index out of range #10

liuy0421 opened this issue Jun 7, 2023 · 5 comments

Comments

@liuy0421
Copy link

liuy0421 commented Jun 7, 2023

Hi there - I am applying Methphaser to a mouse dataset and ran into a minor issue. See error log below:

no reads aligned to chromosome MT, skipping...
no reads aligned to chromosome JH584301.1, skipping...
Traceback (most recent call last):
  File "/data/liuy45/conda/envs/methphaser/bin/meth_phaser_parallel", line 283, in <module>
    main(sys.argv[1:])
  File "/data/liuy45/conda/envs/methphaser/bin/meth_phaser_parallel", line 252, in main
    skipping_pair_start_list.append(phased_block_distance_list_sorted[0][0])
IndexError: list index out of range

Seems like chr_block_num is not zero, but somehow phased_block_distance_dict is empty? What could the problem be? Thank you so much!

@Fu-Yilei
Copy link
Collaborator

Fu-Yilei commented Jun 7, 2023

Please attach you command for meth_phaser_parallel, thanks

@liuy0421
Copy link
Author

liuy0421 commented Jun 7, 2023

Something along the lines of the following:

meth_phaser_parallel \
-b haplotagged.bam \
-r Mus_musculus.GRCm39.dna.primary_assembly.fa \
-g phased.gtf \
-vc output.phased.vcf \
-o output/ \
-t $SLURM_CPUS_PER_TASK

I did not get errors for the autosomes, sex chromosomes, and 3 other unlocalized genomic contigs. This is a minor issue for my purpose for now because if I had filtered the input .vcf for only autosomes this wouldn't have been an issue.

@Fu-Yilei
Copy link
Collaborator

Fu-Yilei commented Jun 7, 2023

Sorry, I have 0 knowledge about mouse datasets, but I would recommend only using MethPhaser on autosomes since random x inactivation. If you could give me more information on your dataset I might be able to look into it further. Additional helpful information could be reads, vcf, etc.. However, I recommend only using it on autosomes.

@liuy0421
Copy link
Author

liuy0421 commented Jun 7, 2023

Makes sense - thanks a lot!

@Fu-Yilei Fu-Yilei closed this as completed Jun 7, 2023
@Mar10L
Copy link

Mar10L commented Oct 26, 2023

Hi.
I am getting the same error:

Traceback (most recent call last):
  File "/iga/scripts/dev_modules/mambaforge/envs/duet-v0.6/bin/methphasing", line 1471, in <module>
    main(sys.argv[1:])
  File "/iga/scripts/dev_modules/mambaforge/envs/duet-v0.6/bin/methphasing", line 1396, in main
    [0], phased_region_list[1][0])]
IndexError: list index out of range

The command that I used was this one:

meth_phaser_parallel -t 10 -ml -2 \
-o methphaser \
-b grapevine.minimap2.filtered_only_primary.bam \
-r reference.fasta \
-g grapevine_phased.whatshap.stats.gtf \
-vc grapevine.clair3.phased.vcf.gz

Theoretically, I should not have problems with sex chromosomes, given the fact that grapevines do not possess them.

Thank you in advance for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants