Skip to content

Commit d4bd134

Browse files
authored
Merge pull request #159 from LabKey/fb_merge_22.11_to_develop
Merge discvr-22.11 to develop
2 parents 3719723 + 7d72a7f commit d4bd134

File tree

4 files changed

+45
-19
lines changed

4 files changed

+45
-19
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ else if (header.getSampleNamesInOrder().size() != 1)
112112
case "Whole Genome: Deep Coverage":
113113
setName = "WGS";
114114
break;
115+
case "Whole Genome: Light Coverage":
116+
setName = "WGS";
117+
break;
115118
case "Whole Exome":
116119
setName = "WXS";
117120
break;

mcc/test/src/org/labkey/test/tests/mcc/MccTest.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void testMccModule() throws Exception
6565
testAnimalImportAndTransfer();
6666
}
6767

68-
private void testAnimalImportAndTransfer()
68+
private void testAnimalImportAndTransfer() throws Exception
6969
{
7070
beginAt(getProjectName() + "/Colonies/SNPRC/project-begin.view");
7171
waitAndClickAndWait(Locator.tagWithText("a", "Import Excel-Based Data"));
@@ -102,7 +102,7 @@ private void testAnimalImportAndTransfer()
102102
combo.clickTrigger();
103103
waitAndClick(Locator.tagContainingText("li", "Other"));
104104

105-
Window dialog = new Window.WindowFinder(getDriver()).withTitle("Enter Value").waitFor();
105+
Window<?> dialog = new Window.WindowFinder(getDriver()).withTitle("Enter Value").waitFor();
106106
dialog.findElement(Locator.tag("input")).sendKeys("TargetColony");
107107
waitAndClick(Ext4Helper.Locators.ext4Button("OK"));
108108
sleep(100);
@@ -130,6 +130,14 @@ private void testAnimalImportAndTransfer()
130130
Assert.assertEquals("Incorrect Status", "<Alive>", dr.getDataAsText(0, "Status"));
131131
Assert.assertEquals("Incorrect Colony", "TargetColony", dr.getDataAsText(0, "colony"));
132132
Assert.assertEquals("Incorrect Source", "SNPRC", dr.getDataAsText(0, "source"));
133+
134+
// These were inserted using a cross-folder SaveRows, and this check ensures the trigger script containerPath and serverContex works as expected:
135+
SelectRowsCommand sr = new SelectRowsCommand("study", "demographics");
136+
sr.setColumns(Arrays.asList("Id", "QCState/Label"));
137+
SelectRowsResponse srr = sr.execute(createDefaultConnection(), getProjectName() + "/Colonies/Other");
138+
srr.getRows().forEach(row -> {
139+
Assert.assertEquals("Incorrect QCState", "Completed", row.get("QCState/Label"));
140+
});
133141
}
134142

135143
private static class FormElement
@@ -292,12 +300,16 @@ private Locator getButton(String text)
292300
return Locator.tagWithText("button", text);
293301
}
294302

303+
private void waitForCensusToLoad()
304+
{
305+
waitForElement(Locator.tagWithText("div", "Age (Living Animals)")); //proxy for data loading
306+
}
307+
295308
private void goToAnimalRequests()
296309
{
297310
goToProjectHome();
298-
waitForElement(Locator.tagWithText("div", "Age (Living Animals)")); //proxy for data loading
311+
waitForCensusToLoad();
299312
waitAndClickAndWait(Locator.tagContainingText("div", "Animal Requests"));
300-
301313
waitForElement(Locator.tagWithText("a", "Submit New Animal Request"));
302314
}
303315

@@ -733,6 +745,7 @@ private void doSetup() throws Exception
733745

734746
beginAt("/mcc/" + getProjectName() + "/configureMcc.view");
735747
clickButton("OK");
748+
waitForCensusToLoad();
736749

737750
ApiPermissionsHelper helper = new ApiPermissionsHelper(this);
738751
if (!helper.isUserInGroup(getCurrentUser(), "MCC RAB Members", "/", PermissionsHelper.PrincipalType.USER))
@@ -750,6 +763,7 @@ private void doSetup() throws Exception
750763
{
751764
_containerHelper.createSubfolder(getProjectName() + "/Colonies", name, "MCC Colony");
752765
importStudy(getProjectName() + "/Colonies/" + name);
766+
waitForElement(Locator.tagWithText("a", "Populate Lookups"));
753767
}
754768
}
755769

@@ -769,7 +783,6 @@ private void importStudy(String containerPath)
769783

770784
beginAt(WebTestHelper.getBaseURL() + "/ehr/" + containerPath + "/ensureQcStates.view");
771785
clickButton("OK");
772-
773786
}
774787

775788
@Before

tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJCellHashingHandler.java

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class CellRangerVDJCellHashingHandler extends AbstractParameterizedOutput
4545

4646
public static final String TARGET_ASSAY = "targetAssay";
4747
public static final String DELETE_EXISTING_ASSAY_DATA = "deleteExistingAssayData";
48-
public static final String USE_GEX_BARCODES = "useGexBarcodes";
4948

5049
public CellRangerVDJCellHashingHandler()
5150
{
@@ -62,12 +61,9 @@ private static List<ToolParameterDescriptor> getDefaultParams()
6261
ToolParameterDescriptor.create("useOutputFileContainer", "Submit to Source File Workbook", "If checked, each job will be submitted to the same workbook as the input file, as opposed to submitting all jobs to the same workbook. This is primarily useful if submitting a large batch of files to process separately. This only applies if 'Run Separately' is selected.", "checkbox", new JSONObject(){{
6362
put("checked", true);
6463
}}, false)
65-
// ToolParameterDescriptor.create(USE_GEX_BARCODES, "Use GEX and TCR Cell Barcodes", "If checked, the cell barcode whitelist used for cell hashing will be the union of TCR and GEX cell barcodes. If T-cells are a rare component of total cells, this might enhance the effectiveness of the callers by providing more positive signal.", "checkbox", new JSONObject(){{
66-
// put("checked", true);
67-
// }}, false)
6864
));
6965

70-
ret.addAll(CellHashingService.get().getHashingCallingParams(false));
66+
ret.addAll(CellHashingService.get().getHashingCallingParams(true));
7167

7268
return ret;
7369
}
@@ -114,14 +110,7 @@ public class Processor implements SequenceOutputHandler.SequenceOutputProcessor
114110
public void init(JobContext ctx, List<SequenceOutputFile> inputFiles, List<RecordedAction> actions, List<SequenceOutputFile> outputsToCreate) throws UnsupportedOperationException, PipelineJobException
115111
{
116112
//NOTE: this is the pathway to import assay data, whether hashing is used or not
117-
CellHashingService.get().prepareHashingForVdjIfNeeded(ctx.getOutputDir(), ctx.getJob(), ctx.getSequenceSupport(), "tcrReadsetId", false);
118-
119-
if (ctx.getParams().optBoolean(USE_GEX_BARCODES, false))
120-
{
121-
ctx.getJob().getLogger().info("The union of TCR and GEX cell barcodes will be used for calling");
122-
Map<Integer, File> vLoupeIdToGexBarcodeDir = new HashMap<>();
123-
124-
}
113+
CellHashingService.get().prepareHashingForVdjIfNeeded(ctx, false);
125114
}
126115

127116
@Override
@@ -215,6 +204,27 @@ private void processVloupeFile(JobContext ctx, File perCellTsv, Readset rs, Reco
215204
parameters.basename = FileUtil.makeLegalName(rs.getName());
216205
parameters.allowableHtoBarcodes = htosPerReadset;
217206

207+
// If demuxEM used:
208+
if (parameters.methods.contains(CellHashingService.CALLING_METHOD.demuxem) || parameters.consensusMethods.contains(CellHashingService.CALLING_METHOD.demuxem))
209+
{
210+
ctx.getLogger().debug("demuxEM is used, adding H5 file");
211+
if (genomeId == null)
212+
{
213+
genomeId = ctx.getSequenceSupport().getCachedGenomes().iterator().next().getGenomeId();
214+
ctx.getLogger().debug("Unable to infer genome ID from output, defaulting to the first cached genome: " + genomeId);
215+
}
216+
217+
parameters.h5File = CellHashingService.get().getH5FileForGexReadset(ctx.getSequenceSupport(), rs.getReadsetId(), genomeId);
218+
if (parameters.h5File == null)
219+
{
220+
throw new PipelineJobException("Unable to find h5 file for: " + rs.getRowId());
221+
}
222+
else if (!parameters.h5File.exists())
223+
{
224+
throw new PipelineJobException("h5 file does not exist: " + parameters.h5File.getPath());
225+
}
226+
}
227+
218228
parameters.cellBarcodeWhitelistFile = createCellbarcodeWhitelist(ctx, perCellTsv, true);
219229
File existingCountMatrixUmiDir = CellHashingService.get().getExistingFeatureBarcodeCountDir(rs, CellHashingService.BARCODE_TYPE.hashing, ctx.getSequenceSupport());
220230

tcrdb/src/org/labkey/tcrdb/pipeline/MiXCRAnalysis.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
231231

232232
wrapper.addToEnvironment("JAVA", SequencePipelineService.get().getJavaFilepath());
233233
wrapper.addToEnvironment("SAMTOOLS", SequencePipelineService.get().getExeForPackage("SAMTOOLSPATH", "samtools").getPath());
234-
wrapper.addToEnvironment("PICARD", PicardWrapper.getPicardJar().getPath());
234+
wrapper.addToEnvironment("PICARD", PicardWrapper.getPicardJar(true).getPath());
235235
wrapper.setWorkingDir(outputDir);
236236
wrapper.execute(Arrays.asList("bash", bamScript.getPath(), inputBam.getPath(), forwardFq.getPath(), reverseFq.getPath()));
237237

0 commit comments

Comments
 (0)