Hi,
I'm trying to use gtfilter (or Filter GT) module to set individual genotype calls to missing (".") if they match a certain criteria.
I managed to do so when filtering based on a minimum depth with:
SnpSift gtfilter -gv './.' "( DP<5 )" file.vcf
However, when I try to also check if the individual genotype is Heterozygote then it fails with an error:
SnpSift gtfilter -gv './.' "( DP<$IND_DP & isHet())"
java.lang.NullPointerException
at org.snpsift.lang.LangFactory.functionBoolGenotypeFactory(LangFactory.java:369)
at org.snpsift.lang.LangFactory.functionFactory(LangFactory.java:397)
at org.snpsift.lang.LangFactory.expressionFactory(LangFactory.java:252)
at org.snpsift.lang.LangFactory.expressionFactory(LangFactory.java:159)
at org.snpsift.lang.LangFactory.expressionFactory(LangFactory.java:166)
at org.snpsift.lang.LangFactory.expressionFactory(LangFactory.java:157)
at org.snpsift.lang.LangFactory.compile(LangFactory.java:134)
at org.snpsift.SnpSiftCmdFilterGt.parseExpression(SnpSiftCmdFilterGt.java:256)
at org.snpsift.SnpSiftCmdFilterGt.run(SnpSiftCmdFilterGt.java:284)
at org.snpsift.SnpSiftCmdFilterGt.run(SnpSiftCmdFilterGt.java:269)
at org.snpsift.SnpSift.run(SnpSift.java:579)
at org.snpsift.SnpSift.main(SnpSift.java:75)
SnpSift FilterGt -gv ./. ( DP<7 ) & (isHet())
Hi, I'm trying to use
gtfilter
(orFilter GT
) module to set individual genotype calls to missing ("."
) if they match a certain criteria. I managed to do so when filtering based on a minimum depth with:However, when I try to also check if the individual genotype is Heterozygote then it fails with an error:
How do I tell
gtfilter
to check the genotype?Thanks, Ido