Make a BED file of HumVar variants with rsIds
# get HumVar | |
wget ftp://genetics.bwh.harvard.edu/pph2/training/humvar-2011_12.predictions.tar.gz | |
tar -zxvf humvar-2011_12.predictions.tar.gz | |
# get db snp | |
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/snp138.txt.gz | |
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