Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d084f57
Update parameter name
bbimber May 15, 2024
12cc011
Ensure savedSeuratObjects.txt file has unique name per job
bbimber May 22, 2024
59ddec0
Fix typo
bbimber May 23, 2024
85cca6d
Add link to single cell management page
bbimber May 29, 2024
1549b62
Add support for useLeiden
bbimber May 29, 2024
ee4fe70
Update default for requireRiraImmune
bbimber Jun 3, 2024
ecec74b
Merge discvr-23.11 to discvr-24.3
bbimber Jun 5, 2024
2457505
Merge pull request #276 from BimberLab/24.3_fb_merge
bbimber Jun 5, 2024
b667a9a
Update nimble arguments
bbimber Jun 5, 2024
5587aec
Add Classify_Myeloid to RIRA step
bbimber Jun 7, 2024
e776fd2
Support GATK SVAnnotateStep
bbimber Jun 10, 2024
0aaf6e8
Drop unused bissnp code
bbimber Jun 12, 2024
cfc3175
Drop unused DockerHTCondorExecutionEngine code
bbimber Jun 12, 2024
d177bc4
Correct parameter label
bbimber Jun 12, 2024
043aa41
Support bcftools as optional liftover tool
bbimber Jun 12, 2024
fce1f1f
Inital support for paraGRAPH
bbimber Jun 12, 2024
53980d7
Update library type terms
bbimber Jun 12, 2024
fa22d6c
Add step to re-process Seurat prototypes
bbimber Jun 13, 2024
ab124b7
Bump braces from 3.0.2 to 3.0.3 in /jbrowse
dependabot[bot] Jun 13, 2024
eaf2e68
Merge discvr-23.11 to discvr-24.3
bbimber Jun 13, 2024
1f6482b
Merge pull request #277 from BimberLab/dependabot/npm_and_yarn/jbrows…
bbimber Jun 13, 2024
4cc44ec
Add step to replace the sample in BAM/VCFs based on the current DB info
bbimber Jun 13, 2024
3d40d73
Merge pull request #278 from BimberLab/24.3_fb_merge
bbimber Jun 13, 2024
cc6b74b
Support parameter for collapsing Gamma-only cells to Gamma/Delta
bbimber Jun 14, 2024
b32d6ea
Update DimplotLogic to allow missing reductions
bbimber Jun 15, 2024
6ae10e4
Backport Dimplot update
bbimber Jun 15, 2024
0a4c838
Support additional liftover params
bbimber Jun 17, 2024
99cabf0
Support additional liftover params
bbimber Jun 17, 2024
9f5f325
Account for difference between hg19 and GRCh37 MT contigs
bbimber Jun 17, 2024
c1c85c8
Add chain_file default views
bbimber Jun 18, 2024
f99aba9
Fix paraGRAPH typo
bbimber Jun 18, 2024
8bfdceb
Fix paraGRAPH / idxdepth args
bbimber Jun 18, 2024
53eadbc
Ensure bcftools liftover sorts VCF
bbimber Jun 18, 2024
a6a8d3d
Resolve paragraph executables within PATH
bbimber Jun 18, 2024
2fa2097
Clean up paraGRAPH VCF code
bbimber Jun 19, 2024
65bdfe5
Fix handling of idxdepth/paraGRAPH coverage
bbimber Jun 19, 2024
15f6fc2
Bugfix for SampleRenameStep without intervals
bbimber Jun 21, 2024
82ecaa8
Bugfix for ParagraphStep
bbimber Jun 21, 2024
53d362d
Change sorting field type parsing to Long instead of Int
Jun 20, 2024
5683143
Merge discvr-23.11 to discvr-24.3
bbimber Jun 22, 2024
881d11d
Switch ParagraphStep to use docker
bbimber Jun 23, 2024
ae1ec6d
Update ParagraphStep/docker execution
bbimber Jun 23, 2024
bf37e48
Update ParagraphStep/docker to include VCF index
bbimber Jun 23, 2024
11e89d3
Paragraph: log to stderr instead of separate file
bbimber Jun 23, 2024
4cf4f57
Merge pull request #283 from BimberLab/24.3_fb_merge
bbimber Jun 23, 2024
3962332
Paragraph: drop verbose
bbimber Jun 23, 2024
2df816e
Paragraph: simplify output
bbimber Jun 23, 2024
f3192f6
Paragraph: perform more cleanup
bbimber Jun 24, 2024
f4ab831
Merge pull request #281 from BimberLab/23.11_fb_sortingTypeFix
bbimber Jun 24, 2024
5a3b5e3
Merge discvr-23.11 to discvr-24.3
bbimber Jul 4, 2024
6b4a6f3
Support min cells to keep param for TcrFilter
bbimber Jul 5, 2024
6c9b31a
Bugfix to TcrFilter thresholdToKeep param
bbimber Jul 6, 2024
ae89008
Add check to MergeSeurat for single-cell objects
bbimber Jul 6, 2024
aabe6ff
Merge pull request #285 from BimberLab/24.3_fb_merge
bbimber Jul 6, 2024
02cca7c
Improve pipeline logging
bbimber Jul 6, 2024
da774b2
Make ParagraphStep split jobs
bbimber Jul 8, 2024
bb92e7c
Caching fix (#282)
hextraza Jul 11, 2024
8ce794c
Merge discvr-23.11 to discvr-24.3
bbimber Jul 11, 2024
795712c
Merge pull request #286 from BimberLab/24.3_fb_merge
bbimber Jul 11, 2024
dea2dbb
Fix merge conflict
bbimber Jul 14, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ protected boolean isThrowNonZeroExits()
return _throwNonZeroExits;
}

protected static File resolveFileInPath(String exe, @Nullable String packageName, boolean throwIfNotFound)
public static File resolveFileInPath(String exe, @Nullable String packageName, boolean throwIfNotFound)
{
File fn;
String path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public List<String> getBaseArgs(@Nullable String toolName)
List<String> args = new ArrayList<>();
args.add(SequencePipelineService.get().getJavaFilepath());
args.addAll(SequencePipelineService.get().getJavaOpts(_maxRamOverride));
args.add("-DGATK_STACKTRACE_ON_USER_EXCEPTION=true");
args.add("-jar");
args.add(getJAR().getPath());

Expand All @@ -98,6 +99,8 @@ public List<String> getBaseArgs(@Nullable String toolName)
args.add(toolName);
}



return args;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
package org.labkey.api.sequenceanalysis.run;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.labkey.api.pipeline.PipelineJobException;
import org.labkey.api.sequenceanalysis.pipeline.PipelineOutputTracker;
import org.labkey.api.sequenceanalysis.pipeline.SequencePipelineService;
import org.labkey.api.writer.PrintWriters;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;

public class DockerWrapper extends AbstractCommandWrapper
{
private final String _containerName;
private File _tmpDir = null;

public DockerWrapper(String containerName, Logger log)
{
super(log);
_containerName = containerName;
}

public void setTmpDir(File tmpDir)
{
_tmpDir = tmpDir;
}

public void executeWithDocker(List<String> containerArgs, File workDir, PipelineOutputTracker tracker) throws PipelineJobException
{
File localBashScript = new File(workDir, "docker.sh");
File dockerBashScript = new File(workDir, "dockerRun.sh");
tracker.addIntermediateFile(localBashScript);
tracker.addIntermediateFile(dockerBashScript);

setWorkingDir(workDir);
try (PrintWriter writer = PrintWriters.getPrintWriter(localBashScript); PrintWriter dockerWriter = PrintWriters.getPrintWriter(dockerBashScript))
{
writer.println("#!/bin/bash");
writer.println("set -x");
writer.println("WD=`pwd`");
writer.println("HOME=`echo ~/`");
writer.println("DOCKER='" + SequencePipelineService.get().getDockerCommand() + "'");
writer.println("sudo $DOCKER pull " + _containerName);
writer.println("sudo $DOCKER run --rm=true \\");
writer.println("\t-v \"${WD}:/work\" \\");
writer.println("\t-v \"${HOME}:/homeDir\" \\");
if (_tmpDir != null)
{
writer.println("\t-v \"" + _tmpDir.getPath() + ":/tmp\" \\");
}
writer.println("\t--entrypoint /bin/bash \\");
writer.println("\t-w /work \\");
Integer maxRam = SequencePipelineService.get().getMaxRam();
if (maxRam != null)
{
writer.println("\t-e SEQUENCEANALYSIS_MAX_RAM=" + maxRam + " \\");
writer.println("\t--memory='" + maxRam + "g' \\");
}
writer.println("\t" + _containerName + " \\");
writer.println("\t/work/" + dockerBashScript.getName());
writer.println("EXIT_CODE=$?");
writer.println("echo 'Docker run exit code: '$EXIT_CODE");
writer.println("exit $EXIT_CODE");

dockerWriter.println("#!/bin/bash");
dockerWriter.println("set -x");
dockerWriter.println(StringUtils.join(containerArgs, " "));
dockerWriter.println("EXIT_CODE=$?");
dockerWriter.println("echo 'Exit code: '$?");
dockerWriter.println("exit $EXIT_CODE");
}
catch (IOException e)
{
throw new PipelineJobException(e);
}

execute(Arrays.asList("/bin/bash", localBashScript.getPath()));
}

public File ensureLocalCopy(File input, File workingDirectory, PipelineOutputTracker output) throws PipelineJobException
{
try
{
if (workingDirectory.equals(input.getParentFile()))
{
return input;
}

File local = new File(workingDirectory, input.getName());
if (!local.exists())
{
getLogger().debug("Copying file locally: " + input.getPath());
FileUtils.copyFile(input, local);
}

output.addIntermediateFile(local);

return local;
}
catch (IOException e)
{
throw new PipelineJobException(e);
}
}
}
32 changes: 4 additions & 28 deletions SequenceAnalysis/pipeline_code/sequence_tools_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -335,30 +335,6 @@ else
fi


#
# BisSNP
#
echo ""
echo ""
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo "Install BisSNP"
echo ""
cd $LKSRC_DIR

if [[ ! -e ${LKTOOLS_DIR}/BisSNP.jar || ! -z $FORCE_REINSTALL ]];
then
echo "Cleaning up previous installs"
rm -Rf BisSNP*
rm -Rf $LKTOOLS_DIR/BisSNP.jar

wget $WGET_OPTS https://downloads.sourceforge.net/project/bissnp/BisSNP-0.82.2/BisSNP-0.82.2.jar

install ./BisSNP-0.82.2.jar $LKTOOLS_DIR/BisSNP.jar
else
echo "Already installed"
fi


#
#mosaik
#
Expand Down Expand Up @@ -510,10 +486,10 @@ then
rm -Rf bcftools*
rm -Rf $LKTOOLS_DIR/bcftools

wget $WGET_OPTS https://github.com/samtools/bcftools/releases/download/1.18/bcftools-1.18.tar.bz2
tar xjvf bcftools-1.18.tar.bz2
chmod 755 bcftools-1.18
cd bcftools-1.18
wget $WGET_OPTS https://github.com/samtools/bcftools/releases/download/1.20/bcftools-1.20.tar.bz2
tar xjvf bcftools-1.20.tar.bz2
chmod 755 bcftools-1.20
cd bcftools-1.20
rm -f plugins/liftover.c
wget $WGET_OPTS -P plugins https://raw.githubusercontent.com/freeseek/score/master/liftover.c

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<!--<column name="rowid" />-->
<column name="genomeId1" />
<column name="genomeId2" />
<column name="source" />
<column name="version" />
<column name="datedisabled" />
<column name="chainFile" />
</columns>
<sorts>
<sort column="genomeId1/name"/>
<sort column="genomeId2/name"/>
<sort column="version"/>
</sorts>
</customView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<!--<column name="rowid" />-->
<column name="genomeId1" />
<column name="genomeId2" />
<column name="source" />
<column name="version" />
<column name="dateDisabled" />
<column name="chainFile" />
<column name="chainFile/DataFileUrl" />
</columns>
<sorts>
<sort column="genomeId1/name"/>
<sort column="genomeId2/name"/>
<sort column="version"/>
</sorts>
</customView>
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,24 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
maxValue: 1.0,
value: 0.95,
fieldLabel: 'Min Percent Match',
helpPopup: 'In order to lift to the target genome, the feature must have at least this percent match. Lower this value to be more permissive; however, this risks incorrect liftovers',
helpPopup: 'In order to lift to the target genome, the feature must have at least this percent match. Lower this value to be more permissive; however, this risks incorrect liftovers. This is ignored if using bcftools.',
itemId: 'pctField'
},{
xtype: 'checkbox',
itemId: 'dropGenotypes',
checked: false,
helpPopup: 'If checked, no genotypes will be written to the output file (applies to VCFs only). This can be useful (and necessary) when lifting VCFs with extremely high sample number.',
fieldLabel: 'Drop Genotypes'
},{
xtype: 'checkbox',
itemId: 'useBcfTools',
checked: false,
fieldLabel: 'Use bcftools'
},{
xtype: 'checkbox',
itemId: 'doNotRetainUnmapped',
checked: false,
fieldLabel: 'Do Not Retain Unmapped'
}].concat(SequenceAnalysis.window.OutputHandlerWindow.getCfgForToolParameters(this.toolParameters)),
buttons: [{
text: 'Submit',
Expand Down Expand Up @@ -152,6 +162,14 @@ Ext4.define('SequenceAnalysis.window.LiftoverWindow', {
params.dropGenotypes = this.down('#dropGenotypes').getValue();
}

if (this.down('#useBcfTools').getValue()){
params.useBcfTools = this.down('#useBcfTools').getValue();
}

if (this.down('#doNotRetainUnmapped').getValue()){
params.doNotRetainUnmapped = this.down('#doNotRetainUnmapped').getValue();
}

Ext4.Msg.wait('Saving...');
LABKEY.Ajax.request({
url: LABKEY.ActionURL.buildURL('sequenceanalysis', 'runSequenceHandler', this.containerPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import org.labkey.sequenceanalysis.analysis.RnaSeqcHandler;
import org.labkey.sequenceanalysis.analysis.SbtGeneCountHandler;
import org.labkey.sequenceanalysis.analysis.UnmappedSequenceBasedGenotypeHandler;
import org.labkey.sequenceanalysis.analysis.UpdateReadsetFilesHandler;
import org.labkey.sequenceanalysis.button.AddSraRunButton;
import org.labkey.sequenceanalysis.button.ArchiveReadsetsButton;
import org.labkey.sequenceanalysis.button.ChangeReadsetStatusButton;
Expand All @@ -77,6 +78,7 @@
import org.labkey.sequenceanalysis.run.alignment.BowtieWrapper;
import org.labkey.sequenceanalysis.run.alignment.GSnapWrapper;
import org.labkey.sequenceanalysis.run.alignment.MosaikWrapper;
import org.labkey.sequenceanalysis.run.alignment.ParagraphStep;
import org.labkey.sequenceanalysis.run.alignment.Pbmm2Wrapper;
import org.labkey.sequenceanalysis.run.alignment.StarWrapper;
import org.labkey.sequenceanalysis.run.alignment.VulcanWrapper;
Expand Down Expand Up @@ -113,6 +115,7 @@
import org.labkey.sequenceanalysis.run.util.FastqcRunner;
import org.labkey.sequenceanalysis.run.util.GenomicsDBAppendHandler;
import org.labkey.sequenceanalysis.run.util.GenomicsDBImportHandler;
import org.labkey.sequenceanalysis.run.util.SVAnnotateStep;
import org.labkey.sequenceanalysis.run.variant.*;
import org.labkey.sequenceanalysis.util.Barcoder;
import org.labkey.sequenceanalysis.util.ChainFileValidator;
Expand Down Expand Up @@ -299,6 +302,7 @@ public static void registerPipelineSteps()
SequencePipelineService.get().registerPipelineStep(new MendelianViolationReportStep.Provider());
SequencePipelineService.get().registerPipelineStep(new SummarizeGenotypeQualityStep.Provider());
SequencePipelineService.get().registerPipelineStep(new BcftoolsFillTagsStep.Provider());
SequencePipelineService.get().registerPipelineStep(new SVAnnotateStep.Provider());

//handlers
SequenceAnalysisService.get().registerFileHandler(new LiftoverHandler());
Expand Down Expand Up @@ -333,6 +337,8 @@ public static void registerPipelineSteps()
SequenceAnalysisService.get().registerFileHandler(new PbsvJointCallingHandler());
SequenceAnalysisService.get().registerFileHandler(new DeepVariantHandler());
SequenceAnalysisService.get().registerFileHandler(new GLNexusHandler());
SequenceAnalysisService.get().registerFileHandler(new ParagraphStep());
SequenceAnalysisService.get().registerFileHandler(new UpdateReadsetFilesHandler());

SequenceAnalysisService.get().registerReadsetHandler(new MultiQCHandler());
SequenceAnalysisService.get().registerReadsetHandler(new RestoreSraDataHandler());
Expand Down
Loading