Skip to content

Instantly share code, notes, and snippets.

@nuada
Last active August 29, 2015 14:02
Show Gist options
  • Save nuada/7a0327a001349c0d2c78 to your computer and use it in GitHub Desktop.
Save nuada/7a0327a001349c0d2c78 to your computer and use it in GitHub Desktop.
Convert BED file to PLINK/SEQ REG format
#!/bin/bash
echo -e "#CHR\tBP1\tBP2\tID"
awk -F '\t' '{ print $1 FS $2+1 FS $3 FS NR }' | sed -e 's/^\([0-9]\+\)/chr\1/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment