From 26a8ababf51e2533351da6c248f36ca961b05782 Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 25 Feb 2026 09:47:47 -0600 Subject: [PATCH 1/3] GitHub Issue #875: TsvDataSerializer.exportData() to write first row regardless of if column headers written - note: not yet fixed to make sure selenium test fails as expected on TC first --- api/src/org/labkey/api/qc/TsvDataSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/org/labkey/api/qc/TsvDataSerializer.java b/api/src/org/labkey/api/qc/TsvDataSerializer.java index 391d3aaa376..2cd8e65aa0e 100644 --- a/api/src/org/labkey/api/qc/TsvDataSerializer.java +++ b/api/src/org/labkey/api/qc/TsvDataSerializer.java @@ -91,7 +91,7 @@ private List exportData(DataIteratorBuilder data, List columns, sep = "\t"; } pw.println(); - writeRow(row, columns, pw, tsvWriter); + writeRow(row, columns, pw, tsvWriter); // GitHub Issue #875: write the first row regardless of whether we had a header or not } // write the remaining rows From 27c98588219af5f086a56b36facdebd68bf14a37 Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 25 Feb 2026 10:10:12 -0600 Subject: [PATCH 2/3] GitHub Issue #875: TsvDataSerializer.exportData() to write first row regardless of if column headers written --- api/src/org/labkey/api/qc/TsvDataSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/org/labkey/api/qc/TsvDataSerializer.java b/api/src/org/labkey/api/qc/TsvDataSerializer.java index 2cd8e65aa0e..839ef801867 100644 --- a/api/src/org/labkey/api/qc/TsvDataSerializer.java +++ b/api/src/org/labkey/api/qc/TsvDataSerializer.java @@ -91,8 +91,8 @@ private List exportData(DataIteratorBuilder data, List columns, sep = "\t"; } pw.println(); - writeRow(row, columns, pw, tsvWriter); // GitHub Issue #875: write the first row regardless of whether we had a header or not } + writeRow(row, columns, pw, tsvWriter); // GitHub Issue #875: write the first row regardless of whether we had a header or not // write the remaining rows while (iter.next()) From 8d49ed4d703dd2dedb18d3ca372cee6f8ad17e25 Mon Sep 17 00:00:00 2001 From: cnathe Date: Thu, 26 Feb 2026 17:00:54 -0600 Subject: [PATCH 3/3] Experiment module metric (assayRunsWithMultipleInputFiles) for count of the number of Luminex and Standard assay runs that were imported with > 1 data input file --- .../src/org/labkey/experiment/ExperimentModule.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/experiment/src/org/labkey/experiment/ExperimentModule.java b/experiment/src/org/labkey/experiment/ExperimentModule.java index 90312720f61..589473bb821 100644 --- a/experiment/src/org/labkey/experiment/ExperimentModule.java +++ b/experiment/src/org/labkey/experiment/ExperimentModule.java @@ -652,6 +652,17 @@ SELECT COUNT(DISTINCT DD.DomainURI) FROM JOIN exp.DomainDescriptor DD on PD.domainID = DD.domainId WHERE DD.domainUri LIKE ? AND D.rangeURI = ?""", "urn:lsid:%:" + ExpProtocol.AssayDomainTypes.Result.getPrefix() + ".%", PropertyType.FILE_LINK.getTypeUri()).getObject(Long.class)); + // metric to count the number of Luminex and Standard assay runs that were imported with > 1 data file + assayMetrics.put("assayRunsWithMultipleInputFiles", new SqlSelector(schema, """ + SELECT COUNT(*) FROM ( + SELECT sourceapplicationid, COUNT(*) AS count FROM exp.data + WHERE name NOT LIKE '%.log' AND name NOT LIKE '%.Rout' AND name NOT LIKE '%.pdf' AND sourceapplicationid IN ( + SELECT rowid FROM exp.protocolapplication + WHERE lsid LIKE '%:SimpleProtocol.CoreStep' AND (protocollsid LIKE '%:LuminexAssayProtocol.%' OR protocollsid LIKE '%:GeneralAssayProtocol.%') + ) + GROUP BY sourceapplicationid + ) x WHERE count > 1""").getObject(Long.class)); + Map sampleLookupCountMetrics = new HashMap<>(); SQLFragment baseAssaySampleLookupSQL = new SQLFragment("SELECT COUNT(*) FROM exp.propertydescriptor WHERE (lookupschema = 'samples' OR (lookupschema = 'exp' AND lookupquery = 'Materials')) AND propertyuri LIKE ?");