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
293 stars 40 forks source link

Add Read Group header #35

Closed dantaki closed 6 years ago

dantaki commented 6 years ago

Is there an argument for adding a Read Group tag to reads during alignment? This could be useful because some phasing software that leverages long reads require a read group tag.

I realize samtools has this capability to add in read group information to a sam/bam file, but it's one step less to include it in the aligning step.

bwa has this option -R STR read group header line such as '@RG\tID:foo\tSM:bar' [null], which makes adding read group information easy.

Thanks!

philres commented 6 years ago

Hi!

Thanks for the feedback and sorry for the large delay! That has been on my TODO list for a while. I just commit the change to master. If you build ngmlr from the master branch you should be able to do that. With the next release this will be available via conda as well.

Example:

ngmlr -r dh10b_ecoli.fasta -q dh10b_ecoli.fasta_1.fastq --rg-id foo --rg-sm sm --rg-lb lb
dantaki commented 6 years ago

Thanks!

wdecoster commented 6 years ago

Could you make a new release including this improvement? My compiler is too old to build from source so I rely on conda.

Cheers, Wouter