Skip to content

Commit 0a4c838

Browse files
committed
Support additional liftover params
1 parent 6ae10e4 commit 0a4c838

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

SequenceAnalysis/resources/web/SequenceAnalysis/window/LiftoverWindow.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
157157
params.dropGenotypes = this.down('#dropGenotypes').getValue();
158158
}
159159

160+
if (this.down('#useBcfTools').getValue()){
161+
params.useBcfTools = this.down('#useBcfTools').getValue();
162+
}
163+
164+
if (this.down('#doNotRetainUnmapped').getValue()){
165+
params.doNotRetainUnmapped = this.down('#doNotRetainUnmapped').getValue();
166+
}
167+
160168
Ext4.Msg.wait('Saving...');
161169
LABKEY.Ajax.request({
162170
url: LABKEY.ActionURL.buildURL('sequenceanalysis', 'runSequenceHandler', this.containerPath),

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/LiftoverHandler.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
176176

177177
boolean dropGenotypes = params.optBoolean("dropGenotypes", false);
178178
boolean useBcfTools = params.optBoolean("useBcfTools", false);
179+
boolean doNotRetainUnmapped = params.optBoolean("doNotRetainUnmapped", false);
179180

180181
int chainFileId = params.getInt("chainFileId");
181182
File chainFile = ctx.getSequenceSupport().getCachedData(chainFileId);
@@ -214,7 +215,7 @@ else if (_vcfFileType.isType(f.getFile()))
214215
}
215216

216217
File lifted = new File(outDir, baseName + ".lifted-" + targetGenomeId + ext);
217-
File unmappedOutput = new File(outDir, baseName + ".unmapped-" + targetGenomeId + ext);
218+
File unmappedOutput = doNotRetainUnmapped ? new File(outDir, baseName + ".unmapped-" + targetGenomeId + ext) : null;
218219

219220
try
220221
{
@@ -260,7 +261,11 @@ else if (_vcfFileType.isType(f.getFile()))
260261
ctx.addSequenceOutput(so1);
261262
}
262263

263-
if (!unmappedOutput.exists())
264+
if (unmappedOutput == null)
265+
{
266+
// skip
267+
}
268+
else if (!unmappedOutput.exists())
264269
{
265270
job.getLogger().info("no unmapped intervals");
266271
}

0 commit comments

Comments
 (0)