Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

about JEXL and replacing in SelectVariants()

BogdanBogdan Palo Alto, CAMember ✭✭

Dear all, good afternoon. I would appreciate please an insight on the following : I am using SelectVariants to select the HETEROZYG and it is working :

$GATK \
-T SelectVariants \
-R $REFERENCE_HG38_MALE \
-select 'vc.getGenotype("040_7G").isHet()' \
-V 7G.GRCh38p5M.MD_samtools.germline.HETERO.chr19.vcf \
-o 7G.GRCh38p5M.MD_samtools.germline.HETERO.chr19.vcf.HET2.vcf

As the name of the sample (in the FORMAT field) is "040_7G", would like to change the NAME of the SAMPLE in vc.getGenotype("040_7G") with a VARIABLE called SAMPLE. How shall I do that :

SAMPLE="\"040_7G\"" and -select 'vc.getGenotype("${SAMPLE}").isHet()' does not really work ... Thank you, and happy Easter !

Answers

Sign In or Register to comment.