twolinin / longphase

GNU General Public License v3.0
99 stars 9 forks source link

Write a haplotagged BAM #6

Closed cjw85 closed 1 year ago

cjw85 commented 2 years ago

Very often after phasing variants its useful to create a BAM file with reads tagged as to which haplotype they belong, as in the whatshap haplotag command. Running this tagging as a discrete process involves additional IO; would it be possible to add BAM read tagging as an additional feature to longphase?

ythuang0522 commented 2 years ago

Yes. We are investigating how whatshap implemented this.

ythuang0522 commented 2 years ago

@cjw85 The release version v1.0 can output haplotype-tagging reads via haplotag. Sufficient multithreads are better for speed. 8 threads: ~31 min. 16 threads: ~16 min. 32 threads: ~11 minutes. longphase_linux-x64 haplotag -s snp.vcf -b alignment.bam -t 32