Skip to content

Commit 6c80110

Browse files
authored
Merge pull request #167 from LabKey/fb_merge_23.3_to_develop
Merge discvr-23.3 to develop
2 parents 054c1f6 + b52b63a commit 6c80110

36 files changed

Lines changed: 491 additions & 45 deletions

File tree

LabPurchasing/test/src/org/labkey/test/tests/labpurchasing/LabPurchasingTest.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
import org.labkey.test.categories.External;
1212
import org.labkey.test.categories.LabModule;
1313
import org.labkey.test.components.ext4.Window;
14-
import org.labkey.test.util.DataRegion;
1514
import org.labkey.test.util.DataRegionTable;
1615
import org.labkey.test.util.Ext4Helper;
17-
import org.labkey.test.util.LogMethod;
18-
import org.labkey.test.util.LoggedParam;
1916
import org.labkey.test.util.ext4cmp.Ext4ComboRef;
2017
import org.labkey.test.util.ext4cmp.Ext4FieldRef;
2118
import org.labkey.test.util.ext4cmp.Ext4GridRef;
2219
import org.openqa.selenium.WebElement;
23-
import org.openqa.selenium.support.ui.ExpectedConditions;
2420

2521
import java.util.Collections;
2622
import java.util.List;
@@ -98,7 +94,26 @@ public void testLabPurchasingModule()
9894

9995
// Adding the new vendor should have updated the combo:
10096
grid.clickTbarButton("Add New");
97+
checker().withScreenshot("LabPurchasingBeforeVendor");
10198
grid.setGridCell(1, "vendorId", "New Vendor 1");
99+
try
100+
{
101+
Assert.assertTrue("Missing vendor cell", isElementPresent(Ext4GridRef.locateExt4GridCell("New Vendor 1")));
102+
}
103+
catch (AssertionError e)
104+
{
105+
checker().withScreenshot("LabPurchasingVendor0");
106+
WebElement el = grid.startEditing(1, "vendorId");
107+
checker().withScreenshot("LabPurchasingVendor1");
108+
109+
setFormElementJS(el, "");
110+
el.sendKeys("New Vendor 1");
111+
sleep(1000);
112+
113+
checker().withScreenshot("LabPurchasingVendor2");
114+
115+
throw e;
116+
}
102117

103118
// Try to save, expect error:
104119
click(Ext4Helper.Locators.ext4Button("Order Items"));

mGAP/resources/etls/prime-seq.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@
131131
</columnTransforms>
132132
</destination>
133133
</transform>
134+
134135
<transform id="step5" type="RemoteQueryTransformStep">
135136
<description>Copy to local table</description>
136-
<source schemaName="mGAP" queryName="variantList" remoteSource="PRIMESEQ">
137+
<source schemaName="mGAP" queryName="variantList" remoteSource="PRIMESEQ" sourceTimeout="0">
137138
<sourceColumns>
138139
<column>releaseId</column>
139140
<column>contig</column>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
2+
<columns>
3+
<column name="rowid"/>
4+
<column name="trackName"/>
5+
<column name="label"/>
6+
<column name="source"/>
7+
<column name="category"/>
8+
<column name="url"/>
9+
<column name="vcfId"/>
10+
<column name="description"/>
11+
<column name="isprimarytrack"/>
12+
<column name="mergepriority"/>
13+
<column name="skipvalidation"/>
14+
<column name="vcfId/container/Name">
15+
<properties>
16+
<property name="columnTitle" value="Workbook"/>
17+
</properties>
18+
</column>
19+
</columns>
20+
<sorts>
21+
<sort column="trackName" descending="false"/>
22+
</sorts>
23+
</customView>

mGAP/resources/schemas/mgap.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,8 +1076,7 @@
10761076
<datatype>lsidtype</datatype>
10771077
<isReadOnly>true</isReadOnly>
10781078
<isHidden>true</isHidden>
1079-
<isUserEditable>false</isUserEditable>
1080-
<isUnselectable>true</isUnselectable>
1079+
<isUserEditable>false</isUserEditable>
10811080
<fk>
10821081
<fkColumnName>ObjectUri</fkColumnName>
10831082
<fkTable>Object</fkTable>
@@ -1141,4 +1140,4 @@
11411140
</column>
11421141
</columns>
11431142
</table>
1144-
</tables>
1143+
</tables>

mGAP/src/org/labkey/mgap/pipeline/GenerateMgapTracksStep.java

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ public static class Provider extends AbstractVariantProcessingStepProvider<Gener
7575
public Provider()
7676
{
7777
super("GenerateMgapTracksStep", "Generate mGAP Tracks", "GenerateMgapTracksStep", "This will use the set of sample IDs from the table mgap.releaseTrackSubsets to subset the input VCF and produce one VCF per track. It will perform basic validation and also update mgap.releaseTracks.", Arrays.asList(
78-
ToolParameterDescriptor.create("releaseVersion", "mGAP Version", "This is the string that was used to annotate novel variants.", "textfield", new JSONObject(){{
78+
ToolParameterDescriptor.create("releaseVersion", "mGAP Version", "This is the string that was used to annotate novel variants.", "ldk-numberfield", new JSONObject(){{
7979
put("allowBlank", false);
80+
put("decimalPrecision", 1);
8081
put("doNotIncludeInTemplates", true);
8182
}}, null)
8283
), null, null);
@@ -174,17 +175,7 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
174175
}
175176

176177
// Also create the Novel Sites track:
177-
String releaseVersion = getProvider().getParameterByName("releaseVersion").extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), String.class);
178-
if (releaseVersion.toLowerCase().startsWith("v"))
179-
{
180-
releaseVersion = releaseVersion.substring(1);
181-
}
182-
183-
if (!NumberUtils.isCreatable(releaseVersion))
184-
{
185-
throw new IllegalArgumentException("Expected the release version to be numeric: " + releaseVersion);
186-
}
187-
178+
Double releaseVersion = getProvider().getParameterByName("releaseVersion").extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), Double.class);
188179
File novelSitesOutput = new File(outputDirectory, "mGAP_v" + releaseVersion + "_NovelSites.vcf.gz");
189180
if (new File(novelSitesOutput.getPath() + ".tbi").exists())
190181
{
@@ -240,10 +231,10 @@ private void createOrUpdateTrack(SequenceOutputFile so, PipelineJob job, String
240231
{
241232
Container targetContainer = job.getContainer().isWorkbook() ? job.getContainer().getParent() : job.getContainer();
242233
TableInfo releaseTracks = QueryService.get().getUserSchema(job.getUser(), targetContainer, mGAPSchema.NAME).getTable(mGAPSchema.TABLE_RELEASE_TRACKS);
243-
TableSelector ts = new TableSelector(releaseTracks, PageFlowUtil.set("rowid"), new SimpleFilter(FieldKey.fromString("trackName"), so.getName()), null);
234+
TableSelector ts = new TableSelector(releaseTracks, PageFlowUtil.set("rowid"), new SimpleFilter(FieldKey.fromString("trackName"), trackName), null);
244235
if (!ts.exists())
245236
{
246-
job.getLogger().debug("Creating new track: " + so.getName());
237+
job.getLogger().debug("Creating new track: " + trackName + " / " + so.getName());
247238
Map<String, Object> newRow = new CaseInsensitiveHashMap<>();
248239
newRow.put("trackName", trackName);
249240
newRow.put("label", trackName);
@@ -259,13 +250,15 @@ private void createOrUpdateTrack(SequenceOutputFile so, PipelineJob job, String
259250
}
260251
else
261252
{
262-
job.getLogger().debug("Updating existing track: " + so.getName());
253+
int rowId = ts.getObject(Integer.class);
254+
job.getLogger().debug("Updating existing track: " + so.getName() + " / " + rowId);
255+
263256
Map<String, Object> toUpdate = new CaseInsensitiveHashMap<>();
264-
toUpdate.put("rowId", ts.getObject(Integer.class));
257+
toUpdate.put("rowId", rowId);
265258
toUpdate.put("vcfId", so.getRowid());
266259

267260
Map<String, Object> oldKeys = new CaseInsensitiveHashMap<>();
268-
toUpdate.put("rowId", ts.getObject(Integer.class));
261+
oldKeys.put("rowId", rowId);
269262

270263
releaseTracks.getUpdateService().updateRows(job.getUser(), targetContainer, Arrays.asList(toUpdate), Arrays.asList(oldKeys), null, null);
271264
}

mGAP/src/org/labkey/mgap/pipeline/mGapReleaseGenerator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ public class mGapReleaseGenerator extends AbstractParameterizedOutputHandler<Seq
9999
public mGapReleaseGenerator()
100100
{
101101
super(ModuleLoader.getInstance().getModule(mGAPModule.class), "Create mGAP Release", "This will prepare an input VCF for use as an mGAP public release. This will optionally include: removing excess annotations and program records, limiting to SNVs (optional) and removing genotype data (optional). If genotypes are retained, the subject names will be checked for mGAP aliases and replaced as needed.", new LinkedHashSet<>(PageFlowUtil.set("sequenceanalysis/field/GenomeFileSelectorField.js")), Arrays.asList(
102-
ToolParameterDescriptor.create("releaseVersion", "Version", "This string will be used as the version when published.", "textfield", new JSONObject(){{
102+
ToolParameterDescriptor.create("releaseVersion", "Version", "This value will be used as the version when published.", "ldk-numberfield", new JSONObject(){{
103103
put("allowBlank", false);
104+
put("decimalPrecision", 1);
105+
put("doNotIncludeInTemplates", true);
104106
}}, null),
105107
ToolParameterDescriptor.createExpDataParam("gtfFile", "GTF File", "The gene file used to create these annotations.", "sequenceanalysis-genomefileselectorfield", new JSONObject()
106108
{{

mcc/package-lock.json

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcc/resources/etls/snprc-datasets.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<transforms>
88
<transform type="RemoteQueryTransformStep" id="demographics">
99
<description>Copy to target</description>
10-
<source remoteSource="SNPRC" schemaName="study" queryName="Demographics">
10+
<source remoteSource="SNPRC" schemaName="study" queryName="Demographics" sourceTimeout="0">
1111
<sourceColumns>
1212
<column>AnimalId</column>
1313
<column>date</column>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<query xmlns="http://labkey.org/data/xml/query">
2+
<metadata>
3+
<tables xmlns="http://labkey.org/data/xml">
4+
<table tableName="" tableDbType="TABLE">
5+
<tableTitle>MCC Aggregated Demographics</tableTitle>
6+
<columns>
7+
<column columnName="Id">
8+
<columnTitle>MCC ID</columnTitle>
9+
</column>
10+
<column columnName="originalId">
11+
<columnTitle>Center Id</columnTitle>
12+
</column>
13+
<column columnName="dam">
14+
<columnTitle>Dam MCC Id</columnTitle>
15+
</column>
16+
<column columnName="originalDam">
17+
<columnTitle>Dam Center Id</columnTitle>
18+
</column>
19+
<column columnName="originalSire">
20+
<columnTitle>Sire Center Id</columnTitle>
21+
</column>
22+
<column columnName="sire">
23+
<columnTitle>Sire MCC Id</columnTitle>
24+
</column>
25+
</columns>
26+
</table>
27+
</tables>
28+
</metadata>
29+
</query>

mcc/resources/queries/mcc/aggregatedDemographics.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SELECT
77
d.birth,
88
d.death,
99
d.colony,
10+
d.source,
1011
d.damMccAlias.externalAlias as dam,
1112
d.sireMccAlias.externalAlias as sire,
1213
d.dam as originalDam,
@@ -18,6 +19,7 @@ SELECT
1819
WHEN d.calculated_status = 'Alive' AND (SELECT COUNT(f.flag.value) as total FROM "/data/Colonies/SNPRC/".study.flags f WHERE f.Id = d.Id AND f.isActive = true) > 0 THEN true
1920
ELSE false
2021
END as u24_status,
22+
d.Id.mostRecentDeparture.mostRecentDeparture,
2123
o.availability,
2224
o.current_housing_status,
2325
o.infant_history,
@@ -50,6 +52,7 @@ SELECT
5052
d.birth,
5153
d.death,
5254
d.colony,
55+
d.source,
5356
d.damMccAlias.externalAlias as dam,
5457
d.sireMccAlias.externalAlias as sire,
5558
d.dam as originalDam,
@@ -61,6 +64,7 @@ SELECT
6164
WHEN d.calculated_status = 'Alive' AND (SELECT COUNT(f.flag.value) as total FROM "/data/Colonies/WNPRC/".study.flags f WHERE f.Id = d.Id AND f.isActive = true) > 0 THEN true
6265
ELSE false
6366
END as u24_status,
67+
d.Id.mostRecentDeparture.mostRecentDeparture,
6468
o.availability,
6569
o.current_housing_status,
6670
o.infant_history,
@@ -93,6 +97,7 @@ SELECT
9397
d.birth,
9498
d.death,
9599
d.colony,
100+
d.source,
96101
d.damMccAlias.externalAlias as dam,
97102
d.sireMccAlias.externalAlias as sire,
98103
d.dam as originalDam,
@@ -101,6 +106,7 @@ SELECT
101106
d.objectid,
102107
d.calculated_status,
103108
d.u24_status,
109+
d.Id.mostRecentDeparture.mostRecentDeparture,
104110
o.availability,
105111
o.current_housing_status,
106112
o.infant_history,
@@ -133,6 +139,7 @@ SELECT
133139
d.birth,
134140
d.death,
135141
d.colony,
142+
d.source,
136143
d.damMccAlias.externalAlias as dam,
137144
d.sireMccAlias.externalAlias as sire,
138145
d.dam as originalDam,
@@ -141,6 +148,7 @@ SELECT
141148
d.objectid,
142149
d.calculated_status,
143150
d.u24_status,
151+
d.Id.mostRecentDeparture.mostRecentDeparture,
144152
o.availability,
145153
o.current_housing_status,
146154
o.infant_history,

0 commit comments

Comments
 (0)