diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/RelatednessReport.java b/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/RelatednessReport.java index 404546c3..d96bbaef 100644 --- a/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/RelatednessReport.java +++ b/biodata-models/src/main/java/org/opencb/biodata/models/clinical/qc/RelatednessReport.java @@ -27,6 +27,11 @@ public class RelatednessReport { + public static final String HAPLOID_CALL_MODE_HAPLOID_VALUE = "haploid"; + public static final String HAPLOID_CALL_MODE_MISSING_VALUE = "missing"; + public static final String HAPLOID_CALL_MODE_REF_VALUE = "reference"; + public static final String HAPLOID_CALL_MODE_DEFAUT_VALUE = HAPLOID_CALL_MODE_HAPLOID_VALUE; + // Method., e.g.: Plink/IBD @DataField(id = "method", description = FieldConstants.RELATEDNESS_REPORT_METHOD_DESCRIPTION) @@ -37,6 +42,11 @@ public class RelatednessReport { description = FieldConstants.RELATEDNESS_REPORT_MAF_DESCRIPTION) private String maf; + // Haploid call mode, i.e., the PLINK/IBD parameter: vcf-half-call + @DataField(id = "haploidCallMode", + description = FieldConstants.RELATEDNESS_REPORT_HAPLOID_CALL_MODE_DESCRIPTION) + private String haploidCallMode; + // Relatedness scores for pair of samples @DataField(id = "scores", uncommentedClasses = {"RelatednessScore"}, description = FieldConstants.RELATEDNESS_REPORT_SCORES_DESCRIPTION) @@ -47,12 +57,13 @@ public class RelatednessReport { private List files; public RelatednessReport() { - this("PLINK/IBD", "cohort:ALL>0.05", new ArrayList<>(), new ArrayList<>()); + this("PLINK/IBD", "cohort:ALL>0.05", HAPLOID_CALL_MODE_DEFAUT_VALUE, new ArrayList<>(), new ArrayList<>()); } - public RelatednessReport(String method, String maf, List scores, List files) { + public RelatednessReport(String method, String maf, String haploidCallMode, List scores, List files) { this.method = method; this.maf = maf; + this.haploidCallMode = haploidCallMode; this.scores = scores; this.files = files; } @@ -62,6 +73,7 @@ public String toString() { final StringBuilder sb = new StringBuilder("RelatednessReport{"); sb.append("method='").append(method).append('\''); sb.append(", maf='").append(maf).append('\''); + sb.append(", haploidCallMode='").append(haploidCallMode).append('\''); sb.append(", scores=").append(scores); sb.append(", files=").append(files); sb.append('}'); @@ -86,6 +98,15 @@ public RelatednessReport setMaf(String maf) { return this; } + public String getHaploidCallMode() { + return haploidCallMode; + } + + public RelatednessReport setHaploidCallMode(String haploidCallMode) { + this.haploidCallMode = haploidCallMode; + return this; + } + public List getScores() { return scores; } diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/constants/FieldConstants.java b/biodata-models/src/main/java/org/opencb/biodata/models/constants/FieldConstants.java index 4171448f..47e34220 100644 --- a/biodata-models/src/main/java/org/opencb/biodata/models/constants/FieldConstants.java +++ b/biodata-models/src/main/java/org/opencb/biodata/models/constants/FieldConstants.java @@ -1,5 +1,7 @@ package org.opencb.biodata.models.constants; +import org.opencb.biodata.models.clinical.qc.RelatednessReport; + public class FieldConstants { public static final String PHENOTYPE_AGE_OF_ON_SET = "Indicates the age of on set of the phenotype"; public static final String PHENOTYPE_STATUS = "Status of phenotype OBSERVED, NOT_OBSERVED, UNKNOWN"; @@ -55,7 +57,11 @@ public class FieldConstants { public static final String CLINICAL_CONFIDENCE_DATE_DESCRIPTION = "Date of the clinical confidence"; public static final String CLINICAL_CONFIDENCE_VALUE_DESCRIPTION = "Date of the clinical confidence"; - public static final String RELATEDNESS_REPORT_MAF_DESCRIPTION = "Minor allele frequency to filter variants, e.g.: 1kg_phase3:CEU>0.35, cohort:ALL>0.05"; + public static final String RELATEDNESS_REPORT_MAF_DESCRIPTION = "Minor allele frequency to filter variants, e.g.: 1kg_phase3:CEU>0.35," + + " cohort:ALL>0.05"; + public static final String RELATEDNESS_REPORT_HAPLOID_CALL_MODE_DESCRIPTION = "Haploid call mode, equivalent to the PLINK/IBD parameter" + + " vcf-half-call, accepts the following values: " + RelatednessReport.HAPLOID_CALL_MODE_DEFAUT_VALUE + ", " + + RelatednessReport.HAPLOID_CALL_MODE_MISSING_VALUE + " and " + RelatednessReport.HAPLOID_CALL_MODE_REF_VALUE; public static final String RELATEDNESS_REPORT_SCORES_DESCRIPTION = "Relatedness scores for pair of samples"; public static final String RELATEDNESS_REPORT_FILES_DESCRIPTION = "List of files of Relatedness Report"; @@ -67,7 +73,8 @@ public class FieldConstants { public static final String AUDIT_MESSAGE_DESCRIPTION = "Audit message"; public static final String AUDIT_ACTION_DESCRIPTION = "Enum action that can have the values " + " CREATE_CLINICAL_ANALYSIS, CREATE_INTERPRETATION, UPDATE_CLINICAL_ANALYSIS, DELETE_CLINICAL_ANALYSIS," - + " UPDATE_INTERPRETATION, REVERT_INTERPRETATION, CLEAR_INTERPRETATION, MERGE_INTERPRETATION, SWAP_INTERPRETATION and DELETE_INTERPRETATION"; + + " UPDATE_INTERPRETATION, REVERT_INTERPRETATION, CLEAR_INTERPRETATION, MERGE_INTERPRETATION, SWAP_INTERPRETATION and" + + " DELETE_INTERPRETATION"; public static final String AUDIT_DATE_DESCRIPTION = "Date of the audit"; public static final String SOFTWARE_NAME = "Software name"; @@ -76,5 +83,5 @@ public class FieldConstants { public static final String SOFTWARE_COMMIT = "Software commit"; public static final String SOFTWARE_WEBSITE = "Software website"; public static final String SOFTWARE_PARAMS = "Software params"; - + } \ No newline at end of file