Created
August 27, 2021 22:21
-
-
Save millerh1/316ab4e45056829a609c6f64611466df to your computer and use it in GitHub Desktop.
Shuffle Bam File
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
#!/bin/bash | |
bamToBed -i $BAM_ORIG -bed12 -cigar | shuffleBed -i - -g $CHROM_SIZES | bedToBam -bed12 -g $CHROM_SIZES | samtools sort > $BAM_SHUFFLED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a simple one-liner for taking a bam file and shuffling it.
Requires
bedtools
andsamtools
installed. Also requires achrom.sizes
file provided for the relevant genome.