Created
August 7, 2021 00:49
-
-
Save danielecook/4b58517edbbac67e33e5fe318a243ac8 to your computer and use it in GitHub Desktop.
Remapping an aligned bam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://lh3.github.io/2021/07/06/remapping-an-aligned-bam | |
samtools collate -Oun128 in.bam | samtools fastq -OT RG,BC - \ | |
| bwa mem -pt8 -CH <(samtools view -H in.bam|grep ^@RG) ref.fa - \ | |
| samtools sort -@4 -m4g -o out.bam - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment