twolinin / longphase

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

@PG tag for longphase haplotag #71

Closed DavidStreid closed 4 months ago

DavidStreid commented 5 months ago

Is there support for adding the @PG tag to the haplotagged BAM? Thank you for creating this great tool!

Current Behavior

$ BAM=ONT_sample.bam
$ longphase haplotag \
  -r hg38.fa \
  -s ssc.phased.vcf \
  --sv-file sv.phased.vcf \
  -b ${BAM} \
  -t 8 \
  -o ONT_sample.phased \
  --log
$ samtools view -H ${BAM} | grep @PG # just shows alignment headers
@PG ID:minimap2 PN:minimap2 CL:minimap2...
$ 

Desired Behavior

$ samtools view -H ${BAM} | grep @PG # Expecting the longphase line
@PG ID:minimap2 PN:minimap2 CL:minimap2...
@PG ID:longphase    PN:longphase    CL:longphase haplotag -r hg38.fa -s ssc.phased.vcf...   
ythuang0522 commented 5 months ago

@DavidStreid Thanks for your suggestion. Will add the PG tag into bam header in the next release.

DavidStreid commented 5 months ago

Thank you very much!

ythuang0522 commented 4 months ago

The v1.7.2 adds the PG tag into bam header.

DavidStreid commented 4 months ago

Thanks for getting to this so quickly!