Last active
September 25, 2015 22:20
-
-
Save cmdcolin/202b7aa2a91c3bc0024c to your computer and use it in GitHub Desktop.
Convert BAM to bigwig (parallel)
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 | |
samtools faidx reference_genome.fa | |
cut -f1,2 reference_genome.fa.fai > chrom.sizes | |
parallel "bedtools genomecov -ibam {} -g chrom.sizes -bg -split > {.}.bg" ::: *.bam; | |
parallel "bedGraphToBigWig {} chrom.sizes {.}.bw" ::: *.bg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment