SnpSift match overlapping mutations with a given bed file
0
0
Entering edit mode
7.8 years ago
morovatunc ▴ 550

Hi,

I know how to get overlapping mutations in my vcf with a given bed file. But is there a way to get a simple number from a log file ? like in the vcftools ?

Best,

Tunc.

snpsift vcftools • 1.5k views
ADD COMMENT
0
Entering edit mode

can you give example of what exactly you want

ADD REPLY
0
Entering edit mode

On one hand I have bed file. On the other hand I have my vcf file.

I want to extract mutations on that vcf file within that bed file locations as a VCF + I want to know how many of them are there.

Thank you for your response.

Tunc.

ADD REPLY
1
Entering edit mode

Did you tried bedtools intersect -a yourVcfFile.vcf -b yourBed.bed > result.vcf

and for how many "number of lines" wc -l result.vcf

If I understood right your question.

ADD REPLY
0
Entering edit mode

With this method I got that number that I want, but I will try to keep it as a last option because snpsift itself can do that isolation as well, I just wanted to know if it has a option like vcftools's log file.

Thank you very much for your useful solution.

ADD REPLY
0
Entering edit mode

I think yes, you will need to use one of those according to your needs

  • countHom() Count number of homozygous genotypes No arguments (countHom() > 0)
  • countHet() Count number of heterozygous genotypes No arguments (countHet() > 2)
  • countVariant() Count number of genotypes that are variants (i.e. not reference 0/0) No arguments (countVariant() > 5)
  • countRef() Count number of genotypes that are NOT variants (i.e. reference 0/0)
ADD REPLY

Login before adding your answer.

Traffic: 1609 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