Commit 9238648a authored by Guillaume Jimenez's avatar Guillaume Jimenez
Browse files

Fixed some thresholds

parent 0e7982e1
......@@ -73,6 +73,7 @@ public class DataTableFilter {
sampleDetailsDnaFieldToColumnName.put("meanInsert", "rdal.mean_insert");
sampleDetailsDnaFieldToColumnName.put("stdInsert", "rdal.std_insert");
sampleDetailsDnaFieldToColumnName.put("dedupAvgDepth", "rdal.dedup_avg_depth");
sampleDetailsDnaFieldToColumnName.put("rawAvgDepth", "rdal.all_avg_depth");
sampleDetailsDnaFieldToColumnName.put("dedupMedianDepth", "rdal.dedup_median_depth");
sampleDetailsDnaFieldToColumnName.put("pctOver100X", "rdal.perc_100X");
//Somatic
......
......@@ -28,7 +28,8 @@ public class QualityMetricsField {
public static final String DNA_T_ALIGN_MAP_READ = "Tumor Align Map Reads";
public static final String DNA_ON_TARGET = "On Target";
public static final String CONCORDANCE = "Concordance";
public static final String DNA_AVG_DEPTH = "Avg Depth";
public static final String DNA_T_AVG_DEPTH = "Tumor Avg Depth";
public static final String DNA_N_AVG_DEPTH = "Normal Avg Depth";
public static final String DNA_PCT_OVER_100X = "Pct Over 100X";
public static final String CONTROL_SN_SNP = "Sensitivity SNP";
public static final String CONTROL_SN_INDEL = "Sensitivity Indel";
......@@ -50,7 +51,8 @@ public class QualityMetricsField {
DNA_FIELDS.add(new QualityMetricsField(DNA_N_ALIGN_MAP_READ));
DNA_FIELDS.add(new QualityMetricsField(DNA_T_ALIGN_MAP_READ));
DNA_FIELDS.add(new QualityMetricsField(DNA_ON_TARGET));
DNA_FIELDS.add(new QualityMetricsField(DNA_AVG_DEPTH));
DNA_FIELDS.add(new QualityMetricsField(DNA_T_AVG_DEPTH));
DNA_FIELDS.add(new QualityMetricsField(DNA_N_AVG_DEPTH));
DNA_FIELDS.add(new QualityMetricsField(DNA_PCT_OVER_100X));
RNA_FIELDS.add(new QualityMetricsField(RNA_EXTRACT_YIELD));
......
......@@ -66,13 +66,19 @@ public class MonthlyDnaAlignmentTableSummary extends Summary<MonthlyAlignmentTab
headers.add(onTarget);
headers.add(new Header(new String[] {"Mean", "Map Q"}, "meanMapQ"));
headers.add(new Header(new String[] {"Mean", "Insert Size"}, "meanInsert", Units.NB));
Header avgDepth = new Header(new String[] {"Avg", "Depth"}, "avgDepthValue", Units.NB, new ToolTip("PASS > 500X"), true);
avgDepth.setWidth("120px");
headers.add(avgDepth);
Header uniqAvgDepth = new Header(new String[] {"Unique Avg", "Depth"}, "dedupAvgDepth", Units.NB);
uniqAvgDepth.setWidth("120px");
headers.add(uniqAvgDepth);
Header rawAvgDepth = new Header(new String[] {"Raw Avg", "Depth"}, "rawAvgDepthValue", Units.NB, new ToolTip("PASS T > 500X, PASS N > 100X"), true);
rawAvgDepth.setWidth("120px");
headers.add(rawAvgDepth);
headers.add(new Header(new String[] {"Median", "Depth"}, "medianDepth", Units.NB));
Header pctOver100X = new Header(new String[] {"Pct Over", "100X"}, "pctOver100XValue", Units.PCT, new ToolTip("PASS > 90%"), true);
pctOver100X.setWidth("140px");
headers.add(pctOver100X);
Header dedupPctOver100X = new Header(new String[] {"Dedup Pct Over", "100X"}, "dedupPctOver100X", Units.PCT);
dedupPctOver100X.setWidth("140px");
headers.add(dedupPctOver100X);
Header rawPctOver100X = new Header(new String[] {"Raw Pct Over", "100X"}, "rawPctOver100XValue", Units.PCT, new ToolTip("PASS T > 90%, PASS N > 50%"), true);
rawPctOver100X.setWidth("140px");
headers.add(rawPctOver100X);
Header pctDups = new Header(new String[] {"Pct", "Dups"}, "pctDups", Units.PCT);
pctDups.setWidth("80px");
headers.add(pctDups);
......
......@@ -129,11 +129,11 @@ public class OrderDetailsSummary {
alignHeaders.add(new Header(new String[] {"On", "Target"}, "pctOnTargetValue", Units.PCT, new ToolTip("PASS > 40%"), true));
alignHeaders.add(new Header(new String[] {"Mean", "Map Q"}, "meanMapQ"));
alignHeaders.add(new Header(new String[] {"Mean", "Insert Size"}, "meanInsert", Units.NB));
alignHeaders.add(new Header(new String[] {"Dedup Avg", "Depth"}, "dedupAvgDepthValue", Units.NB, new ToolTip("PASS > 500X"), true));
alignHeaders.add(new Header(new String[] {"Raw Avg", "Depth"}, "rawAvgDepthValue", Units.NB, new ToolTip("PASS > 500X"), true));
alignHeaders.add(new Header(new String[] {"Dedup Avg", "Depth"}, "dedupAvgDepth", Units.NB));
alignHeaders.add(new Header(new String[] {"Raw Avg", "Depth"}, "rawAvgDepthValue", Units.NB, new ToolTip("PASS T > 500X, PASS N > 100X"), true));
alignHeaders.add(new Header(new String[] {"Dedup Median", "Depth"}, "dedupMedianDepth", Units.NB));
alignHeaders.add(new Header(new String[] {"Raw Median", "Depth"}, "rawMedianDepth", Units.NB));
alignHeaders.add(new Header(new String[] {"Dedup Pct Over", "100X"}, "dedupPctOver100XValue", Units.PCT, new ToolTip("PASS > 90%"), true));
alignHeaders.add(new Header(new String[] {"Dedup Pct Over", "100X"}, "dedupPctOver100", Units.PCT));
alignHeaders.add(new Header(new String[] {"Raw Pct Over", "100X"}, "rawPctOver100XValue", Units.PCT, new ToolTip("PASS > 90%"), true));
alignHeaders.add(new Header(new String[] {"Pct", "Dups"}, "pctDups", Units.PCT));
......
......@@ -86,16 +86,24 @@ public class SampleDetailsTableSummary extends Summary<SampleDetailsTable>{
if (mst.getPctOnTarget() != null) {
mst.pctOnTargetValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_ON_TARGET), "pctOnTargetValue", mst.getPctOnTarget());
}
if (mst.getDedupAvgDepth() != null) {
if ("Tumor".equals(mst.gettClass())) {
mst.dedupAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_AVG_DEPTH), "dedupAvgDepthValue", mst.getDedupAvgDepth());
if (mst.getRawAvgDepth() != null) {
if ("Tumor".equals(mst.gettClass()) && !mst.getSubjectAcc().equals("GM12878")) {
mst.rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_T_AVG_DEPTH), "rawAvgDepthValue", mst.getRawAvgDepth());
}
else {
mst.dedupAvgDepthValue = new PassableValue("dedupAvgDepthValue", mst.getDedupAvgDepth(), null); //no flag for Normal
mst.rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_N_AVG_DEPTH), "rawAvgDepthValue", mst.getRawAvgDepth());
}
}
if (mst.getDedupPctOver100X() != null) {
mst.dedupPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X), "dedupPctOver100XValue", mst.getDedupPctOver100X());
// if (mst.getDedupPctOver100X() != null) {
// mst.dedupPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X), "dedupPctOver100XValue", mst.getDedupPctOver100X());
// }
if (mst.getRawPctOver100X() != null) {
if ("Tumor".equals(mst.gettClass())) {
mst.rawPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X_T), "rawPctOver100XValue", mst.getRawPctOver100X());
}
else {
mst.rawPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X_N), "rawPctOver100XValue", mst.getRawPctOver100X());
}
}
if (mst.getConcordanceRate() != null) {
mst.concordanceRateValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.CONCORDANCE), "concordanceRateValue", mst.getConcordanceRate());
......@@ -443,31 +451,35 @@ public class SampleDetailsTableSummary extends Summary<SampleDetailsTable>{
meanInsert.setIsDna(true);
headers.add(meanInsert);
Header avgDepth = new Header(new String[] {"Unique", "Avg Depth"}, "dedupAvgDepthValue", Units.NB, new ToolTip("PASS > 500X"), true);
avgDepth.setWidth("120px");
avgDepth.setIsDna(true);
headers.add(avgDepth);
Header uniqAvgDepth = new Header(new String[] {"Unique", "Avg Depth"}, "dedupAvgDepth", Units.NB);
uniqAvgDepth.setWidth("120px");
uniqAvgDepth.setIsDna(true);
headers.add(uniqAvgDepth);
Header rawAvgDepth = new Header(new String[] {"Raw", "Avg Depth"}, "rawAvgDepthValue", Units.NB, new ToolTip("PASS T > 500X, PASS N > 100X"), true);
rawAvgDepth.setWidth("120px");
rawAvgDepth.setIsDna(true);
headers.add(rawAvgDepth);
Header medianDepth = new Header(new String[] {"Unique", "Median Depth"}, "dedupMedianDepth", Units.NB);
medianDepth.setIsDna(true);
headers.add(medianDepth);
Header allAvgDepth = new Header(new String[] {"All", "Avg Depth"}, "allAvgDepthValue", Units.NB, new ToolTip("PASS > 500X"), true);
allAvgDepth.setWidth("120px");
allAvgDepth.setIsDna(true);
allAvgDepth.setIsHidden(true);
headers.add(allAvgDepth);
Header allMedianDepth = new Header(new String[] {"All", "Median Depth"}, "allMedianDepth", Units.NB);
allMedianDepth.setIsDna(true);
allMedianDepth.setIsHidden(true);
headers.add(allMedianDepth);
Header pctOver100X = new Header(new String[] {"Unique Pct", "Over 100X"}, "dedupPctOver100XValue", Units.PCT, new ToolTip("PASS > 90%"), true);
Header pctOver100X = new Header(new String[] {"Unique Pct", "Over 100X"}, "dedupPctOver100X", Units.PCT);
pctOver100X.setIsDna(true);
pctOver100X.setWidth("140px");
headers.add(pctOver100X);
Header rawPctOver100X = new Header(new String[] {"Raw Pct", "Over 100X"}, "rawPctOver100XValue", Units.PCT, new ToolTip("PASS T > 90%. PASS N > 50%"), true);
rawPctOver100X.setIsDna(true);
rawPctOver100X.setWidth("140px");
headers.add(rawPctOver100X);
Header pctOver200X = new Header(new String[] {"Unique Pct", "Over 200X"}, "dedupPctOver200XValue", Units.PCT, new ToolTip("PASS > 90%"), true);
pctOver200X.setIsDna(true);
pctOver200X.setWidth("140px");
......
......@@ -383,7 +383,7 @@ public class ModelDAO {
.append(" rdal.perc_on_target as pctOnTarget, rdal.mean_map_q as meanMapQ, rdal.perc_qual_read as pctQualRead, ")
.append(" rdal.median_t_mismatch as medianTMismatch, rdal.indel_rate as indelRate, rdal.error_rate as errorRate, ")
.append(" rdal.unique_reads as uniqueReads, rdal.perc_dups as pctDups, rdal.median_insert as medianInsert, rdal.mean_insert as meanInsert, ")
.append(" rdal.std_insert as stdInsert, rdal.dedup_avg_depth as dedupAvgDepth, rdal.dedup_median_depth as dedupMedianDepth, rdal.dedup_perc_100X as dedupPctOver100X, ")
.append(" rdal.std_insert as stdInsert, rdal.dedup_avg_depth as dedupAvgDepth, rdal.all_avg_depth as rawAvgDepth, rdal.dedup_median_depth as dedupMedianDepth, rdal.dedup_perc_100X as dedupPctOver100X, rdal.perc_100X as rawPctOver100X, ")
.append(" rdal.dedup_perc_200X as dedupPctOver200X, rdal.dedup_perc_500X as dedupPctOver500X ")
.append(part2)
.append(" dna_extract_qc dna_ex, dna_lib_prep dna_lib, ")
......@@ -395,7 +395,7 @@ public class ModelDAO {
.append(" properlyPaired, pctOnTarget, meanMapQ, pctQualRead, ")
.append(" medianTMismatch, indelRate, errorRate, ")
.append(" uniqueReads, pctDups, medianInsert, meanInsert, " )
.append(" stdInsert, dedupAvgDepth, dedupMedianDepth, dedupPctOver100X, dedupPctOver200X, dedupPctOver500X ");
.append(" stdInsert, dedupAvgDepth, rawAvgDepth, dedupMedianDepth, dedupPctOver100X, rawPctOver100X, dedupPctOver200X, dedupPctOver500X ");
Query<SampleDetailsTable> query = sessionFactory.getCurrentSession().createNativeQuery(sql.toString());
query.setParameter("nucType", nucType).setParameter("monthMin", monthMin).setParameter("monthMax", monthMax);
......
......@@ -56,7 +56,8 @@ public class QualityMetricsDAO {
case QualityMetricsField.DNA_T_ALIGN_MAP_READ: return createSQLDnaTNAlignMapRead();
case QualityMetricsField.DNA_ON_TARGET: return createSQLDnaOnTarget();
case QualityMetricsField.CONCORDANCE: return createSQLConcordance();
case QualityMetricsField.DNA_AVG_DEPTH: return createSQLDnaAvgDepth();
case QualityMetricsField.DNA_T_AVG_DEPTH: return createSQLDnaTAvgDepth();
case QualityMetricsField.DNA_N_AVG_DEPTH: return createSQLDnaNAvgDepth();
case QualityMetricsField.DNA_PCT_OVER_100X: return createSQLDnaPctOver100X();
case QualityMetricsField.CONTROL_SN_SNP: return createSQLControlSnSNP();
case QualityMetricsField.CONTROL_SN_INDEL: return createSQLControlSnIndel();
......@@ -138,7 +139,7 @@ public class QualityMetricsDAO {
return sql;
}
private StringBuilder createSQLDnaAvgDepth() {
private StringBuilder createSQLDnaTAvgDepth() {
StringBuilder sql = new StringBuilder();
sql.append(" select run.run_date as 'date', dal.dedup_avg_depth as qmValue, sa.sample_lab_name as sampleName ")
.append(" , ifnull(al.file_owner, 'Unknown') as techName , sa.tissue_type as tissueType, sa.t_class as tClass ")
......@@ -150,7 +151,25 @@ public class QualityMetricsDAO {
.append(" and demux.seq_run_id = run.seq_run_id ")
.append(" and run.run_date is not null ")
.append(" and sa.subject_id = su.subject_id ")
.append(" and dal.dedup_avg_depth is not null ");
.append(" and dal.dedup_avg_depth is not null ")
.append(" and sa.t_class = 'Tumor' ");
return sql;
}
private StringBuilder createSQLDnaNAvgDepth() {
StringBuilder sql = new StringBuilder();
sql.append(" select run.run_date as 'date', dal.dedup_avg_depth as qmValue, sa.sample_lab_name as sampleName ")
.append(" , ifnull(al.file_owner, 'Unknown') as techName , sa.tissue_type as tissueType, sa.t_class as tClass ")
.append(" from sample sa, alignment al, dna_alignment dal ")
.append(" ,subject su, seq_run run, demultiplex demux ")
.append(" where sa.sample_id = al.sample_id ")
.append(" and dal.alignment_id = al.alignment_id ")
.append(" and demux.sample_id = sa.sample_id ")
.append(" and demux.seq_run_id = run.seq_run_id ")
.append(" and run.run_date is not null ")
.append(" and sa.subject_id = su.subject_id ")
.append(" and dal.dedup_avg_depth is not null ")
.append(" and sa.t_class = 'Normal' ");
return sql;
}
......@@ -417,7 +436,8 @@ public class QualityMetricsDAO {
case QualityMetricsField.DNA_T_ALIGN_MAP_READ: return Threshold.getThreshold(thresholds, Threshold.DNA_T_ALIGN_MAP_READ);
case QualityMetricsField.DNA_ON_TARGET: return Threshold.getThreshold(thresholds, Threshold.DNA_ON_TARGET);
case QualityMetricsField.CONCORDANCE: return Threshold.getThreshold(thresholds, Threshold.CONCORDANCE);
case QualityMetricsField.DNA_AVG_DEPTH: return Threshold.getThreshold(thresholds, Threshold.DNA_AVG_DEPTH);
case QualityMetricsField.DNA_T_AVG_DEPTH: return Threshold.getThreshold(thresholds, Threshold.DNA_T_AVG_DEPTH);
case QualityMetricsField.DNA_N_AVG_DEPTH: return Threshold.getThreshold(thresholds, Threshold.DNA_N_AVG_DEPTH);
case QualityMetricsField.DNA_PCT_OVER_100X: return Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X);
case QualityMetricsField.CONTROL_SN_SNP: return Threshold.getThreshold(thresholds, Threshold.CONTROL_SN_SNP);
case QualityMetricsField.CONTROL_SN_INDEL: return Threshold.getThreshold(thresholds, Threshold.CONTROL_SN_INDEL);
......@@ -481,7 +501,8 @@ public class QualityMetricsDAO {
case QualityMetricsField.DNA_T_ALIGN_MAP_READ : sql.append(getFullGroupBy());break;
case QualityMetricsField.DNA_PCT_OVER_100X : sql.append(getFullGroupBy());break;
case QualityMetricsField.DNA_ON_TARGET: sql.append(getFullGroupBy());break;
case QualityMetricsField.DNA_AVG_DEPTH: sql.append(getFullGroupBy());break;
case QualityMetricsField.DNA_T_AVG_DEPTH: sql.append(getFullGroupBy());break;
case QualityMetricsField.DNA_N_AVG_DEPTH: sql.append(getFullGroupBy());break;
case QualityMetricsField.RNA_ALIGN_MAP_READ: sql.append(getFullGroupBy());break;
case QualityMetricsField.CONCORDANCE: sql.append(getFullGroupBy());break;
}
......
......@@ -195,7 +195,7 @@ public class SampleDAO {
.append(" rdal.perc_on_target as pctOnTarget, rdal.mean_map_q as meanMapQ, rdal.perc_qual_read as pctQualRead, ")
.append(" rdal.median_t_mismatch as medianTMismatch, rdal.indel_rate as indelRate, rdal.error_rate as errorRate, ")
.append(" rdal.unique_reads as uniqueReads, rdal.perc_dups as pctDups, rdal.median_insert as medianInsert, rdal.mean_insert as meanInsert, ")
.append(" rdal.std_insert as stdInsert, rdal.dedup_avg_depth as dedupAvgDepth, rdal.dedup_median_depth as dedupMedianDepth, rdal.dedup_perc_100X as dedupPctOver100X, ")
.append(" rdal.std_insert as stdInsert, rdal.dedup_avg_depth as dedupAvgDepth, rdal.all_avg_depth as rawAvgDepth, rdal.dedup_median_depth as dedupMedianDepth, rdal.dedup_perc_100X as dedupPctOver100X, rdal.perc_100X as rawPctOver100X, ")
.append(" rdal.dedup_perc_200X as dedupPctOver200X, rdal.dedup_perc_500X as dedupPctOver500X ")
.append(part2)
.append(" dna_extract_qc dna_ex, dna_lib_prep dna_lib, ")
......@@ -217,7 +217,7 @@ public class SampleDAO {
.append(" properlyPaired, pctOnTarget, meanMapQ, pctQualRead, ")
.append(" medianTMismatch, indelRate, errorRate, ")
.append(" uniqueReads, pctDups, medianInsert, meanInsert, " )
.append(" stdInsert, dedupAvgDepth, dedupMedianDepth, dedupPctOver100X, dedupPctOver200X, dedupPctOver500X ");
.append(" stdInsert, dedupAvgDepth, rawAvgDepth, dedupMedianDepth, dedupPctOver100X, rawPctOver100X, dedupPctOver200X, dedupPctOver500X ");
Query<SampleDetailsTable> query = sessionFactory.getCurrentSession().createNativeQuery(sql.toString());
query.setParameter("nucType", nucType);
......
......@@ -31,7 +31,8 @@ public class Threshold {
public static final String DNA_T_ALIGN_MAP_READ = "DNA_T_ALIGN_MAP_READ";
public static final String DNA_ON_TARGET = "DNA_ON_TARGET";
public static final String CONCORDANCE = "CONCORDANCE";
public static final String DNA_AVG_DEPTH = "DNA_AVG_DEPTH";
public static final String DNA_T_AVG_DEPTH = "DNA_T_AVG_DEPTH";
public static final String DNA_N_AVG_DEPTH = "DNA_N_AVG_DEPTH";
public static final String DNA_PCT_OVER_100X = "DNA_PCT_OVER_100X";
public static final String CONTROL_SN_SNP = "CONTROL_SN_SNP";
public static final String CONTROL_SN_INDEL = "CONTROL_SN_INDEL";
......@@ -42,6 +43,8 @@ public class Threshold {
// public static final String CONTROL_PPV_SNP = "CONTROL_PPV_SNP";
// public static final String CONTROL_PPV_INDEL = "CONTROL_PPV_INDEL";
// public static final String CONTROL_SN_COMBINED = "CONTROL_SN_COMBINED";
public static final String DNA_PCT_OVER_100X_T = "DNA_PCT_OVER_100X_T";
public static final String DNA_PCT_OVER_100X_N = "DNA_PCT_OVER_100X_N";
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
......
......@@ -52,10 +52,13 @@ public class MonthlyAlignmentTable {
Integer meanInsert;
Integer stdInsert;
Integer dedupAvgDepth;
PassableValue dedupAvgDepthValue;
Integer rawAvgDepth;
PassableValue rawAvgDepthValue;
Integer dedupMedianDepth;
Float dedupPctOver100X;
PassableValue dedupPctOver100XValue;
Float rawPctOver100X;
public PassableValue rawPctOver100XValue;
//RNA
String read1Map;
String read2Map;
......@@ -86,8 +89,10 @@ public class MonthlyAlignmentTable {
case "mean_map_q": meanMapQ = (Float) values[i]; break;
case "mean_insert": meanInsert = (Integer) values[i]; break;
case "dedup_avg_depth": dedupAvgDepth = (Integer) values[i]; break;
case "all_avg_depth": rawAvgDepth = (Integer) values[i]; break;
case "dedup_median_depth": dedupMedianDepth = (Integer) values[i]; break;
case "dedup_perc_100X": dedupPctOver100X = (Float) values[i]; break;
case "perc_100X": rawPctOver100X = (Float) values[i]; break;
case "perc_dups": pctDups = (Float) values[i]; break;
// case "median_t_mismatch": medianTMismatch = (Float) values[i]; break;
// case "indel_rate": indelRate = (Float) values[i] * 100; break;
......@@ -125,16 +130,21 @@ public class MonthlyAlignmentTable {
if (pctOnTarget != null) {
pctOnTargetValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_ON_TARGET), "pctOnTargetValue", pctOnTarget);
}
if (dedupAvgDepth != null) {
if ("Tumor".equals(tClass)) {
dedupAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_AVG_DEPTH), "avgDepthValue",dedupAvgDepth);
if (rawAvgDepth != null) {
if ("Tumor".equals(tClass) && !getSubjectAcc().equals("GM12878")) {
rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_T_AVG_DEPTH), "rawAvgDepthValue",rawAvgDepth);
}
else {
dedupAvgDepthValue = new PassableValue("dedupAvgDepthValue", dedupAvgDepth, null); //no flag for DNA
rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_N_AVG_DEPTH), "rawAvgDepthValue",rawAvgDepth);
}
}
if (dedupPctOver100X != null) {
dedupPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X), "pctOver100XValue", dedupPctOver100X);
if (getRawPctOver100X() != null) {
if ("Tumor".equals(gettClass())) {
rawPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X_T), "rawPctOver100XValue", getRawPctOver100X());
}
else {
rawPctOver100XValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_PCT_OVER_100X_N), "rawPctOver100XValue", getRawPctOver100X());
}
}
if (concordanceRate != null) {
concordanceRateValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.CONCORDANCE), "concordanceRateValue", concordanceRate);
......@@ -328,10 +338,6 @@ public class MonthlyAlignmentTable {
return dedupAvgDepth;
}
public PassableValue getDedupAvgDepthValue() {
return dedupAvgDepthValue;
}
public Integer getDedupMedianDepth() {
return dedupMedianDepth;
}
......@@ -344,6 +350,22 @@ public class MonthlyAlignmentTable {
return dedupPctOver100XValue;
}
public Float getRawPctOver100X() {
return rawPctOver100X;
}
public PassableValue getRawPctOver100XValue() {
return rawPctOver100XValue;
}
public Integer getRawAvgDepth() {
return rawAvgDepth;
}
public PassableValue getRawAvgDepthValue() {
return rawAvgDepthValue;
}
......
......@@ -174,7 +174,7 @@ public class SampleDetails {
public Integer meanInsert;
public Integer standardInsert;
public Integer dedupAvgDepth;
public PassableValue dedupAvgDepthValue;
// public PassableValue dedupAvgDepthValue;
public Integer dedupMedianDepth;
public Float dedupPctOver100X;
public PassableValue dedupPctOver100XValue;
......@@ -419,14 +419,14 @@ public class SampleDetails {
meanInsert = dnaAlignment.getMeanInsert();
standardInsert = dnaAlignment.getStdInsert();
dedupAvgDepth = dnaAlignment.getDedupAvgDepth();
if (dedupAvgDepth != null) {
// if (dedupAvgDepth != null) {
// if ("Tumor".equals(tClass)) {
// dedupAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_AVG_DEPTH), "dedupAvgDepthValue", dedupAvgDepth);
// }
// else {
dedupAvgDepthValue = new PassableValue("dedupAvgDepthValue", dedupAvgDepth, null); //no flag for Normal
// dedupAvgDepthValue = new PassableValue("dedupAvgDepthValue", dedupAvgDepth, null); //no flag for Normal
// }
}
// }
dedupMedianDepth = dnaAlignment.getDedupMedianDepth();
dedupPctOver100X = dnaAlignment.getDedupPerc100X();
if (dedupPctOver100X != null) {
......@@ -436,11 +436,11 @@ public class SampleDetails {
rawAvgDepth = dnaAlignment.getAllAvgDepth();
if (rawAvgDepth != null) {
if ("Tumor".equals(tClass)) {
rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_AVG_DEPTH), "rawAvgDepthValue", rawAvgDepth);
if ("Tumor".equals(tClass) && !getSubjectAcc().equals("GM12878")) {
rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_T_AVG_DEPTH), "rawAvgDepthValue", rawAvgDepth);
}
else {
rawAvgDepthValue = new PassableValue("rawAvgDepthValue", rawAvgDepth, null); //no flag for Normal
rawAvgDepthValue = new PassableValue(Threshold.getThreshold(thresholds, Threshold.DNA_N_AVG_DEPTH), "rawAvgDepthValue", rawAvgDepth);
}
}
rawMedianDepth = dnaAlignment.getAllMedianDepth();
......@@ -613,8 +613,8 @@ public class SampleDetails {
passableValues.add(seqSampleQ30Value);
passableValues.add(totalMappedReadsValue);
passableValues.add(pctOnTargetValue);
passableValues.add(dedupAvgDepthValue);
passableValues.add(dedupPctOver100XValue);
passableValues.add(rawAvgDepthValue);
passableValues.add(rawPctOver100XValue);
passableValues.add(concordanceRateValue);
allPassed = passableValues.stream().filter(v -> v != null && v.getPass() != null)
......@@ -1112,9 +1112,9 @@ public class SampleDetails {
return dedupAvgDepth;
}
public PassableValue getDedupAvgDepthValue() {
return dedupAvgDepthValue;
}
// public PassableValue getDedupAvgDepthValue() {
// return dedupAvgDepthValue;
// }
public Integer getDedupMedianDepth() {
return dedupMedianDepth;
......
......@@ -100,12 +100,15 @@ public class SampleDetailsTable {
Integer meanInsert;
Integer standardInsert;
Integer dedupAvgDepth;
public PassableValue dedupAvgDepthValue;
Integer rawAvgDepth;
public PassableValue rawAvgDepthValue;
Integer dedupMedianDepth;
Float dedupPctOver100X;
Float dedupPctOver200X;
Float dedupPctOver500X;
public PassableValue dedupPctOver100XValue;
// public PassableValue dedupPctOver100XValue;
Float rawPctOver100X;
public PassableValue rawPctOver100XValue;
//RNA Alignment
String read1Map;
String read2Map;
......@@ -177,8 +180,10 @@ public class SampleDetailsTable {
case "meanMapQ": meanMapQ = (Float) values[i]; break;
case "meanInsert": meanInsert = (Integer) values[i]; break;
case "dedupAvgDepth": dedupAvgDepth = (Integer) values[i]; break;
case "rawAvgDepth": rawAvgDepth = (Integer) values[i]; break;
case "dedupMedianDepth": dedupMedianDepth = (Integer) values[i]; break;
case "dedupPctOver100X": dedupPctOver100X = (Float) values[i]; break;
case "rawPctOver100X": rawPctOver100X = (Float) values[i]; break;
case "dedupPctOver200X": dedupPctOver200X = (Float) values[i]; break;
case "dedupPctOver500X": dedupPctOver500X = (Float) values[i]; break;
case "pctDups": pctDups = (Float) values[i]; break;
......@@ -655,9 +660,9 @@ public class SampleDetailsTable {
}
public PassableValue getDedupAvgDepthValue() {
return dedupAvgDepthValue;
}
// public PassableValue getDedupAvgDepthValue() {
// return dedupAvgDepthValue;
// }
public Integer getDedupMedianDepth() {
......@@ -680,9 +685,9 @@ public class SampleDetailsTable {
}
public PassableValue getDedupPctOver100XValue() {
return dedupPctOver100XValue;
}
// public PassableValue getDedupPctOver100XValue() {
// return dedupPctOver100XValue;
// }
public String getAlignDate() {
......@@ -690,4 +695,24 @@ public class SampleDetailsTable {
}
public Float getRawPctOver100X() {
return rawPctOver100X;
}
public PassableValue getRawPctOver100XValue() {
return rawPctOver100XValue;
}
public Integer getRawAvgDepth() {
return rawAvgDepth;
}
public PassableValue getRawAvgDepthValue() {
return rawAvgDepthValue;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment