Last active
May 28, 2018 12:33
-
-
Save JamesKane/1fa483b6dcda20fa6f0bf712ed9ebd6a to your computer and use it in GitHub Desktop.
Use GATK to revert an aligned BAM to an unaligned 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
# USAGE: sh revert_bam.sh <sample name> | |
# Assumes GATK is on the path. Based on https://gatkforums.broadinstitute.org/gatk/discussion/6484#latest%23top | |
gatk RevertSam \ | |
-I=$1.bam \ | |
-O=$1.unmapped.bam\ | |
-SANITIZE=true \ | |
-MAX_DISCARD_FRACTION=0.005 \ | |
-ATTRIBUTE_TO_CLEAR=XT \ | |
-ATTRIBUTE_TO_CLEAR=XN \ | |
-ATTRIBUTE_TO_CLEAR=AS \ | |
-ATTRIBUTE_TO_CLEAR=OC \ | |
-ATTRIBUTE_TO_CLEAR=OP \ | |
-SORT_ORDER=queryname \ | |
-RESTORE_ORIGINAL_QUALITIES=true \ | |
-REMOVE_DUPLICATE_INFORMATION=true \ | |
-REMOVE_ALIGNMENT_INFORMATION=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment