Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/src/org/labkey/api/qc/TsvDataSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ private List<String> exportData(DataIteratorBuilder data, List<String> 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
while (iter.next())
Expand Down
11 changes: 11 additions & 0 deletions experiment/src/org/labkey/experiment/ExperimentModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 lsid NOT LIKE '%:RelatedFile.%' 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<String, Object> sampleLookupCountMetrics = new HashMap<>();
SQLFragment baseAssaySampleLookupSQL = new SQLFragment("SELECT COUNT(*) FROM exp.propertydescriptor WHERE (lookupschema = 'samples' OR (lookupschema = 'exp' AND lookupquery = 'Materials')) AND propertyuri LIKE ?");

Expand Down