Skip to content

Instantly share code, notes, and snippets.

@tkrahn
Created February 14, 2018 14:35
Show Gist options
  • Save tkrahn/41201fe5b1e4e3d6f8a923c48320ab88 to your computer and use it in GitHub Desktop.
Save tkrahn/41201fe5b1e4e3d6f8a923c48320ab88 to your computer and use it in GitHub Desktop.
unzip_and_merge_veritas_bam.sh
#!/bin/bash
tar xf 999999.bam.tgz
samtools merge 999999_merged.bam *.bam
# For extracting fastq files, the following steps are not required
# But if you want to use the BAM file directly you'll need to sort and index it to the correct reference sequence
samtools sort -o 999999.sorted.bam 99999_merged.bam
samtools index 999999.sorted.bam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment