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

Meth_phaser_post_processing error: 0it [00:00, ?it/s] #27

Open
SusanOtt opened this issue Oct 30, 2024 · 2 comments
Open

Meth_phaser_post_processing error: 0it [00:00, ?it/s] #27

SusanOtt opened this issue Oct 30, 2024 · 2 comments

Comments

@SusanOtt
Copy link

SusanOtt commented Oct 30, 2024

Hello,

Thank you for making this program.
I am hoping to resolve some haplotype switch errors in my regions of interest, and I think Methphaser would be very nice to try out.
My regions of intrest are 3-5Mb, and I have a coverage of ~28x.
I also have pacbio hifi-reads from this same sample with a similar coverage, which I would like to try to combine, eventually.
However, first I like to focus on nanopore reads. My pipeline includes base calling the reads with dorado v4.3.0.
Followed by extracting the reads including methylation pattern.
As a reference I use the assembly from the collapsed haplotype.

dorado basecaller sup,5mC_5hm Nanopore.pod5 > Nanopore_pod5.bam
samtools view -b Nanopore_pod5_sort.bam | samtools fastq -T MM,ML - > Nanopore_pod5.fastq

Next I follow the steps from the supplementary table from the Methphaser article.
For CLAIR3 I used the r1041_e82_400bps_sup_v430 model.
Next, I ran Hapcut2 and Whatshap to call haplotype blocks and tag the reads.

samtools view -bF 2304 -o Nanopore_haplotagged_whatshap_primary.bam Nanopore_haplotagged_whatshap.bam
samtools index Nanopore_haplotagged_whatshap_primary.bam
../meth_phaser_parallel -b Nanopore_haplotagged_whatshap_primary.bam -r REF.fasta -g Nanopore_whatshap.gtf -vc Nanopore_hapblocks_sorted.vcf.gz  -o Nanopore_methphaser_parallel
../meth_phaser_post_processing -ib Nanopore_haplotagged_whatshap_primary.bam -if Nanopore_methphaser_parallel/ -ov Nanopore_meth-phased.vcf -ob Nanopore_meth-phased/ -vc Nanopore_hapblocks_sorted.vcf.gz

The meth_phaser_parallel is working for so far I can see, however during the meth_phaser_post_processing I receive an error, almost immediately: 0it [00:00, ?it/s]

Could you help me resolve this error?
Is there is something I could improve in the analysis?
Any help is very much appreciated.

@Fu-Yilei
Copy link
Collaborator

Are only only targeting only one region or you are running it genome-wide? Since the gap you are trying to close is kinda large so MethPhaser might stop at 10th iterations before closing the gap. You can either increase the iteration times also not letting the program ignore this gap in the genome. I doubt the MethPhaser could do the trick for this case because the 3-5Mb gap maybe too large for MethPhaser. You can also check the intermediate csv files to see if the blocks' relationships are really assigned or not.

@SusanOtt
Copy link
Author

Thank you for your reply.

I am only running a targeted region of 3-5 Mb.
This region has a SNP dessert somewhere, so hifiASM made there a haplotype switch error.
We found out because we also sequenced a daughter from this animal.
I am hoping metaphase can result in a better phased region.

I am not really following your explanation about closing the gap, my appologies.
The csv files look similar to the csv files I got from the test datasets
The 0_2.csv file:
Screenshot 2024-10-31 at 14 55 50
The first read-assignment file:
Screenshot 2024-10-31 at 14 57 53

@SusanOtt SusanOtt reopened this Oct 31, 2024
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

2 participants