Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelklee committed Mar 30, 2020
1 parent a85d13f commit 6f78819
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,26 @@ public static class NaiveHeterozygousPileupGenotypingResult {
private final AllelicCountCollection hetAllelicCounts;
private final AllelicCountCollection hetNormalAllelicCounts;


/**
* @param hetNormalAllelicCounts {@code null}, if result generated in case-only mode
*/
NaiveHeterozygousPileupGenotypingResult(final AllelicCountCollection hetAllelicCounts,
final AllelicCountCollection hetNormalAllelicCounts) {
this.hetAllelicCounts = Utils.nonNull(hetAllelicCounts);
this.hetNormalAllelicCounts = hetNormalAllelicCounts;
if (hetNormalAllelicCounts != null) {
Utils.validateArg(hetAllelicCounts.getIntervals().equals(hetNormalAllelicCounts.getIntervals()),
"Allelic-count sites in NaiveHeterozygousPileupGenotypingResult must match across case and matched-normal samples.");
}
}

public AllelicCountCollection getHetAllelicCounts() {
return hetAllelicCounts;
}

/**
* @return {@code null}, if result generated in case-only mode
*/
public AllelicCountCollection getHetNormalAllelicCounts() {
return hetNormalAllelicCounts;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.broadinstitute.hellbender.tools.copynumber;

import org.broadinstitute.hellbender.CommandLineProgramTest;
import org.broadinstitute.hellbender.cmdline.StandardArgumentDefinitions;
import org.broadinstitute.hellbender.exceptions.UserException;
import org.broadinstitute.hellbender.testutils.ArgumentsBuilder;
import org.broadinstitute.hellbender.tools.copynumber.arguments.CopyNumberArgumentValidationUtils;
Expand All @@ -26,17 +27,21 @@
*/
public final class ModelSegmentsIntegrationTest extends CommandLineProgramTest {
private static final File TEST_SUB_DIR = new File(toolsTestDir, "copynumber");
private static final File TUMOR_DENOISED_COPY_RATIOS_FILE = new File(TEST_SUB_DIR,
"model-segments-wes-tumor-denoised-copy-ratios-SM-74P4M-v1-chr20-downsampled.deduplicated.denoisedCR.tsv");
private static final File TUMOR_ALLELIC_COUNTS_FILE = new File(TEST_SUB_DIR,
"model-segments-wes-tumor-allelic-counts-SM-74P4M-v1-chr20-downsampled.deduplicated.allelicCounts.tsv");
private static final File NORMAL_ALLELIC_COUNTS_FILE = new File(TEST_SUB_DIR,
"model-segments-wes-normal-allelic-counts-SM-74NEG-v1-chr20-downsampled.deduplicated.allelicCounts.tsv");
// private static final File TUMOR_DENOISED_COPY_RATIOS_FILE = new File(TEST_SUB_DIR,
// "model-segments-wes-tumor-denoised-copy-ratios-SM-74P4M-v1-chr20-downsampled.deduplicated.denoisedCR.tsv");
// private static final File TUMOR_ALLELIC_COUNTS_FILE = new File(TEST_SUB_DIR,
// "model-segments-wes-tumor-allelic-counts-SM-74P4M-v1-chr20-downsampled.deduplicated.allelicCounts.tsv");
// private static final File NORMAL_ALLELIC_COUNTS_FILE = new File(TEST_SUB_DIR,
// "model-segments-wes-normal-allelic-counts-SM-74NEG-v1-chr20-downsampled.deduplicated.allelicCounts.tsv");
private static final File TUMOR_DENOISED_COPY_RATIOS_WITH_SAMPLE_NAME_MISMATCH_FILE = new File(TEST_SUB_DIR,
"model-segments-wes-tumor-denoised-copy-ratios-with-sample-name-mismatch.denoisedCR.tsv");
private static final File NORMAL_ALLELIC_COUNTS_FILE_WITH_MISSING_SITES = new File(TEST_SUB_DIR,
"model-segments-wes-normal-allelic-counts-with-missing-sites.allelicCounts.tsv");

private static final File TUMOR_DENOISED_COPY_RATIOS_FILE = new File("/home/slee/working/germline-tagging/REBC-AC9B/chr13.REBC-AC9B-TTP1-A-1-1-D-A525-36.denoisedCR.tsv");
private static final File TUMOR_ALLELIC_COUNTS_FILE = new File("/home/slee/working/germline-tagging/REBC-AC9B/chr13.REBC-AC9B-TTP1-A-1-1-D-A525-36.allelicCounts.tsv");
private static final File NORMAL_ALLELIC_COUNTS_FILE = new File("/home/slee/working/germline-tagging/REBC-AC9B/chr13.REBC-AC9B-NB1-A-1-0-D-A553-36.allelicCounts.tsv");

private static final SampleLocatableMetadata EXPECTED_METADATA = new CopyRatioCollection(TUMOR_DENOISED_COPY_RATIOS_FILE).getMetadata();

@Test
Expand All @@ -48,6 +53,7 @@ public void testAllInputsAvailable() {
.add(CopyNumberStandardArgument.ALLELIC_COUNTS_FILE_LONG_NAME, TUMOR_ALLELIC_COUNTS_FILE.getAbsolutePath())
.add(CopyNumberStandardArgument.NORMAL_ALLELIC_COUNTS_FILE_LONG_NAME, NORMAL_ALLELIC_COUNTS_FILE.getAbsolutePath())
.addOutput(outputDir)
.add(StandardArgumentDefinitions.VERBOSITY_NAME, "INFO")
.add(CopyNumberStandardArgument.OUTPUT_PREFIX_LONG_NAME, outputPrefix);
runCommandLine(argsBuilder);
assertOutputFiles(outputDir, outputPrefix, true, true);
Expand Down

0 comments on commit 6f78819

Please sign in to comment.