Skip to content

Commit 90847d7

Browse files
authored
Merge pull request #198 from LabKey/fb_merge_22.11_to_develop
Merge discvr-22.11 to develop
2 parents e99491d + 20e7774 commit 90847d7

File tree

10 files changed

+198
-87
lines changed

10 files changed

+198
-87
lines changed

SequenceAnalysis/api-src/org/labkey/api/sequenceanalysis/run/AbstractDiscvrSeqWrapper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ public AbstractDiscvrSeqWrapper(Logger log)
1010
super(log);
1111
}
1212

13+
@Override
14+
protected String getPackageName()
15+
{
16+
return "DISCVRSEQPATH";
17+
}
18+
1319
@Override
1420
protected String getJarName()
1521
{

SequenceAnalysis/api-src/org/labkey/api/sequenceanalysis/run/AbstractGatk4Wrapper.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import htsjdk.variant.utils.SAMSequenceDictionaryExtractor;
44
import org.apache.commons.lang3.StringUtils;
55
import org.apache.logging.log4j.Logger;
6-
import org.apache.logging.log4j.LogManager;
6+
import org.jetbrains.annotations.Nullable;
77
import org.labkey.api.pipeline.PipelineJobException;
88
import org.labkey.api.pipeline.PipelineJobService;
99
import org.labkey.api.sequenceanalysis.SequenceAnalysisService;
@@ -36,7 +36,7 @@ protected String getJarName()
3636

3737
protected File getJAR()
3838
{
39-
String path = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath("GATKPATH");
39+
String path = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(getPackageName());
4040
if (path != null)
4141
{
4242
return new File(path);
@@ -56,7 +56,7 @@ public void setMaxRamOverride(Integer maxRamOverride)
5656
_maxRamOverride = maxRamOverride;
5757
}
5858

59-
protected void addJavaHomeToEnvironment()
59+
public void addJava8HomeToEnvironment()
6060
{
6161
//since GATK requires java8, set JAVA_HOME to match this:
6262
File java8 = new File(SequencePipelineService.get().getJava8FilePath()).getParentFile();
@@ -98,13 +98,28 @@ public String getVersionString() throws PipelineJobException
9898
}
9999

100100
public List<String> getBaseArgs()
101+
{
102+
return getBaseArgs(null);
103+
}
104+
105+
protected String getPackageName()
106+
{
107+
return "GATKPATH";
108+
}
109+
110+
public List<String> getBaseArgs(@Nullable String toolName)
101111
{
102112
List<String> args = new ArrayList<>();
103113
args.add(SequencePipelineService.get().getJava8FilePath());
104114
args.addAll(SequencePipelineService.get().getJavaOpts(_maxRamOverride));
105115
args.add("-jar");
106116
args.add(getJAR().getPath());
107117

118+
if (toolName != null)
119+
{
120+
args.add(toolName);
121+
}
122+
108123
return args;
109124
}
110125

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,11 @@
11
package org.labkey.api.sequenceanalysis.run;
22

33
import org.apache.logging.log4j.Logger;
4-
import org.apache.logging.log4j.LogManager;
5-
import org.labkey.api.pipeline.PipelineJobService;
6-
import org.labkey.api.sequenceanalysis.pipeline.SequencePipelineService;
7-
import org.labkey.api.sequenceanalysis.run.AbstractCommandWrapper;
8-
import java.io.File;
9-
import java.util.ArrayList;
10-
import java.util.List;
114

12-
public class DISCVRSeqRunner extends AbstractCommandWrapper
5+
public class DISCVRSeqRunner extends AbstractDiscvrSeqWrapper
136
{
147
public DISCVRSeqRunner(Logger log)
158
{
169
super(log);
1710
}
18-
19-
protected String getJarName()
20-
{
21-
return "DISCVRSeq.jar";
22-
}
23-
24-
protected File getJar()
25-
{
26-
String path = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath("DISCVRSEQPATH");
27-
if (path != null)
28-
{
29-
return new File(path);
30-
}
31-
32-
path = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(SequencePipelineService.SEQUENCE_TOOLS_PARAM);
33-
if (path == null)
34-
{
35-
path = PipelineJobService.get().getAppProperties().getToolsDirectory();
36-
}
37-
38-
return path == null ? new File(getJarName()) : new File(path, getJarName());
39-
40-
}
41-
42-
public List<String> getBaseArgs(String toolName)
43-
{
44-
List<String> args = new ArrayList<>();
45-
args.add(SequencePipelineService.get().getJava8FilePath());
46-
args.addAll(SequencePipelineService.get().getJavaOpts());
47-
args.add("-jar");
48-
args.add(getJar().getPath());
49-
args.add(toolName);
50-
51-
return args;
52-
}
5311
}

SequenceAnalysis/pipeline_code/sequence_tools_install.sh

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ SKIP_PACKAGE_MANAGER=
4141
CLEAN_SRC=
4242
LK_HOME=
4343
LK_USER=
44-
MAVEN_OPTS="-Xss10m"
45-
46-
#NOTE: java/javac not automatically picked up
47-
if [ ! -z "${JAVA_HOME:+x}" ]; then
48-
PATH=${JAVA_HOME}/bin:$PATH
49-
fi
5044

5145
while getopts "d:u:fpc" arg;
5246
do
@@ -102,7 +96,7 @@ echo "Install location"
10296
echo ""
10397
echo "LKTOOLS_DIR: $LKTOOLS_DIR"
10498
echo "LKSRC_DIR: $LKSRC_DIR"
105-
WGET_OPTS="--read-timeout=10 --secure-protocol=auto --no-check-certificate"
99+
WGET_OPTS="--read-timeout=10 --secure-protocol=auto --no-check-certificate -q"
106100

107101
#
108102
# Install required software
@@ -113,18 +107,6 @@ echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
113107
echo "Install Required packages via the package manager"
114108
echo ""
115109

116-
# can install EPEL to get additional repositories if necessary. May be needed on RHEL/CentOS
117-
#OS=`cat /etc/redhat-release | awk {'print $1}'`
118-
#if [ "$OS" = "CentOS" ]
119-
#then
120-
# if [[ ! -e ${LKSRC_DIR}/epel-release-6-8.noarch.rpm ]];
121-
# then
122-
# cd $LKSRC_DIR
123-
# wget $WGET_OPTS http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
124-
# wget $WGET_OPTS http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
125-
# rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
126-
# fi
127-
#fi
128110

129111
if [ ! -z $SKIP_PACKAGE_MANAGER ]; then
130112
echo "Skipping package install"
@@ -134,18 +116,6 @@ elif [ $(which yum) ]; then
134116
elif [ $(which apt-get) ]; then
135117
echo "Using apt-get"
136118

137-
#this is a possible setup for R
138-
#add-apt-repository "deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/"
139-
#gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 or gpg --hkp://keyserver keyserver.ubuntu.com:80 --recv-key E084DAB9
140-
#gpg -a --export E084DAB9 | sudo apt-key add -
141-
142-
#install oracle java
143-
#apt-get install python-software-properties
144-
#add-apt-repository ppa:webupd8team/java
145-
#apt-get update
146-
#apt-get install oracle-java7-installer
147-
#update-alternatives --config java
148-
#update-alternatives --config javac
149119
#apt-get -y update
150120
apt-get -q -y install bzip2 libbz2-dev libc6 libc6-dev libncurses5-dev python3-dev unzip zip ncftp gcc make perl libssl-dev libgcc1 libstdc++6 zlib1g zlib1g-dev libboost-all-dev python3-numpy python3-scipy libexpat1-dev pkg-config subversion flex subversion libgoogle-perftools-dev perl-doc git cmake maven r-base r-cran-rcpp python-pip
151121
else
@@ -460,6 +430,7 @@ then
460430
echo "Cleaning up previous installs"
461431
rm -Rf bismark_*
462432
rm -Rf Bismark_*
433+
rm -Rf 0.22.3*
463434
rm -Rf $LKTOOLS_DIR/bismark
464435
rm -Rf $LKTOOLS_DIR/bismark2bedGraph
465436
rm -Rf $LKTOOLS_DIR/bismark2report
@@ -468,12 +439,12 @@ then
468439
rm -Rf $LKTOOLS_DIR/coverage2cytosine
469440
rm -Rf $LKTOOLS_DIR/deduplicate_bismark
470441

471-
wget $WGET_OPTS https://github.com/FelixKrueger/Bismark/archive/0.17.0.tar.gz
472-
gunzip 0.17.0.tar.gz
473-
tar -xf 0.17.0.tar
442+
wget $WGET_OPTS https://github.com/FelixKrueger/Bismark/archive/0.22.3.tar.gz
443+
gunzip 0.22.3.tar.gz
444+
tar -xf 0.22.3.tar
474445
echo "Compressing TAR"
475-
gzip 0.17.0.tar
476-
cd Bismark-0.17.0
446+
gzip 0.22.3.tar
447+
cd Bismark-0.22.3
477448

478449
install ./bismark $LKTOOLS_DIR/bismark
479450
install ./bismark2bedGraph $LKTOOLS_DIR/bismark2bedGraph
@@ -885,7 +856,7 @@ then
885856
PIP_VERSION=`pip -V | cut -d '(' -f 2 | sed 's/python //' | cut -c 1 2>1`
886857

887858
if [[ $PIP_VERSION == '2' ]];then
888-
CUTADAPT_BRANCH='v3.4'
859+
CUTADAPT_BRANCH='v1.18'
889860
fi
890861

891862
pip install --target ${LKTOOLS_DIR}/cutadapt_pip git+https://github.com/marcelm/cutadapt.git@${CUTADAPT_BRANCH}
@@ -1129,7 +1100,7 @@ echo "Installing lofreq"
11291100
echo ""
11301101
cd $LKSRC_DIR
11311102

1132-
if [[ ! -e ${LKTOOLS_DIR}/trimmomatic.jar || ! -z $FORCE_REINSTALL ]];
1103+
if [[ ! -e ${LKTOOLS_DIR}/lofreq || ! -z $FORCE_REINSTALL ]];
11331104
then
11341105
rm -Rf lofreq_star*
11351106
rm -Rf $LKTOOLS_DIR/lofreq_star*

SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceAnalysisServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public File ensureVcfIndex(File vcf, Logger log, boolean forceRecreate) throws I
275275
}
276276
else
277277
{
278-
Index idx = IndexFactory.createDynamicIndex(vcf, new VCFCodec());
278+
Index idx = vcf.getName().toLowerCase().endsWith(".gz") ? IndexFactory.createIndex(vcf, new VCFCodec(), IndexFactory.IndexType.TABIX) : IndexFactory.createDynamicIndex(vcf, new VCFCodec());
279279
idx.writeBasedOnFeatureFile(vcf);
280280
if (!expectedIdx.exists())
281281
{

SequenceAnalysis/src/org/labkey/sequenceanalysis/SequencePipelineServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ public String getJava8FilePath()
272272
java8Home = StringUtils.trimToNull(System.getenv("JDK_18"));
273273
}
274274

275+
if (java8Home == null && StringUtils.trimToNull(System.getenv("JAVA_HOME_8")) != null)
276+
{
277+
java8Home = StringUtils.trimToNull(System.getenv("JAVA_HOME_8"));
278+
}
279+
275280
if (java8Home != null)
276281
{
277282
File ret = new File(java8Home, "bin");

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/PbsvJointCallingHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
230230

231231
private File runPbsvCall(JobContext ctx, List<File> inputs, ReferenceGenome genome, String outputBaseName, @Nullable String contig, boolean jobCompleted) throws PipelineJobException
232232
{
233+
if (contig != null)
234+
{
235+
ctx.getJob().setStatus(PipelineJob.TaskStatus.running, "Processing: " + contig);
236+
}
237+
233238
if (inputs.isEmpty())
234239
{
235240
throw new PipelineJobException("No inputs provided");

jbrowse/resources/web/jbrowse/window/ModifyJsonConfigWindow.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,24 @@ Ext4.define('JBrowse.window.ModifyJsonConfigWindow', {
9595
handler: function (gridBtn) {
9696
this.addAttribute('excludeFromSearch', true, 'BOOLEAN');
9797
}
98+
},{
99+
text: 'Create Full Text Index?',
100+
scope: this,
101+
handler: function (gridBtn) {
102+
this.addAttribute('createFullTextIndex', true, 'BOOLEAN');
103+
}
104+
},{
105+
text: 'Info Fields For Full Text Search',
106+
scope: this,
107+
handler: function (gridBtn) {
108+
this.addAttribute('infoFieldsForFullTextSearch', null, 'STRING');
109+
}
110+
},{
111+
text: 'Annotations For Full Text Search',
112+
scope: this,
113+
handler: function (gridBtn) {
114+
this.addAttribute('annotationsForFullTextSearch', null, 'STRING');
115+
}
98116
},{
99117
text: 'Other',
100118
scope: this,

jbrowse/src/org/labkey/jbrowse/model/JBrowseSession.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,4 +403,17 @@ public static JBrowseSession getGenericGenomeSession(int genomeId)
403403

404404
return session;
405405
}
406+
407+
public JsonFile getTrack(User u, String trackGUID)
408+
{
409+
for (JsonFile jf : getJsonFiles(u, false))
410+
{
411+
if (trackGUID.equalsIgnoreCase(jf.getObjectId()))
412+
{
413+
return jf;
414+
}
415+
}
416+
417+
return null;
418+
}
406419
}

0 commit comments

Comments
 (0)