Biostar Beta. Not for public use.
Question: VCF - InDels and SNPs relation
0
Entering edit mode

Hi, I have files with my SNPs and InDels. Do you have any idea how to check whether indels are called mainly in the vicinity of SNPs or not? How can I check it and calculate this relation? Thank you for your all proposition.

ADD COMMENTlink 9 months ago bwczech • 70 • updated 9 months ago Pierre Lindenbaum 120k
0
Entering edit mode

you could used bedtools closest to get a distribution of the distances indel/snp

for T in snps indels 
do
bcftools view -G -v $T  inputvcf.gz |  bcftools query --format "%CHROM\t%POS\t%END\n" | sort -T. -t $'\t' -k1,1 -k2,2n > $T.bed
done

bedtools closest -a indels.bed -b snps.bed -d | cut -f 7 | sort -n
ADD COMMENTlink 9 months ago Pierre Lindenbaum 120k
Entering edit mode
0

wow! Thank you, I did not know this site of bedtools.

How can I understand zeros? That''s mean that SNP is inside indel?

ADD REPLYlink 9 months ago
bwczech
• 70
Entering edit mode
0

How can I understand zeros? That''s mean that SNP is inside indel?

yes

ADD REPLYlink 9 months ago
Pierre Lindenbaum
120k

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0