Ordering samples with SelectVariants and VariantsToTable

Hello GATK team,

Given a sample.txt file to be used with -sf flag, and sample names given on each line, is there an option in SelectVariants and/or VariantsToTable that allows output to be ordered as specified?

sample.txt file:
Ind1
Ind4
Ind2
Ind3

desired sample fields in .vcf file:
Ind1 Ind4 Ind2 Ind3

This can be done with command line tools, but thought I would ask here first. Thanks!

Issue · Github
by Sheila

Issue Number
1124
State
closed
Last Updated
Closed By
vdauwera

Best Answer

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @o_O
    Hi,

    Unfortunately, it seems like the output is in numerical order and there is no option to override that. Let me see if I can put in a feature request.

    -Sheila

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @o_O
    Hi,

    This feature has been turned down by the developers. They would prefer to have a universally consistent rule for ordering. You can either write scripts that are not order-sensitive, or convert to a specific order using some other solution. It seems like you already know how to do that, so it should not be a problem.

    -Sheila

  • o_Oo_O Member

    Thank you, Sheila. Is there an option to keep the columns as is (i.e., not re-ordered) in my vcf when using VariantsToTable? Thanks!

Sign In or Register to comment.