extraction homozygous SNPs for first individual when second individual has no SNPs in same position
1
0
Entering edit mode
6.7 years ago
kk.mahsa ▴ 140

hi

how i can extract homozygous SNPs for first individual (vcf file) when second individual has no SNPs in the same position?

thanks in advance

SNP homozygous • 1.4k views
ADD COMMENT
0
Entering edit mode
6.7 years ago

using vcffilterjdk: http://lindenb.github.io/jvarkit/VcfFilterJdk.html

n extract homozygous SNPs for first individual (vcf file)

I understand this as "genotype[0] is homozygous for the ALT allele and genotype[1] is Hom-Ref or is not Called"

java -jar dist/vcffilterjdk.jar -e 'return variant.getGenotype(0).isHomVar() && (variant.getGenotype(1).isHomRef() || !variant.getGenotype(1).isCalled());' input.vcf
ADD COMMENT
0
Entering edit mode

thanks for your quick answer dear Pierre, i think my question is not clear. i have two vcf file and my goal is extraction Homozygous snps for first vcf file when second vcf file has no snp (hom or het) in that position.

ADD REPLY
0
Entering edit mode

i have two vcf file and my goal is extraction Homozygous snps for first vcf file when second vcf file has no snp (hom or het)

merge the two vcfs : https://www.google.fr/search?q=merge+vcf+site%3Abiostars.org

and the filter with my command above.

ADD REPLY
0
Entering edit mode

i installed your program but there is not vcffilterjdk.jar file in dist folder. thare are three files including: vcffilterjs.jar, annotproc.jar and vcffilterjs.

so i try:

vcf-merge input_1.vcf input_2.vcf > merged.vcf

java -jar dist/vcffilterjs.jar -e 'return variant.getGenotype(0).isHomVar() && (variant.getGenotype(1).isHomRef() || !variant.getGenotype(1).isCalled());' merged.vcf

and get this error (https://ufile.io/h94hj)

ADD REPLY

Login before adding your answer.

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