Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Make a BED file of HumVar variants with rsIds
# get HumVar
tar -zxvf humvar-2011_12.predictions.tar.gz
# get db snp
gunzip snp138.txt.gz
# get the deleterious SNPs
grep snp138.txt -wFf <(grep rs humvar-2011_12.deleterious.pph.output | cut -f 5) \
| cut -f 2-5 \
| awk '{print $0"\tdeleterious"}' > humvar.deleterious.bed
# get the neutral SNPs
grep snp138.txt -wFf <(grep rs humvar-2011_12.neutral.pph.output | cut -f 5) \
| cut -f 2-5 \
| awk '{print $0"\tneutral"}' > humvar.neutral.bed
# combine the two
(echo -e "chr\tstart\tend\trsid\tclass"; sort -k1,1 -k2,2n humvar.neutral.bed humvar.deleterious.bed) > humvar.both.bed
head humvar.both.bed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment