lh3 / psmc

Implementation of the Pairwise Sequentially Markovian Coalescent (PSMC) model
Other
146 stars 60 forks source link

Generating SAM file using ONT long-reads and Minimap2 #41

Closed sjfleck closed 2 years ago

sjfleck commented 2 years ago

Can PSMC be run with a bam file created by mapping long-reads instead of short-reads? I only have long-reads for the sample in question and I'm having some issues getting it to finish properly.

Instead of bwa for mapping illumina short reads onto a reference assembly, I want to use Minimap2 to map ONT long-reads onto the reference. I've seen some potentially important Minimap2 options, such as:

-L - Write CIGAR with >65535 operators at the CG tag. Older tools are unable to convert alignments with >65535 CIGAR ops to BAM. This option makes minimap2 SAM compatible with older tools. Newer tools recognizes this tag and reconstruct the real CIGAR in memory.

Any recommendations you have for running minimap2 so it's compatible with samtools and PSMC would be greatly appreciated. Thank you for the tool, I've used it many times with short-read data.

lh3 commented 2 years ago

I am not aware of tools that can do this, unfortunately.