Package picard.arrays

Class CombineGenotypingArrayVcfs


  • @DocumentedFeature
    public class CombineGenotypingArrayVcfs
    extends CommandLineProgram
    A simple program to combine multiple genotyping array VCFs into one VCF The input VCFs must have the same sequence dictionary and same list of variant loci. The input files must not share sample Ids. The input files must have the same contig lists. Throws IllegalArgumentException if the contig lists are not present in the input files, or are not identical this class uses the GATK to merge headers, which may throw exceptions if the headers cannot be merged. See VCFUtils.smartMergeHeaders for details.

    An index file is created for the output file by default. Using an output file name with a ".gz" extension will create gzip-compressed output. Note that this tool is written to handle a use case not supported by MergeVcfs (merging multiple VCFs, each for a different sample). Note also that this tool is similar intent to the GATK tool CombineVariants (which is in GATK3, but not in 4). There are some array-specific features in this tool that probably could be generalized in CombineVariants when/if that is installed in GATK4.

    • Field Detail

      • INPUT

        @Argument(shortName="I",
                  doc="Input VCF file(s).")
        public List<File> INPUT
      • OUTPUT

        @Argument(shortName="O",
                  doc="Output VCF file.")
        public File OUTPUT
    • Constructor Detail

      • CombineGenotypingArrayVcfs

        public CombineGenotypingArrayVcfs()
    • Method Detail

      • doWork

        public int doWork()
        Description copied from class: CommandLineProgram
        Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.
        Specified by:
        doWork in class CommandLineProgram
        Returns:
        program exit status.
      • merge

        public static htsjdk.variant.variantcontext.VariantContext merge​(List<htsjdk.variant.variantcontext.VariantContext> variantContexts)
        Merges multiple VariantContexts all for the same locus into a single hybrid.
        Parameters:
        variantContexts - list of VCs
        Returns:
        new VariantContext representing the merge of variantContexts