Skip to content

Commit

Permalink
Merge branch 'hotfix-1.27.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Mar 30, 2022
2 parents ff73950 + b48cbad commit 92fff7e
Show file tree
Hide file tree
Showing 52 changed files with 381 additions and 382 deletions.
56 changes: 26 additions & 30 deletions gemma-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>gemma</artifactId>
<groupId>gemma</groupId>
<version>1.27.10</version>
<version>1.27.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gemma-core</artifactId>
Expand All @@ -14,22 +14,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<configuration>
<target>
<taskdef name="schemaexport" classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
<classpath>
<path refid="maven.dependency.classpath"/>
</classpath>
</taskdef>
<mkdir dir="target/schema"/>
<schemaexport quiet="true" text="true" create="true" drop="false" delimiter=";"
output="${project.build.directory}/schema/gemma-ddl.sql"
config="${project.basedir}/src/main/resources/hibernate.cfg.xml">
<fileset dir="src/main/resources" includes="**/*.hbm.xml"/>
</schemaexport>
</target>
</configuration>
<version>3.0.0</version>
<executions>
<execution>
<id>version-file</id>
Expand All @@ -46,12 +31,31 @@
</configuration>
</execution>
<execution>
<id>schema-export</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<taskdef name="schemaexport" classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"/>
<mkdir dir="${project.build.directory}/schema"/>
<schemaexport quiet="true" text="true" create="true" drop="false" delimiter=";"
output="${project.build.directory}/schema/gemma-ddl.sql"
config="${project.basedir}/src/main/resources/hibernate.cfg.xml">
<fileset dir="${project.basedir}/src/main/resources" includes="**/*.hbm.xml"/>
</schemaexport>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -120,7 +124,7 @@
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.7,)</versionRange>
<versionRange>[3.0.0,)</versionRange>
<goals>
<goal>run</goal>
</goals>
Expand Down Expand Up @@ -150,7 +154,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<version>3.1.2</version>
<executions>
<execution>
<phase>process-resources</phase>
Expand All @@ -167,14 +171,6 @@
<outputDirectory>${project.build.directory}/schema</outputDirectory>
<includes>**/*.sql</includes>
</artifactItem>
<artifactItem>
<groupId>gemma</groupId>
<artifactId>gemma-model</artifactId>
<version>1.10.1</version>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/schema</outputDirectory>
<includes>**/*.sql</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down Expand Up @@ -264,7 +260,7 @@
<version>1.7</version>
</dependency>

<!-- Lucene (version is synced with baseCode -->
<!-- Lucene (version is synced with baseCode) -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
Expand All @@ -276,7 +272,7 @@
<version>${lucene.version}</version>
</dependency>

<!-- Jena -->
<!-- Jena (version is synced with baseCode) -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
Expand Down Expand Up @@ -375,7 +371,7 @@
<version>1.7.4</version>
</dependency>
<!-- bit array -->
<!-- it can't be updated though because the binary format has changed and we store those in the database -->
<!-- it can't be updated though because the binary format has changed, and we store those in the database -->
<dependency>
<groupId>com.googlecode.javaewah</groupId>
<artifactId>JavaEWAH</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions gemma-core/src/main/config/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
log4j.appender.stderr=org.apache.log4j.ConsoleAppender
log4j.appender.stderr.target=System.err
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
log4j.appender.stderr.layout.ConversionPattern=[Gemma %d] %p [%t] %C.%M(%L) | %m%n
log4j.appender.stderr.layout.ConversionPattern=%d %highlight{%p} %style{%pid}{magenta} [%t] %style{%C.%M(%L)}{cyan} | %m%n

# Log to a file. Note that if File is a relative path, the output file goes wherever the application JVM was started from.
# Define gemma.log.dir as a parameter to your JAVA_OPTS and make sure this is passed to java when you start it.
Expand All @@ -19,7 +19,7 @@ log4j.appender.file.File=${gemma.log.dir}/gemma.log
log4j.appender.file.MaxFileSize=10000KB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[Gemma - %t (%d)] %p %C.%M(%L) | %m%nLso
log4j.appender.file.layout.ConversionPattern=[Gemma - %t (%d)] %p %C.%M(%L) | %m%n

# Log file for WARNING and higher level errors
log4j.appender.warningFile=org.apache.log4j.DailyRollingFileAppender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import cern.colt.bitvector.BitMatrix;
import cern.colt.list.DoubleArrayList;
import cern.colt.list.ObjectArrayList;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.time.StopWatch;
import org.apache.commons.logging.Log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@

import cern.colt.matrix.DoubleMatrix1D;
import cern.colt.matrix.impl.DenseDoubleMatrix1D;
import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.TransformerUtils;
import org.apache.commons.collections4.Transformer;
import org.apache.commons.collections4.TransformerUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.StopWatch;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.stereotype.Component;
import ubic.basecode.dataStructure.matrix.DenseDoubleMatrix;
import ubic.basecode.dataStructure.matrix.DoubleMatrix;
Expand Down Expand Up @@ -140,6 +143,9 @@ private static BioAssayDimension createBADMap( List<BioMaterial> columnsToUse )
return reorderedDim;
}

@Autowired
private AsyncTaskExecutor taskExecutor;

/**
* Determine if any factor should be treated as the intercept term.
*/
Expand Down Expand Up @@ -1432,9 +1438,8 @@ private Map<String, LinearModelSummary> runAnalysis( final DoubleMatrix<Composit
private Future<?> runAnalysisFuture( final DesignMatrix designMatrix, final DoubleMatrix<String, String> data,
final Map<String, LinearModelSummary> rawResults, final DoubleMatrix1D librarySize,
final DifferentialExpressionAnalysisConfig config ) {
ExecutorService service = Executors.newSingleThreadExecutor();

Future<?> f = service.submit( new Runnable() {
Future<?> f = taskExecutor.submit( new Runnable() {
@Override
public void run() {
StopWatch timer = new StopWatch();
Expand Down Expand Up @@ -1476,7 +1481,6 @@ public void run() {
}
} );

service.shutdown();
return f;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
package ubic.gemma.core.analysis.service;

import org.apache.commons.collections.Transformer;
import org.apache.commons.collections.iterators.TransformIterator;
import org.apache.commons.collections4.Transformer;
import org.apache.commons.collections4.iterators.TransformIterator;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ protected void buildOptions( Options options ) {

Option expOption = Option.builder( "e" ).required().hasArg().argName( "Expression experiment name" )
.desc(
"Expression experiment short name. Most tools recognize comma-delimited values given on the command line, "
+ "and if this option is omitted, the tool will be applied to all expression experiments." )
"Expression experiment short name" )
.longOpt( "experiment" ).build();

options.addOption( expOption );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.core.task.TaskExecutor;
import ubic.gemma.core.apps.GemmaCLI.CommandGroup;
import ubic.gemma.core.loader.association.NCBIGene2GOAssociationLoader;
import ubic.gemma.core.loader.association.NCBIGene2GOAssociationParser;
Expand Down Expand Up @@ -64,8 +66,9 @@ protected void buildOptions( Options options ) {
@Override
protected void doWork() throws Exception {
TaxonService taxonService = this.getBean( TaxonService.class );
AsyncTaskExecutor taskExecutor = this.getBean( AsyncTaskExecutor.class );

NCBIGene2GOAssociationLoader gene2GOAssLoader = new NCBIGene2GOAssociationLoader();
NCBIGene2GOAssociationLoader gene2GOAssLoader = new NCBIGene2GOAssociationLoader( taskExecutor );

gene2GOAssLoader.setPersisterHelper( this.getPersisterHelper() );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.lang3.StringUtils;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.core.task.TaskExecutor;
import ubic.gemma.core.apps.GemmaCLI.CommandGroup;
import ubic.gemma.core.loader.genome.gene.ncbi.NcbiGeneLoader;
import ubic.gemma.core.util.AbstractCLI;
Expand Down Expand Up @@ -98,7 +100,7 @@ protected boolean requireLogin() {

@Override
protected void doWork() throws Exception {
loader = new NcbiGeneLoader();
loader = new NcbiGeneLoader( this.getBean( AsyncTaskExecutor.class ) );
TaxonService taxonService = this.getBean( TaxonService.class );
loader.setTaxonService( taxonService );
loader.setPersisterHelper( this.getPersisterHelper() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package ubic.gemma.core.externalDb;

import org.apache.commons.collections.map.LRUMap;
import org.apache.commons.collections4.map.LRUMap;
import org.apache.commons.lang3.StringUtils;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
Expand Down
Loading

0 comments on commit 92fff7e

Please sign in to comment.