Skip to content

Instantly share code, notes, and snippets.

@dwinter
Last active July 31, 2019 01:39
Show Gist options
  • Save dwinter/6d65a85ad1f1744287023eb0bb042029 to your computer and use it in GitHub Desktop.
Save dwinter/6d65a85ad1f1744287023eb0bb042029 to your computer and use it in GitHub Desktop.
three column cov to windows
tail cov.tsv -n1 | cut -f1,2 > spp.genome
bedtools makewindows -g spp.genome -w 1000 > spp_1kw.bed
awk -v OFS='\t' '{print $1,($2 -1),$2,$3 }' cov.tsv > cov.bed
bedtools map -a spp_1kw.bed -b cov.bed -c 4 -o mean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment