Skip to content
Open
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 name NOT LIKE '%.log' AND name NOT LIKE '%.Rout' AND name NOT LIKE '%.pdf' AND sourceapplicationid IN (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't the .Rout extension only apply to transform scripts written in R? Maybe I'm wrong but I thought that whatever files are left after the transform script has completed get added as a data output.

It looks like there is data type information encoded into the exp.data lsid. I haven't looked into it but wondering whether filtering on that might work.

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