philres / ngmlr

NGMLR is a long-read mapper designed to align PacBio or Oxford Nanopore (standard and ultra-long) to a reference genome with a focus on reads that span structural variations
MIT License
284 stars 41 forks source link

--bam-fix and cs tag #91

Closed sjin09 closed 3 years ago

sjin09 commented 3 years ago

Hello @philres

The --bam-fix option didn't produce the cs tag like the one from minimap2. I am hoping to compare the alignment results and mutation calling results from two aligners and I was wondering if I was doing something wrong with regards to the alignment parameters or if ngmlr no longer produces the cs tag.

My command was the following:

ngmlr --rg-sm "$SAMPLE" --rg-lb "CCS" --rg-pl "PACBIO" --rg-pu "$SMRTcell" -r ${REFERENCE} --bam-fix -x pacbio -t 10 -q $SAMPLE.ccs.fastq.gz | samtools view -hb - > ${OUT_PATH}/$1/hg19.$SAMPLE.ngmlr.bam 

Many thanks, Sangjin

fritzsedlazeck commented 3 years ago

Dear @sjin09 , the cs tag is not a standard tag from the sam format. It is something that Minimap2 introduced. Thus, we will not integrate this. The MD and Cigar string indicates how the pairwise alignment will look like and the NM tag gives the edit distnace. I hope that helps Cheers Fritz

sjin09 commented 3 years ago

Thanks @fritzsedlazeck.

I was confused as the release said "--bam-fix writes CS tag (Thanks Heng)" I will re-create the CS tag from cigar string and MD tag.