Skip to content

Instantly share code, notes, and snippets.

@nuada
Last active August 29, 2015 14:02
Show Gist options
  • Save nuada/6bb08c5fd5232384ab28 to your computer and use it in GitHub Desktop.
Save nuada/6bb08c5fd5232384ab28 to your computer and use it in GitHub Desktop.
Cleanup BED: sort and merge intervals, extract gene symbols
bedtools sort -i foo.bed | bedtools merge -i - -nms | sed -e 's/\r//g' | awk -F '\t' '{ split($4, name, "."); print $1 FS $2 FS $3 FS name[1] }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment