Question: VCF - InDels and SNPs relation
0
gravatar for bwczech
7 months ago by
bwczech90
bwczech90 wrote:

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.

snp vcf indel • 301 views
ADD COMMENTlink modified 7 months ago by Pierre Lindenbaum124k • written 7 months ago by bwczech90
0
gravatar for Pierre Lindenbaum
7 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

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 written 7 months ago by Pierre Lindenbaum124k

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 modified 7 months ago • written 7 months ago by bwczech90

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

yes

ADD REPLYlink written 7 months ago by Pierre Lindenbaum124k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1675 users visited in the last hour