Skip to content

Commit 51b9e0d

Browse files
authored
Merge pull request #109 from LabKey/fb_merge_discvr-21.3
Merge discvr 21.3
2 parents 9e55c61 + b79216e commit 51b9e0d

File tree

32 files changed

+3964
-4905
lines changed

32 files changed

+3964
-4905
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
/travisSettings.sh
66

77
# Created by npm install
8-
/jbrowse/jb_run.js
9-
/jbrowse/jb_setup.js
10-
/jbrowse/.gradle
8+
jbrowse/jb_run.js
9+
jbrowse/jb_setup.js
10+
jbrowse/.gradle
11+
jbrowse/resources/external/jb-cli/*
1112

1213
# Ignore labkey-npm build artifacts
1314
**/gen/**

SequenceAnalysis/pipeline_code/sequence_tools_install.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,65 @@ else
276276
echo "Already installed"
277277
fi
278278

279+
280+
#
281+
# GATK3
282+
#
283+
echo ""
284+
echo ""
285+
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
286+
echo "Install GATK3"
287+
echo ""
288+
cd $LKSRC_DIR
289+
290+
if [[ ! -e ${LKTOOLS_DIR}/Queue.jar || ! -z $FORCE_REINSTALL ]];
291+
then
292+
rm -Rf ${LKTOOLS_DIR}/Queue.jar
293+
rm -Rf ${LKTOOLS_DIR}/GenomeAnalysisTK.jar
294+
rm -Rf ${LKSRC_DIR}/gatk
295+
296+
mkdir -p gatk
297+
cd gatk
298+
299+
echo "Downloading GATK from GIT"
300+
git clone git://github.com/broadgsa/gatk-protected.git
301+
cd gatk-protected
302+
git checkout tags/3.7
303+
cd ../
304+
305+
#this manually increases Xss in the hope of fixing intermittent StackOverlowErrors
306+
sed -i '/<groupId>org.scala-tools<\/groupId>/a <configuration><jvmArgs><jvmArg>-Xss10m<\/jvmArg><\/jvmArgs><\/configuration>' ./gatk-protected/pom.xml
307+
308+
#fix multithreading bug
309+
sed -i 's/private final List<GenomeLoc> upstreamDeletionsLoc = new LinkedList<>();/private final ThreadLocal< List<GenomeLoc> > upstreamDeletionsLoc = ThreadLocal.withInitial(() -> new LinkedList<GenomeLoc>());/g' ./gatk-protected/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java
310+
sed -i 's/upstreamDeletionsLoc.add(genomeLoc);/upstreamDeletionsLoc.get().add(genomeLoc);/g' ./gatk-protected/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java
311+
sed -i 's/upstreamDeletionsLoc.iterator();/upstreamDeletionsLoc.get().iterator();/g' ./gatk-protected/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/genotyper/GenotypingEngine.java
312+
313+
#libVectorLogless compile:
314+
#see: https://gatkforums.broadinstitute.org/gatk/discussion/9947/crashes-with-segmentation-fault-in-shipped-libvectorloglesspairhmm-so
315+
sed -i 's/<!--<USE_GCC>1<\/USE_GCC>-->/<USE_GCC>1<\/USE_GCC>/g' ./gatk-protected/public/VectorPairHMM/pom.xml
316+
sed -i 's/<!--<C_COMPILER>\/opt\/gcc-4.8.2\/bin\/gcc<\/C_COMPILER>-->/<C_COMPILER>\/usr\/bin\/gcc<\/C_COMPILER>/g' ./gatk-protected/public/VectorPairHMM/pom.xml
317+
sed -i 's/<!--<CPP_COMPILER>\/opt\/gcc-4.8.2\/bin\/g++<\/CPP_COMPILER>-->/<CPP_COMPILER>\/usr\/bin\/g++<\/CPP_COMPILER>/g' ./gatk-protected/public/VectorPairHMM/pom.xml
318+
cd gatk-protected/public/VectorPairHMM/
319+
mvn verify
320+
cd ../../../
321+
cp gatk-protected/public/VectorPairHMM/target/libVectorLoglessPairHMM.so ${LKTOOLS_DIR}
322+
323+
cd gatk-protected
324+
325+
#remove due to compilation / dependency resolution error
326+
rm ./public/external-example/src/main/java/org/mycompany/app/*
327+
rm ./public/external-example/src/test/java/org/mycompany/app/*
328+
sed -i '/<module>external-example<\/module>/d' ./public/pom.xml
329+
330+
#NOTE: can add -P\!queue to skip queue in some cases
331+
mvn verify -U
332+
mvn package
333+
cp ./protected/gatk-package-distribution/target/gatk-package-distribution-3.7.jar ${LKTOOLS_DIR}/GenomeAnalysisTK.jar
334+
cp ./protected/gatk-queue-package-distribution/target/gatk-queue-package-distribution-3.7.jar ${LKTOOLS_DIR}/Queue.jar
335+
fi
336+
337+
279338
if [[ ! -e ${LKTOOLS_DIR}/DISCVRSeq.jar || ! -z $FORCE_REINSTALL ]];
280339
then
281340
rm -Rf DISCVRSeq*

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/preprocessing/TagPcrSummaryStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static class Provider extends AbstractAnalysisStepProvider<TagPcrSummaryS
6969
{
7070
public Provider()
7171
{
72-
super("Tag-PCR", "Tag-PCR Integration Sites", null, "This will produce a table summarizing unique alignments in this BAM. It was originally created to summarize genomic insertions.", Arrays.asList(
72+
super("Tag-PCR", "Map Integration Sites", null, "This will produce a table summarizing unique genome/transgene junctions using a BAM.", Arrays.asList(
7373
ToolParameterDescriptor.create(OUTPUT_GENBANK, "Create Genbank Output", "If selected, this will output a genbank file summarizing amplicons and primers", "checkbox", new JSONObject(){{
7474
put("checked", true);
7575
}}, true),
@@ -349,7 +349,7 @@ public void execute(File bamFile, File referenceFasta, File outputTable, @Nullab
349349
List<String> args = new ArrayList<>();
350350
args.addAll(getBaseArgs());
351351

352-
args.add("TagPcrSummary");
352+
args.add("IntegrationSiteMapper");
353353

354354
args.add("--bam");
355355
args.add(bamFile.getPath());

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/AbstractGenomicsDBImportHandler.java

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Set<String> getContigsInInputs(List<File> inputVCFs, Logger log) throws Pipeline
301301
return _contigsInInputs;
302302
}
303303

304-
private void copyToLevelFiles(PipelineJob job, File sourceWorkspace, File destinationWorkspace, boolean removeOtherFiles, boolean overwriteExisting) throws IOException
304+
private void copyTopLevelFiles(PipelineJob job, File sourceWorkspace, File destinationWorkspace, boolean removeOtherFiles, boolean overwriteExisting) throws IOException, PipelineJobException
305305
{
306306
job.getLogger().info("Copying top-level files from: " + sourceWorkspace.getPath());
307307
if (removeOtherFiles)
@@ -333,6 +333,28 @@ private void copyToLevelFiles(PipelineJob job, File sourceWorkspace, File destin
333333

334334
FileUtils.copyFile(source, dest);
335335
}
336+
337+
File metaDir = new File(sourceWorkspace, "genomicsdb_meta_dir");
338+
File metaDirDest = new File(sourceWorkspace, "genomicsdb_meta_dir");
339+
if (metaDirDest.exists())
340+
{
341+
if (!overwriteExisting)
342+
{
343+
job.getLogger().debug("workspace file exists, will not overwrite: " + metaDirDest.getPath());
344+
}
345+
else
346+
{
347+
FileUtils.deleteDirectory(metaDirDest);
348+
}
349+
}
350+
351+
if (metaDir.exists() && !metaDirDest.exists())
352+
{
353+
job.getLogger().debug("Copying directory with rsync: " + metaDir.getPath());
354+
new SimpleScriptWrapper(job.getLogger()).execute(Arrays.asList(
355+
"rsync", "-r", "-a", "--delete", "--no-owner", "--no-group", "--no-perms", "--chmod=D2770,F660", metaDir.getPath(), metaDirDest.getParentFile().getPath()
356+
));
357+
}
336358
}
337359

338360
protected File getMarkerFile(File workspace)
@@ -684,7 +706,7 @@ private void copyWorkspace(JobContext ctx, File sourceWorkspace, File destinatio
684706

685707
if (!haveCopiedTopLevelFiles)
686708
{
687-
copyToLevelFiles(ctx.getJob(), sourceWorkspace, destinationWorkspaceFolder, removeExistingTopLevelFiles, overwriteTopLevelFiles);
709+
copyTopLevelFiles(ctx.getJob(), sourceWorkspace, destinationWorkspaceFolder, removeExistingTopLevelFiles, overwriteTopLevelFiles);
688710
haveCopiedTopLevelFiles = true;
689711
}
690712

@@ -707,7 +729,6 @@ private void copyWorkspace(JobContext ctx, File sourceWorkspace, File destinatio
707729
}
708730
else
709731
{
710-
//TODO: dest permissions?
711732
ctx.getLogger().debug("Copying directory with rsync: " + sourceFolder.getPath());
712733
//NOTE: since neither path will end in slashes, rsync to the parent folder should result in the correct placement
713734
new SimpleScriptWrapper(ctx.getLogger()).execute(Arrays.asList(

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/GenotypeGVCFsWrapper.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ else if (f.isDirectory() && doneFile.exists())
226226
{
227227
ctx.getLogger().info("Files will be marked for deletion after this step");
228228
toDelete.add(movedFile);
229-
toDelete.add(movedIdx);
229+
if (movedIdx != null)
230+
{
231+
toDelete.add(movedIdx);
232+
}
233+
230234
if (doneFile.exists())
231235
{
232236
toDelete.add(doneFile);

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/variant/MendelianViolationReportStep.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
5757
VariantProcessingStepOutputImpl output = new VariantProcessingStepOutputImpl();
5858

5959
List<String> options = new ArrayList<>();
60-
Integer maxThreads = SequenceTaskHelper.getMaxThreads(getPipelineCtx().getLogger());
61-
if (maxThreads != null)
62-
{
63-
options.add("-nt");
64-
options.add(maxThreads.toString());
65-
}
66-
6760
if (getProvider().getParameterByName("excludeFiltered").extractValue(getPipelineCtx().getJob(), getProvider(), getStepIdx(), Boolean.class, false))
6861
{
6962
options.add("--excludeFiltered");

SequenceAnalysis/test/src/org/labkey/test/tests/external/labModules/SequenceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,4 +1673,4 @@ private void basicOutputFilesTest(boolean sequencePipelineEnabled) throws Except
16731673

16741674
Assert.assertFalse("File still exists: " + existing.getPath(), existing.exists());
16751675
}
1676-
}
1676+
}

jbrowse/config/dev.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,19 @@ clientConfig.plugins =
2727
[new webpack.ProvidePlugin({regeneratorRuntime: 'regenerator-runtime'}),
2828
new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))
2929

30+
clientConfig.module.rules = clientConfig.module.rules.concat(
31+
{
32+
test: /\.m?js$/,
33+
exclude: /node_modules/,
34+
use: {
35+
loader: 'babel-loader',
36+
options: {
37+
presets: [
38+
['@babel/preset-env', { targets: "defaults" }],
39+
['@babel/preset-react']
40+
]
41+
}
42+
}
43+
})
3044

3145
module.exports = [clientConfig]

jbrowse/config/prod.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,19 @@ clientConfig.plugins =
2727
[new webpack.ProvidePlugin({regeneratorRuntime: 'regenerator-runtime'}),
2828
new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))
2929

30+
clientConfig.module.rules = clientConfig.module.rules.concat(
31+
{
32+
test: /\.m?js$/,
33+
exclude: /node_modules/,
34+
use: {
35+
loader: 'babel-loader',
36+
options: {
37+
presets: [
38+
['@babel/preset-env', { targets: "defaults" }],
39+
['@babel/preset-react']
40+
]
41+
}
42+
}
43+
})
3044

3145
module.exports = [clientConfig]

jbrowse/config/watch.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,19 @@ clientConfig.plugins =
2727
[new webpack.ProvidePlugin({regeneratorRuntime: 'regenerator-runtime'}),
2828
new NodePolyfillPlugin()].concat(constants.processPlugins(entryPoints))
2929

30+
clientConfig.module.rules = clientConfig.module.rules.concat(
31+
{
32+
test: /\.m?js$/,
33+
exclude: /node_modules/,
34+
use: {
35+
loader: 'babel-loader',
36+
options: {
37+
presets: [
38+
['@babel/preset-env', { targets: "defaults" }],
39+
['@babel/preset-react']
40+
]
41+
}
42+
}
43+
})
3044

3145
module.exports = [clientConfig]

0 commit comments

Comments
 (0)