KolmogorovLab / hapdup

Pipeline to convert a haploid assembly into diploid
Other
85 stars 8 forks source link

ERROR: NO COMMON CONTIGS FOUND BETWEEN THE BAM FILE AND THE FASTA FILE #41

Open Axze-rgb opened 4 months ago

Axze-rgb commented 4 months ago

Hello, sorry this is a duplicate, but I don't know if you see when someone comments on a closed issue: https://github.com/KolmogorovLab/hapdup/issues/18

Also, the solution is not really explicit, "delete the filter bam", I don't understand how to proceed from there. Here is the hapdup.log

[2024-02-24 13:44:51] root: INFO: Filtering alignments
[2024-02-24 13:48:23] root: INFO: Running: flye-samtools index -@4 /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/filtered.bam
[2024-02-24 13:48:41] root: INFO: Running: pepper_variant call_variant -b /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/filtered.bam -f /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/assembly.fasta -o /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper -m /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper/pepper_model.bin -t 24 -s Sample --ont_r9_guppy5_sup --include-supplementary --no_quantized 2>&1 |tee /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper/pepper.log
[2024-02-24 13:48:42] root: ERROR: Missing output: /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper/PEPPER_VARIANT_FULL.vcf
[2024-02-24 13:50:37] root: INFO: Filtering alignments
[2024-02-24 13:54:09] root: INFO: Running: flye-samtools index -@4 /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/filtered.bam
[2024-02-24 13:54:28] root: INFO: Running: pepper_variant call_variant -b /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/filtered.bam -f /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/assembly.fasta -o /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper -m /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper/pepper_model.bin -t 24 -s Sample --ont_r9_guppy5_sup --include-supplementary --no_quantized 2>&1 |tee /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper/pepper.log
[2024-02-24 13:54:28] root: ERROR: Missing output: /media/alessandro/Storage/MA/P2/SNP_analysis/H5A2_Flye_assembly/hapdup/pepper/PEPPER_VARIANT_FULL.vcf

Thanks a lot

EDIT: what drives me crazy is that it works perfectly with all my other samples, only in this one it seems to use the filtered bam to get the contig names

Axze-rgb commented 4 months ago

Ok, I remade the bam file (the original one, not the filtered one) out of desperation, and relaunched HapDup via Singularity. It crashed the same. I then redid a mapping (a second time) and launched again because why not? I have nothing better to do (I hate my life). It's still running but way beyond the point of the error for which I opened this thread. I have no idea of what happened. I keep this open in case you have an explanation; so far, I am inclined to believe my computer has developed sentience and is trolling me.

mikolmogorov commented 4 months ago

Hello,

I think PEPPER for some reason did not produce any output. Could you send the corresponding log file? And what is the genome you are trying to assmeble?

Axze-rgb commented 4 months ago

Hello, Irelaunched the initial mapping and everything and it worked. It's a non model species with high heterozygosity so we are investigating if HapDup can actually handle something like 3% heterozygosity. My understanding is it relies on tools trained on humans so there is a chance we encounter problems. Thanks

mikolmogorov commented 4 months ago

Ok, glad it worked! 3% heterozygosity is indeed 30x higher than human heterozygosity.. This may be a challenge for Hapdup. I expect that initial haploid assembly will have a mix of haploid and diploid contigs. I would try deduplicating the initial assembly with purge_haplotigs before applying Hapdup.

Axze-rgb commented 4 months ago

I will try that, do you have tools to evaluate the phasing quality? Any recommendations? Thanks.

mikolmogorov commented 4 months ago

The best method would be using trio or Hi-C, anything that can give you orthogonal info about phasing.