Skip to content

Instantly share code, notes, and snippets.

@vidboda
Last active May 9, 2018 14:21
Show Gist options
  • Save vidboda/d9828c748ebf9ecc8ba68fd3f01ab8a1 to your computer and use it in GitHub Desktop.
Save vidboda/d9828c748ebf9ecc8ba68fd3f01ab8a1 to your computer and use it in GitHub Desktop.
awk to convert position file to BED file
BEGIN { FS="[:-]";OFS="\t"} {print $1,$2-1,$3}
#one-liner:
#awk 'BEGIN { FS="[:-]";OFS="\t"} {print $1,$2-1,$3}' file.list > file.bed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment