Skip to content

Commit e728984

Browse files
committed
Add column to calculate the number of non-archived readdata
1 parent 32b63dc commit e728984

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/query/SequenceAnalysisUserSchema.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep
260260
newCol3.setLabel("SRA Runs");
261261
newCol3.setDescription("This will display a comma-separated list of all distinct SRA runs associated with this readset.");
262262
ret.addColumn(newCol3);
263+
264+
SQLFragment sql4 = new SQLFragment("(SELECT count(*) as expr FROM " + SequenceAnalysisSchema.SCHEMA_NAME + "." + SequenceAnalysisSchema.TABLE_READ_DATA + " rd WHERE rd.readset = " + ExprColumn.STR_TABLE_ALIAS + ".rowid AND rd.sra_accession IS NULL)");
265+
ExprColumn newCol4 = new ExprColumn(ret, "readdataWithoutSra", sql4, JdbcType.VARCHAR, sourceTable.getColumn("rowid"));
266+
newCol4.setURL(DetailsURL.fromString("/query/executeQuery.view?schemaName=sequenceanalysis&query.queryName=readData&query.readset~eq=${rowid}"));
267+
newCol4.setLabel("Read Pairs Not In SRA");
268+
newCol4.setDescription("This will show the total number of read pairs for this readset that do not like an SRA Run.");
269+
ret.addColumn(newCol4);
263270
}
264271

265272
if (ret.getColumn("isArchived") == null)

0 commit comments

Comments
 (0)