Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0fdd3cc
Add column to view
bbimber Feb 14, 2026
34d527d
Adjust behavior for non-FL clonotypes
bbimber Feb 14, 2026
9a07184
Update JS46 details
bbimber Feb 24, 2026
e424224
Add columns for WPI
bbimber Feb 24, 2026
6994987
Add option to use cluster rhel96 partition
bbimber Feb 28, 2026
2e5e084
Bugfix to cluster partition choice
bbimber Mar 1, 2026
0c2d79e
Improvements to MCC census
bbimber Mar 2, 2026
be2e0e8
Improvements to MCC census
bbimber Mar 2, 2026
83ef6d4
Improvements to MCC census
bbimber Mar 2, 2026
da3733f
Improvements to MCC census and MCC ID
bbimber Mar 2, 2026
0109d5d
Update csp policy
bbimber Mar 2, 2026
51a2ddf
Handle arrays in row values
bbimber Mar 2, 2026
25ad31e
Handle arrays in row values
bbimber Mar 2, 2026
1b3034a
Another CSP update
bbimber Mar 2, 2026
6629e5a
Major refactor of underlying SBT SQL queries (#212)
bbimber Mar 3, 2026
59511d2
Add logging to GeographicOriginStep
bbimber Mar 9, 2026
c193d0d
Fix column title
bbimber Mar 10, 2026
ced3f6f
Update MCC import templates
bbimber Mar 11, 2026
55d7f1e
Change entry pattern of MCC Request ID (#213)
bbimber Mar 12, 2026
6bf45d7
Test fix
bbimber Mar 12, 2026
fea2dae
Bugfix to MarkShippedWindow
bbimber Mar 12, 2026
25caf7a
Force re-cache of all IDs in MCC ETL
bbimber Mar 12, 2026
2da691d
Update to MCC test
bbimber Mar 12, 2026
0afdfcf
Merge discvr-25.11 to discvr-26.3
bbimber Mar 23, 2026
6117efe
Merge pull request #214 from bimberlabinternal/26.3_fb_merge
bbimber Mar 23, 2026
aa67d2c
Merge discvr-26.3 to develop
bbimber Mar 24, 2026
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
16 changes: 6 additions & 10 deletions GenotypeAssays/resources/views/sbtReview.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,9 @@
//sort: '-percent',
containerPath: Laboratory.Utils.getQueryContainerPath(),
removeableFilters: [
LABKEY.Filter.create('percent_from_locus', 0.25, LABKEY.Filter.Types.GTE)
LABKEY.Filter.create('percent_from_locus', 0.25, LABKEY.Filter.Types.GTE),
LABKEY.Filter.create('analysis_id', analysisId, LABKEY.Filter.Types.EQUALS)
],
parameters: {
AnalysisId: analysisId
},
scope: this,
success: this.onDataRegionLoad
})
Expand All @@ -180,12 +178,10 @@
containerPath: Laboratory.Utils.getQueryContainerPath(),
removeableFilters: [
LABKEY.Filter.create('percent_from_locus', 0.25, LABKEY.Filter.Types.GTE),
LABKEY.Filter.create('total_reads', 5, LABKEY.Filter.Types.GT),
LABKEY.Filter.create('totalLineages', 1, LABKEY.Filter.Types.EQUAL)
LABKEY.Filter.create('total_reads_from_locus', 5, LABKEY.Filter.Types.GT),
LABKEY.Filter.create('totalLineages', 1, LABKEY.Filter.Types.EQUAL),
LABKEY.Filter.create('analysis_id', analysisId, LABKEY.Filter.Types.EQUAL)
],
parameters: {
AnalysisId: analysisId
},
scope: this,
success: this.onDataRegionLoad
})
Expand All @@ -195,7 +191,7 @@
title: 'Haplotype Matches',
items: [{
xtype: 'genotypeassays-haplotypepanel',
analysisId: [analysisId]
analysisIds: [analysisId]
}]
},{
xtype: 'ldk-querypanel',
Expand Down
2 changes: 1 addition & 1 deletion GenotypeAssays/resources/web/genotypeassays/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ GenotypeAssays.buttons = new function(){

var newForm = Ext4.DomHelper.append(document.getElementsByTagName('body')[0],
'<form method="POST" action="' + LABKEY.ActionURL.buildURL("genotypeassays", "bulkHaplotype", null) + '">' +
'<input type="hidden" name="analysisId" value="' + Ext4.htmlEncode(checked[0]) + '" />' +
'<input type="hidden" name="analysisIds" value="' + Ext4.htmlEncode(checked.join(';')) + '" />' +
'</form>');
newForm.submit();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Ext4.define('GenotypeAssays.panel.HaplotypePanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.genotypeassays-haplotypepanel',
analysisId: null,
analysisIds: null,
showCheckBoxes: false,

initComponent: function(){
Expand Down Expand Up @@ -461,13 +461,11 @@ Ext4.define('GenotypeAssays.panel.HaplotypePanel', {
schemaName: 'sequenceanalysis',
queryName: 'alignment_summary_by_lineage',
columns: 'analysis_id,analysis_id/readset,analysis_id/readset/subjectId,lineages,loci,total,total_reads,percent,total_reads_from_locus,percent_from_locus',
parameters: {
AnalysisId: this.analysisId
},
apiVersion: 13.2,
scope: this,
filterArray: [
LABKEY.Filter.create('percent_from_locus', minPct || 0, LABKEY.Filter.Types.GTE)
LABKEY.Filter.create('percent_from_locus', minPct || 0, LABKEY.Filter.Types.GTE),
LABKEY.Filter.create('analysis_id', this.analysisIds, LABKEY.Filter.Types.IN)
],
failure: LDK.Utils.getErrorCallback(),
success: function(results){
Expand Down Expand Up @@ -501,13 +499,13 @@ Ext4.define('GenotypeAssays.panel.HaplotypePanel', {
schemaName: 'sequenceanalysis',
queryName: 'alignment_summary_grouped',
columns: 'analysis_id,lineages,loci,alleles,total_reads,percent,total_reads_from_locus,percent_from_locus',
filterArray: [
LABKEY.Filter.create('analysis_id', this.analysisIds, LABKEY.Filter.Types.IN)
],
// This is designed to remove the view-level sorts:
sort: 'analysis_id',
apiVersion: 13.2,
scope: this,
parameters: {
AnalysisId: this.analysisId
},
failure: LDK.Utils.getErrorCallback(),
success: function(results){
this.lineageToAlleleMap = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@ Ext4.define('GenotypeAssays.window.PublishResultsWindow', {
return;
}

const analysisId = dr.getParameters()?.AnalysisId;
if (!analysisId) {
Ext4.Msg.alert('Error', 'Error: unable to find analysisId. This should not occur.');
LDK.Assert.assertNotEmpty('Unable to find AnalysisId parameter from the DataRegion in PublishResultsWindow');

return;
}

Ext4.create('GenotypeAssays.window.PublishResultsWindow', {
dataRegionName: dataRegionName,
analysisId: analysisId,
actionName: 'cacheAnalyses'
}).show();
}
Expand Down Expand Up @@ -116,7 +107,6 @@ Ext4.define('GenotypeAssays.window.PublishResultsWindow', {
scope: this,
jsonData: {
alleleNames: alleleNames,
analysisId: this.analysisId,
json: Ext4.encode(this.json),
protocolId: protocol
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
import org.labkey.api.action.MutatingApiAction;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.data.DbSchema;
import org.labkey.api.data.DbSchemaType;
import org.labkey.api.data.SqlExecutor;
import org.labkey.api.data.TableInfo;
import org.labkey.api.exp.api.ExpProtocol;
import org.labkey.api.exp.api.ExperimentService;
import org.labkey.api.security.RequiresPermission;
import org.labkey.api.security.permissions.ReadPermission;
import org.labkey.api.security.permissions.UpdatePermission;
import org.labkey.api.util.HtmlString;
import org.labkey.api.util.Pair;
import org.labkey.api.util.URLHelper;
import org.labkey.api.view.HtmlView;
Expand All @@ -53,7 +55,7 @@ public GenotypeAssaysController()
}

@RequiresPermission(ReadPermission.class)
public class MigrateLegacySSPAction extends ConfirmAction<Object>
public static class MigrateLegacySSPAction extends ConfirmAction<Object>
{
@Override
public void validateCommand(Object form, Errors errors)
Expand All @@ -64,19 +66,19 @@ public void validateCommand(Object form, Errors errors)
@Override
public ModelAndView getConfirmView(Object form, BindException errors) throws Exception
{
DbSchema schema = DbSchema.get("SSP_Assay");
DbSchema schema = DbSchema.get("SSP_Assay", DbSchemaType.Module);
if (schema == null)
return new HtmlView("Either the legacy SSP module has not been installed, or it has already been removed");
return new HtmlView(HtmlString.of("Either the legacy SSP module has not been installed, or it has already been removed"));
else
return new HtmlView("This allows an admin to copy any primers stored in the original SSP Assay module into the new genotyping module. Any data has already been copied. Do you want to continue?");
return new HtmlView(HtmlString.of("This allows an admin to copy any primers stored in the original SSP Assay module into the new genotyping module. Any data has already been copied. Do you want to continue?"));
}

@Override
public boolean handlePost(Object form, BindException errors) throws Exception
{
try
{
DbSchema schema = DbSchema.get("SSP_Assay");
DbSchema schema = DbSchema.get("SSP_Assay", DbSchemaType.Module);
if (schema == null)
return true; //module not installed

Expand Down Expand Up @@ -113,7 +115,7 @@ public URLHelper getSuccessURL(Object form)
}

@RequiresPermission(UpdatePermission.class)
public class CacheAnalysesAction extends MutatingApiAction<CacheAnalysesForm>
public static class CacheAnalysesAction extends MutatingApiAction<CacheAnalysesForm>
{
@Override
public ApiResponse execute(CacheAnalysesForm form, BindException errors)
Expand All @@ -133,7 +135,7 @@ public ApiResponse execute(CacheAnalysesForm form, BindException errors)
}

String[] alleleNames = Arrays.stream(form.getAlleleNames()).map(StringEscapeUtils::unescapeHtml4).toArray(String[]::new);
Pair<List<Long>, List<Long>> ret = GenotypeAssaysManager.get().cacheAnalyses(getViewContext(), form.getAnalysisId(), protocol, alleleNames);
Pair<List<Long>, List<Long>> ret = GenotypeAssaysManager.get().cacheAnalyses(getViewContext(), protocol, alleleNames);
resultProperties.put("runsCreated", ret.first);
resultProperties.put("runsDeleted", ret.second);
}
Expand All @@ -159,7 +161,6 @@ public static class CacheAnalysesForm
{
private String[] _alleleNames;
private String _json;
private int _analysisId;
private int _protocolId;

public String[] getAlleleNames()
Expand Down Expand Up @@ -191,20 +192,10 @@ public void setJson(String json)
{
_json = json;
}

public int getAnalysisId()
{
return _analysisId;
}

public void setAnalysisId(int analysisId)
{
_analysisId = analysisId;
}
}

@RequiresPermission(UpdatePermission.class)
public class CacheHaplotypesAction extends MutatingApiAction<CacheAnalysesForm>
public static class CacheHaplotypesAction extends MutatingApiAction<CacheAnalysesForm>
{
@Override
public ApiResponse execute(CacheAnalysesForm form, BindException errors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static GenotypeAssaysManager get()
return _instance;
}

public Pair<List<Long>, List<Long>> cacheAnalyses(final ViewContext ctx, final int analysisId, final ExpProtocol protocol, String[] pks) throws IllegalArgumentException
public Pair<List<Long>, List<Long>> cacheAnalyses(final ViewContext ctx, final ExpProtocol protocol, String[] pks) throws IllegalArgumentException
{
final User u = ctx.getUser();
final List<Long> runsCreated = new ArrayList<>();
Expand Down Expand Up @@ -125,7 +125,6 @@ public Pair<List<Long>, List<Long>> cacheAnalyses(final ViewContext ctx, final i

AtomicInteger records = new AtomicInteger();
TableSelector tsAlignments = new TableSelector(tableAlignments, cols.values(), new SimpleFilter(FieldKey.fromString("key"), Arrays.asList(pks), CompareType.IN), null);
tsAlignments.setNamedParameters(Map.of("AnalysisId", analysisId));

tsAlignments.forEach(new Selector.ForEachBlock<ResultSet>()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<column name="interventions/allInterventions"/>
<column name="interventions/firstInterventionDPI"/>
<column name="pvlInfo/numPVL"/>
<column name="pvlInfo/lastPvlWPI"/>
</columns>
<sorts>
<sort column="Id" descending="false"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void setContainerUser(ContainerUser containerUser)

private void updateJS46() throws PipelineJobException
{
updateTreatmentRecords("JS46", new SimpleFilter(FieldKey.fromString("treatment"), "SIV - Unknown"), Map.of("treatment", "SIVmac239", "route", "IV"));
updateTreatmentRecords("JS46", new SimpleFilter(FieldKey.fromString("treatment"), "SIV - Unknown"), Map.of("treatment", "SIVmac239", "route", "Rectal", "amount", 1500, "amount_units", "TCID50"));
}

private void updateTreatmentRecords(String cohortName, SimpleFilter treatmentFilter, final Map<String, Object> additionalProps) throws PipelineJobException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,11 @@ public TableInfo getLookupTableInfo()
qd.setSql("SELECT\n" +
"min(tr.date) as artInitiation,\n" +
"CONVERT(TIMESTAMPDIFF('SQL_TSI_DAY', CAST(min(tr.date) AS DATE), CAST(c." + dateColName + " AS DATE)), INTEGER) as daysPostArtInitiation,\n" +
"CONVERT(TIMESTAMPDIFF('SQL_TSI_DAY', CAST(min(tr.date) AS DATE), CAST(c." + dateColName + " AS DATE)) / 7, INTEGER) as weeksPostArtInitiation,\n" +
"CONVERT(age_in_months(CAST(min(tr.date) AS DATE), CAST(c." + dateColName + " AS DATE)), FLOAT) as monthsPostArtInitiation,\n" +
"max(tr.enddate) as artRelease,\n" +
"CONVERT(CASE WHEN max(tr.enddate) IS NULL THEN NULL ELSE TIMESTAMPDIFF('SQL_TSI_DAY', CAST(max(tr.enddate) AS DATE), CAST(c." + dateColName + " AS DATE)) END, INTEGER) as daysPostArtRelease,\n" +
"CONVERT(CASE WHEN max(tr.enddate) IS NULL THEN NULL ELSE TIMESTAMPDIFF('SQL_TSI_DAY', CAST(max(tr.enddate) AS DATE), CAST(c." + dateColName + " AS DATE)) END / 7, INTEGER) as weeksPostArtRelease,\n" +
"CONVERT(CASE WHEN max(tr.enddate) IS NULL THEN NULL ELSE age_in_months(CAST(max(tr.enddate) AS DATE), CAST(c." + dateColName + " AS DATE)) END, FLOAT) as monthsPostArtRelease,\n" +
"CAST(CASE WHEN CAST(min(tr.date) AS DATE) <= CAST(c." + dateCol.getFieldKey().toString() + " AS DATE) AND CAST(max(coalesce(tr.enddate, now())) AS DATE) >= CAST(c." + dateCol.getFieldKey().toString() + " AS DATE) THEN 'Y' ELSE null END as VARCHAR) as onArt,\n" +
"GROUP_CONCAT(DISTINCT tr.treatment) AS artTreatment,\n" +
Expand Down Expand Up @@ -499,9 +501,11 @@ public TableInfo getLookupTableInfo()
((BaseColumnInfo)ti.getColumn("artRelease")).setLabel("ART Release");

((BaseColumnInfo)ti.getColumn("daysPostArtInitiation")).setLabel("Days Post-ART Initiation");
((BaseColumnInfo)ti.getColumn("weeksPostArtInitiation")).setLabel("Weeks Post-ART Initiation");
((BaseColumnInfo)ti.getColumn("monthsPostArtInitiation")).setLabel("Months Post-ART Initiation");

((BaseColumnInfo)ti.getColumn("daysPostArtRelease")).setLabel("Days Post-ART Release");
((BaseColumnInfo)ti.getColumn("weeksPostArtRelease")).setLabel("Weeks Post-ART Release");
((BaseColumnInfo)ti.getColumn("monthsPostArtRelease")).setLabel("Months Post-ART Release");

((BaseColumnInfo)ti.getColumn("artTreatment")).setLabel("ART Treatment(s)");
Expand Down
2 changes: 1 addition & 1 deletion mGAP/src/org/labkey/mgap/mGAPModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void doStartupAfterSpringConfig(ModuleContext moduleContext)

ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Connection, "https://code.jquery.com", "https://*.fontawesome.com");
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Style, "https://code.jquery.com", "https://www.gstatic.com");
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Font, "https://*.fontawesome.com");
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Font, "https://*.fontawesome.com", "https://fonts.googleapis.com");
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Connection, "https://oss.maxcdn.com");

new PipelineStartup();
Expand Down
5 changes: 5 additions & 0 deletions mGAP/src/org/labkey/mgap/pipeline/GeographicOriginStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void complete(PipelineJob job, List<SequenceOutputFile> inputs, List<Sequ
continue;
}

getPipelineCtx().getLogger().info("Storing results in database:");
List<Map<String, Object>> toInsert = new ArrayList<>();
try (CSVReader reader = new CSVReader(Readers.getReader(so.getFile()), '\t'))
{
Expand Down Expand Up @@ -120,6 +121,10 @@ public void complete(PipelineJob job, List<SequenceOutputFile> inputs, List<Sequ
throw new PipelineJobException(e);
}
}
else
{
getPipelineCtx().getLogger().info("No records to insert");
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion mcc/resources/etls/mcc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
</alternateKeys>
</destination>
</transform>
<transform id="cacheDemographics" type="TaskRefTransformStep">
<taskref ref="org.labkey.mcc.etl.CacheDemographicsStep">
<settings>
</settings>
</taskref>
</transform>
<transform type="SimpleQueryTransformStep" id="kinship">
<description>Copy to target</description>
<source schemaName="mcc" queryName="aggregatedKinship" >
Expand Down Expand Up @@ -149,7 +155,7 @@
<column>objectid</column>
</sourceColumns>
</source>
<destination schemaName="study" queryName="clinical_observations" targetOption="truncate" bulkLoad="true" batchSize="1000">
<destination schemaName="study" queryName="clinical_observations" targetOption="truncate" bulkLoad="true" batchSize="2500">
<alternateKeys>
<column name="objectid"/>
</alternateKeys>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
query.sort=-Date&amp;
</url>
</column>
<column columnName="destination">
<columnTitle>Destination(s)</columnTitle>
</column>
<column columnName="mccRequestId">
<columnTitle>MCC Request Id(s)</columnTitle>
</column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ select

T1.Id,
max(T1.date) as MostRecentDeparture,
group_concat(distinct t1.destination) as destination,
group_concat(distinct t1.mccRequestId) as mccRequestId

FROM study.departure T1
Expand Down
7 changes: 0 additions & 7 deletions mcc/resources/views/mccDataImport.view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,5 @@
<!--<dependency path="https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js" mode="production"/>-->
<!--<dependency path="https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css" mode="production"/>-->

<dependency path="https://cdn.datatables.net/buttons/1.5.1/js/buttons.flash.min.js"/>
<dependency path="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"/>
<dependency path="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"/>
<dependency path="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"/>
<dependency path="https://cdn.datatables.net/buttons/1.5.1/js/buttons.html5.min.js"/>
<dependency path="https://cdn.datatables.net/buttons/1.5.1/js/buttons.print.min.js"/>

</dependencies>
</view>
Binary file modified mcc/resources/web/mcc/exampleData/MCC_Data_Template.xlsx
Binary file not shown.
Loading
Loading