Skip to content

Commit

Permalink
analysis: remove unused parameter 'relatedness method', #TASK-5282, #…
Browse files Browse the repository at this point in the history
…TASK-5282

On branch TASK-5278
Changes to be committed:
	modified:   opencga-analysis/src/main/java/org/opencb/opencga/analysis/family/qc/FamilyQcLocalAnalysisExecutor.java
	modified:   opencga-analysis/src/main/java/org/opencb/opencga/analysis/family/qc/IBDComputation.java
	modified:   opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/VariantCommandOptions.java
	modified:   opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java
	modified:   opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/FamilyQcAnalysisExecutor.java
  • Loading branch information
jtarraga committed Jun 13, 2024
1 parent 8da3dea commit a222469
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ private void runRelatedness() throws ToolException {

if (CollectionUtils.isNotEmpty(qualityControl.getRelatedness())) {
for (RelatednessReport relatedness : qualityControl.getRelatedness()) {
if (relatednessMethod.equals(relatedness.getMethod()) && relatednessMaf.equals(relatedness.getMaf())) {
if (IBDComputation.PLINK_IBD_METHOD.equals(relatedness.getMethod()) && relatednessMaf.equals(relatedness.getMaf())) {
// Nothing to update
addWarning("Skipping relatedness analysis: it was already computed for method '" + relatednessMethod + "' and MAF '"
+ relatednessMaf + "'");
addWarning("Skipping relatedness analysis: it was already computed for method '" + IBDComputation.PLINK_IBD_METHOD
+ "' and MAF '" + relatednessMaf + "'");
qualityControl = null;
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public class IBDComputation {
private static final String FREQ_FILENAME = BASENAME + ".frq";
private static final String PRUNE_IN_FILENAME = BASENAME + ".prune.in";

public static final String PLINK_IBD_METHOD = "PLINK/IBD";

public static RelatednessReport compute(String study, Family family, List<String> samples, String maf, String haploidCallMode,
Map<String, Map<String, Float>> thresholds, Path resourcesPath, Path outDir,
VariantStorageManager storageManager, String token) throws ToolException {
Expand Down Expand Up @@ -142,7 +144,7 @@ public static RelatednessReport compute(String study, Family family, List<String
}

RelatednessReport relatedness = new RelatednessReport()
.setMethod("PLINK/IBD")
.setMethod(PLINK_IBD_METHOD)
.setMaf(maf)
.setHaploidCallMode(haploidCallMode)
.setScores(parseRelatednessScores(outFile, family, thresholds));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1587,9 +1587,6 @@ public class FamilyQcCommandOptions {
@Parameter(names = {"--family"}, description = "Family ID.", required = true)
public String family;

@Parameter(names = {"--relatedness-method"}, description = "Method to compute relatedness.")
public String relatednessMethod = "PLINK/IBD";

@Parameter(names = {"--relatedness-maf"}, description = "Minor allele frequency to filter variants, e.g.: 1kg_phase3:CEU>0.35,"
+ " cohort:ALL>0.05")
public String relatednessMaf = "cohort:ALL>0.05";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,6 @@ public class ParamConstants {
public static final String ANALYSIS_VARIANT_RELATEDNESS_RUN_METHOD = "The body web service method parameter";
public static final String ANALYSIS_VARIANT_RELATEDNESS_RUN_OUTDIR = "The body web service outdir parameter";
public static final String ANALYSIS_VARIANT_FAMILY_QC_RUN_FAMILY = "The body web service family parameter";
public static final String ANALYSIS_VARIANT_FAMILY_QC_RUN_RELATEDNESSMETHOD = "The body web service relatednessMethod parameter";
public static final String ANALYSIS_VARIANT_FAMILY_QC_RUN_RELATEDNESSMAF = "The body web service relatednessMaf parameter";
public static final String ANALYSIS_VARIANT_FAMILY_QC_RUN_OUTDIR = "The body web service outdir parameter";
public static final String ANALYSIS_VARIANT_INDIVIDUAL_QC_RUN_INDIVIDUAL = "The body web service individual parameter";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public enum QcType {

protected String studyId;
protected Family family;
protected String relatednessMethod;
protected String relatednessMaf;
protected String haploidCallMode;
protected Map<String, Map<String, Float>> relatednessThresholds;
Expand Down Expand Up @@ -62,15 +61,6 @@ public FamilyQcAnalysisExecutor setFamily(Family family) {
return this;
}

public String getRelatednessMethod() {
return relatednessMethod;
}

public FamilyQcAnalysisExecutor setRelatednessMethod(String relatednessMethod) {
this.relatednessMethod = relatednessMethod;
return this;
}

public String getRelatednessMaf() {
return relatednessMaf;
}
Expand Down

0 comments on commit a222469

Please sign in to comment.