how to pruned the SNPs to be at least 100 kb apart from each other? Is there any software that can be implemented?
2
0
Entering edit mode
14 months ago
924861370 • 0

I want to prune pruned the SNPs to be at least 100 kb apart from each other. But I don't know how to do that, maybe there is some software can do that? just based on the distance ,not the LD and others.

SNP software error • 514 views
ADD COMMENT
0
Entering edit mode
14 months ago

You could use vcf2bed and closest-features for verification.

ADD COMMENT
0
Entering edit mode

I just looked it up, but I can't find the right way. Could you explain it in more detail? Thank u very much!!!

ADD REPLY
0
Entering edit mode

Maybe something like this:

$ vcf2bed --sort-tmpdir=${PWD} < snps.vcf > snps.bed
$ closest-features --dist snps.bed snps.bed | awk -v FS="|" -v OFS="\t" '(($2<=-100000)||($3>=100000)){ print $1 }' > filteredSNPs.bed
ADD REPLY
0
Entering edit mode
14 months ago

I wrote https://github.com/lindenb/bcfprune

./bcfprune -d 100 test.bcf
ADD COMMENT
0
Entering edit mode

I installed htslib by conda, and what should "HTSLIB=/path/to/htslib" be? I got error in make and I don't have sudo permission. Thank you!

git clone "https://github.com/lindenb/bcfprune"
cd bcfprune
# set the path to a compiled C htslib directory
make HTSLIB=/path/to/htslib
ADD REPLY
0
Entering edit mode

search somewhere under the output of which tabix. This must be a directory containing some *.so files.

ADD REPLY

Login before adding your answer.

Traffic: 2592 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6