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
0
Entering edit mode
14 months ago

You could use vcf2bed and closest-features for verification.

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!!!

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

0
Entering edit mode
14 months ago
./bcfprune -d 100 test.bcf

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

0
Entering edit mode

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