Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectVariants use a GATKPathSpecifier for output #5870

Merged
merged 1 commit into from
Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ public final SAMFileGATKReadWriter createSAMWriter(final Path outputPath, final

/**
* Creates a VariantContextWriter whose outputFile type is determined by
* the outPathName's extension, using the best available sequence dictionary for
* the vcfOutput's extension, using the best available sequence dictionary for
* this tool, and default index, leniency and md5 generation settings.
*
* Deprecated, use {@link #createVCFWriter(Path)} instead.
Expand All @@ -790,7 +790,7 @@ public VariantContextWriter createVCFWriter(final File outFile) {

/**
* Creates a VariantContextWriter whose outputFile type is determined by
* outPath's extension, using the best available sequence dictionary for
* vcfOutput's extension, using the best available sequence dictionary for
* this tool, and default index, leniency and md5 generation settings.
*
* @param outPath output Path for this writer. May not be null.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import org.broadinstitute.barclay.argparser.Hidden;
import org.broadinstitute.barclay.help.DocumentedFeature;
import org.broadinstitute.hellbender.cmdline.StandardArgumentDefinitions;
import org.broadinstitute.hellbender.engine.GATKPathSpecifier;
import org.broadinstitute.hellbender.engine.filters.*;
import org.broadinstitute.hellbender.utils.io.IOUtils;
import picard.cmdline.programgroups.VariantManipulationProgramGroup;
import org.broadinstitute.hellbender.engine.FeatureInput;
import org.broadinstitute.hellbender.engine.FeatureContext;
Expand Down Expand Up @@ -137,7 +137,7 @@ public final class SelectVariants extends VariantWalker {
@Argument(fullName = StandardArgumentDefinitions.OUTPUT_LONG_NAME,
shortName = StandardArgumentDefinitions.OUTPUT_SHORT_NAME,
doc="Path to which variants should be written")
public String outPathName = null;
public GATKPathSpecifier vcfOutput = null;

/**
* This argument can be specified multiple times in order to provide multiple sample names, or to specify
Expand Down Expand Up @@ -525,7 +525,7 @@ public void onTraversalStart() {
}
}

final Path outPath = IOUtils.getPath(outPathName);
final Path outPath = vcfOutput.toPath();
vcfWriter = createVCFWriter(outPath);
vcfWriter.writeHeader(new VCFHeader(actualLines, samples));
}
Expand Down