Last active
August 29, 2015 14:00
-
-
Save hardingnj/7c90f2833930b60e6806 to your computer and use it in GitHub Desktop.
Mask regions in fasta where no coverage in a bam file. Useful for calculating null trinucleotide etc distributions
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 | |
BAM=this.bam | |
FASTA=that.fa | |
OUT=theother.fa | |
bedtools genomecov -ibam $BAM -bga | awk '$4>0' | bedtools maskfasta -fi $FASTA -bed - -fo $OUT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment