To celebrate the release of GATK 4.0, we are giving away free credits for running the GATK4 Best Practices pipelines in FireCloud, our secure online analysis portal. It’s first come first serve, so sign up now to claim your free credits worth $250. Sponsored by Google Cloud. Learn more at

SelectVariants is not recognizing a sample by name

juandencisojuandenciso BogotaMember
edited March 2017 in Ask the GATK team

Hi, I'm having a strange error when using the SelectVariants tool; when I try to extract one sample from a multi sample vcf (which I'm sure includes the sample) I get the following error message:

###### ERROR MESSAGE: Bad input: Samples entered on command line (through -sf or -sn) that are not present in the VCF.

I also have an individual .g.vcf for this sample and when trying to extract it from this file, same error.

Here is the command line I used to perform the last test I mentioned:

java -Xmx2g -jar /path/to/GATK/GenomeAnalysisTK.jar -T SelectVariants -R /path/to/reference.fasta -V 2076.raw.snps.indels.g.vcf -o try_2076_sample.vcf -sn HC.2076

When checking the #CHROM line for this .g.vcf file I get the following:

grep CHROM 2076.raw.snps.indels.g.vcf

So there's the sample and it still fails to detect it.



  • juandencisojuandenciso BogotaMember
    edited March 2017

    Forgot to mention that I'm using the 3.7 version of GATK and 1.8.0_121 version of java

  • SheilaSheila Broad InstituteMember, Broadie, Moderator


    I think someone else reported something similar recently. However, I have not been able to replicate the issue. The same command you ran works fine on my own test data. Would you be able to share some data with us? If so, instructions are here.


  • BegaliBegali GermanyMember


    Hi I also have same issue but it give me solution to avoid this error by setting --ALLOW_NONOVERLAPPING_COMMAND_@Sheila

    I didi but there is warring that WARN 18:00:46,251 SelectVariants - Samples present on command line input that are not present in the VCF. These samples will be ignored. thanks in advance


  • SheilaSheila Broad InstituteMember, Broadie, Moderator


    Can you please post the exact command you ran and the version you are using? Please also post the input VCF header which shows the samples in the VCF.


Sign In or Register to comment.