I would like to pipe the std output of a program to GATK as std input. Is this possible?
Yes you can, but you'll need to turn off logging with -l OFF.
Thank you for the prompt reply. I mainly use VariantsToVCF and I want to use pipe with GATK. What is the command line?
cat input.hapmap | java -Xmx2g -jar GenomeAnalysisTK.jar -R ref.fasta -T VariantsToVCF -o output.vcf --variant:RawHapMap --dbsnp dbsnp.vcf
The above will fail with the message:
MESSAGE: Invalid command line: Failed to parse value null for argument variants. Message: null
Ah, that's my bad. I thought we supported this but apparently this functionality was never completed because of issues with the file indices. So at the moment the answer is sadly no. You can still pipe out of GATK, but not in, sorry.
I see. Is supporting stdin on the development roadmap?
Not at this time, no, sorry.
When we run a GATK tool using command line arguments they go to the main method of CommandLine GATK class.And the further processing is done based on the command.In such cases GATK supports stdin.Does stdin means commandline arguments ?Or Is it something different please clarify?
Yes, stdin is the way the command line arguments are input. What the original commenter was asking was whether it is possible to provide input data to GATK via stdin, but that is not possible. Only the command line arguments can be input to GATK via stdin.
Thanks for the prompt response.