Skip to content

Commit

Permalink
respond to review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
yfarjoun committed Feb 11, 2025
1 parent d54015b commit 0b38737
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/main/java/picard/fingerprint/ExtractFingerprint.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import htsjdk.samtools.util.IOUtil;
import htsjdk.samtools.util.Log;
import org.broadinstitute.barclay.argparser.Advanced;
import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.barclay.argparser.CommandLineProgramProperties;
import org.broadinstitute.barclay.argparser.Hidden;
Expand Down Expand Up @@ -83,9 +84,9 @@ public class ExtractFingerprint extends CommandLineProgram {
public boolean TEST_INPUT_READABILITY = true;


@Hidden
@Argument(doc = "When false, code will extract variants for every snp in the haplotype database, not only the representative one.")
public boolean EXTRACT_REPRESENTATIVES_ONLY = true;
@Advanced
@Argument(doc = "When true, code will extract variants for every snp in the haplotype database, not only the representative one.")
public boolean EXTRACT_NON_REPRESENTATIVES_TOO = false;

@Override
protected boolean requiresReference() {
Expand Down Expand Up @@ -139,7 +140,7 @@ protected int doWork() {

try {
FingerprintUtils.writeFingerPrint(soleEntry.getValue(), OUTPUT, referenceSequence.getReferenceFile(),
sampleToUse, "PLs derived from " + INPUT + " using an assumed contamination of " + this.CONTAMINATION, EXTRACT_REPRESENTATIVES_ONLY);
sampleToUse, "PLs derived from " + INPUT + " using an assumed contamination of " + this.CONTAMINATION, !EXTRACT_NON_REPRESENTATIVES_TOO);
} catch (Exception e) {
log.error(e);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/picard/fingerprint/FingerprintUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ public static VariantContextSet createVCSetFromFingerprint(final Fingerprint fin
static Stream<VariantContext> getVariantContext(final ReferenceSequenceFile reference,
final String sample,
final HaplotypeProbabilities haplotypeProbabilities,
final boolean representative_only) {
if (representative_only) {
final boolean representativeOnly) {
if (representativeOnly) {
return Stream.of(getVariantContextFromSnp(reference, sample, haplotypeProbabilities, haplotypeProbabilities.getRepresentativeSnp()));
} else {
return haplotypeProbabilities.getHaplotype().getSnps().stream().map(snp -> getVariantContextFromSnp(reference, sample, haplotypeProbabilities, snp));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ void testCanHandleDeepData(final HaplotypeProbabilitiesFromSequence hp, final in
}
}


@DataProvider()
Object[][] mergeIsSafeProvider() {
final HaplotypeProbabilitiesFromSequence hp1 = new HaplotypeProbabilitiesFromSequence(hb);
Expand Down

0 comments on commit 0b38737

Please sign in to comment.