@@ -81,27 +81,20 @@ private TableInfo createWrappedVariantTable(String name, TableInfo sourceTable,
8181
8282 private TableInfo customizeReleaseTracks (String name , TableInfo sourceTable , ContainerFilter cf )
8383 {
84- if (sourceTable instanceof AbstractTableInfo ati )
85- {
86- String fieldName = "totalSamples" ;
87- if (ati .getColumn (fieldName ) == null )
88- {
89- SQLFragment sql = new SQLFragment ("(SELECT count(distinct t.subjectId) as total FROM " + mGAPSchema .NAME + "." + mGAPSchema .TABLE_RELEASE_TRACK_SUBSETS + " t WHERE t.trackName = " + ExprColumn .STR_TABLE_ALIAS + ".trackName)" );
90- ExprColumn col = new ExprColumn (ati , name , sql , JdbcType .INTEGER , ati .getColumn ("trackName" ));
91- col .setLabel ("# Samples" );
92- col .setFacetingBehaviorType (FacetingBehaviorType .ALWAYS_OFF );
93- col .setDescription ("This column shows the total number of registered subject IDs for this track" );
94- col .setURL (DetailsURL .fromString ("/query/executeQuery.view?schemaName=mgap&query.queryName=releaseTrackSubsets&query.trackName~eq=${trackName}" , getContainer ()));
95- ati .addColumn (col );
96- }
84+ AbstractTableInfo ati = (AbstractTableInfo )createWrappedTable (name , sourceTable , cf );
9785
98- return createWrappedTable (name , ati , cf );
99- }
100- else
86+ String fieldName = "totalSamples" ;
87+ if (ati .getColumn (fieldName ) == null )
10188 {
102- _log .error ("mGapUserSchema.customizeReleaseTracks was passed a TableInfo that wasnt a AbstractTableInfo. Was: " + sourceTable .getClass ().getName ());
89+ SQLFragment sql = new SQLFragment ("(SELECT count(distinct t.subjectId) as total FROM " + mGAPSchema .NAME + "." + mGAPSchema .TABLE_RELEASE_TRACK_SUBSETS + " t WHERE t.trackName = " + ExprColumn .STR_TABLE_ALIAS + ".trackName)" );
90+ ExprColumn col = new ExprColumn (ati , name , sql , JdbcType .INTEGER , ati .getColumn ("trackName" ));
91+ col .setLabel ("# Samples" );
92+ col .setFacetingBehaviorType (FacetingBehaviorType .ALWAYS_OFF );
93+ col .setDescription ("This column shows the total number of registered subject IDs for this track" );
94+ col .setURL (DetailsURL .fromString ("/query/executeQuery.view?schemaName=mgap&query.queryName=releaseTrackSubsets&query.trackName~eq=${trackName}" , getContainer ()));
95+ ati .addColumn (col );
10396 }
10497
105- return createWrappedTable ( name , sourceTable , cf ) ;
98+ return ati ;
10699 }
107100}
0 commit comments