From a3955f69bb983b42cbf21b67a3fb3ace0250280a Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 00:50:03 -0400 Subject: [PATCH 01/99] Update versions for hotfix --- gemma-cli/pom.xml | 2 +- gemma-core/pom.xml | 2 +- gemma-groovy-support/pom.xml | 2 +- gemma-rest/pom.xml | 2 +- gemma-web/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gemma-cli/pom.xml b/gemma-cli/pom.xml index cde02c1a6a..69186e606a 100644 --- a/gemma-cli/pom.xml +++ b/gemma-cli/pom.xml @@ -3,7 +3,7 @@ gemma gemma - 1.31.9 + 1.31.10-SNAPSHOT 4.0.0 gemma-cli diff --git a/gemma-core/pom.xml b/gemma-core/pom.xml index c389ce1089..40ac00fe44 100644 --- a/gemma-core/pom.xml +++ b/gemma-core/pom.xml @@ -3,7 +3,7 @@ gemma gemma - 1.31.9 + 1.31.10-SNAPSHOT 4.0.0 gemma-core diff --git a/gemma-groovy-support/pom.xml b/gemma-groovy-support/pom.xml index 9dce9fc7d7..de96a3962f 100644 --- a/gemma-groovy-support/pom.xml +++ b/gemma-groovy-support/pom.xml @@ -6,7 +6,7 @@ gemma gemma - 1.31.9 + 1.31.10-SNAPSHOT gemma-groovy-support diff --git a/gemma-rest/pom.xml b/gemma-rest/pom.xml index cc77791d5f..4a323be3f7 100644 --- a/gemma-rest/pom.xml +++ b/gemma-rest/pom.xml @@ -5,7 +5,7 @@ gemma gemma - 1.31.9 + 1.31.10-SNAPSHOT 4.0.0 diff --git a/gemma-web/pom.xml b/gemma-web/pom.xml index 79ebbc5c35..1d52b0b3ad 100644 --- a/gemma-web/pom.xml +++ b/gemma-web/pom.xml @@ -3,7 +3,7 @@ gemma gemma - 1.31.9 + 1.31.10-SNAPSHOT 4.0.0 gemma-web diff --git a/pom.xml b/pom.xml index 22b235dd00..b37ae793b3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ Gemma gemma gemma - 1.31.9 + 1.31.10-SNAPSHOT 2005 The Gemma Project for meta-analysis of genomics data https://gemma.msl.ubc.ca From cb09942964f4a965d1d5a52f5ee6f2ac454fa544 Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Thu, 11 Jul 2024 15:33:32 -0700 Subject: [PATCH 02/99] address a case not handled correction and improve logging --- .../persistence/persister/ExpressionPersister.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java b/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java index 5964ba3a96..4470650ac8 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java @@ -332,14 +332,16 @@ private void fillInFactorValueAssociations( FactorValue factorValue, Caches cach // validate categorical v.s. continuous factor values FactorType factorType = factorValue.getExperimentalFactor().getType(); if ( factorType.equals( FactorType.CONTINUOUS ) && factorValue.getMeasurement() == null ) { - throw new IllegalStateException( "Continuous factor value must have a measurement." ); - } else if ( factorType.equals( FactorType.CATEGORICAL ) && factorValue.getCharacteristics().isEmpty() ) { - throw new IllegalStateException( "Categorical factor value must have at least one characteristic." ); + throw new IllegalStateException( "Continuous factor values must have a measurement: " + factorValue ); + } else if ( factorType.equals( FactorType.CATEGORICAL ) && factorValue.getCharacteristics().isEmpty() + && !factorValue.getExperimentalFactor().getName().equals( "batch" ) ) { + // by convention, batch / block factors in Gemma don't have their own characteristics + throw new IllegalStateException( "Non-batch categorical factor values must have at least one characteristic: " + factorValue ); } // sanity check if ( factorValue.getCharacteristics().size() > 0 && factorValue.getMeasurement() != null ) { - throw new IllegalStateException( "FactorValue can only have one of ontology entry or measurement." ); + throw new IllegalStateException( "FactorValue can only have one of ontology entry or measurement: " + factorValue ); } // measurement will cascade, but not unit. From bda973a92ae05c791331a13a307247be00d759dd Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 9 Jul 2024 23:57:41 -0400 Subject: [PATCH 03/99] Remove BatchEffectType now that the database has been fully migrated to enum --- .../hibernate/BatchEffectType.java | 25 ------------------- .../model/analysis/Investigation.hbm.xml | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/hibernate/BatchEffectType.java diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/BatchEffectType.java b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/BatchEffectType.java deleted file mode 100644 index 2e44bfadcc..0000000000 --- a/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/BatchEffectType.java +++ /dev/null @@ -1,25 +0,0 @@ -package ubic.gemma.persistence.hibernate; - -import org.hibernate.engine.spi.SessionImplementor; -import org.hibernate.type.EnumType; - -import java.sql.ResultSet; -import java.sql.SQLException; - -/** - * Workaround to handle existing batch effect value in the database. - *

- * FIXME: remove this once the 1.31 is out and the database has been fully migrated (see #894 for details). - * @author poirigui - */ -public class BatchEffectType extends EnumType { - - @Override - public Object nullSafeGet( ResultSet rs, String[] names, SessionImplementor session, Object owner ) throws SQLException { - String value = rs.getString( names[0] ); - if ( value != null && value.startsWith( "This data set may have a batch artifact" ) ) { - return ubic.gemma.model.expression.experiment.BatchEffectType.NO_BATCH_INFO; - } - return super.nullSafeGet( rs, names, session, owner ); - } -} diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml index a2220428b8..49188b7503 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml @@ -75,7 +75,7 @@ - + ubic.gemma.model.expression.experiment.BatchEffectType true From cb648e4cc4d7c7eb41238e570d222e49de5f5a3f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 11 Jul 2024 11:02:31 -0400 Subject: [PATCH 04/99] Produce 404 errors when accessing /showExpressionExperiment.html with a subset ID --- .../experiment/ExpressionExperimentController.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java index f6ec32f284..eecc0dc01b 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java @@ -910,13 +910,13 @@ public ModelAndView showBioMaterials( @RequestParam("id") Long id ) { } @RequestMapping(value = { "/showExpressionExperiment.html", "/", "/show" }, params = { "id" }) - public ModelAndView showExpressionExperiment( @RequestParam(value = "id") Long id ) { - BioAssaySet bioAssaySet; - bioAssaySet = expressionExperimentService.loadBioAssaySet( id ); - if ( bioAssaySet == null ) { + public ModelAndView showExpressionExperimentById( @RequestParam(value = "id") Long id ) { + ExpressionExperiment expressionExperiment; + expressionExperiment = expressionExperimentService.load( id ); + if ( expressionExperiment == null ) { throw new EntityNotFoundException( "No experiment with ID " + id + "." ); } - return showBioAssaySet( bioAssaySet ); + return showExpressionExperiment( expressionExperiment ); } @RequestMapping(value = { "/showExpressionExperiment.html", "/", "/show" }, params = { "shortName" }) @@ -925,10 +925,10 @@ public ModelAndView showExpressionExperimentByShortName( @RequestParam(value = " if ( experimentExperiment == null ) { throw new EntityNotFoundException( "No experiment with short name " + shortName + "." ); } - return showBioAssaySet( experimentExperiment ); + return showExpressionExperiment( experimentExperiment ); } - private ModelAndView showBioAssaySet( BioAssaySet ee ) { + private ModelAndView showExpressionExperiment( ExpressionExperiment ee ) { return new ModelAndView( "expressionExperiment.detail" ) .addObject( "expressionExperiment", ee ) .addObject( "eeId", ee.getId() ) From d11a1ae15f7aaf2885deb9e135546b0951808d20 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 00:45:32 -0400 Subject: [PATCH 05/99] Use select fetching for experimentAnalyzed to take advantage of second-level caching --- .../main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml index 19cca0175d..0f7b894f8e 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml @@ -62,7 +62,7 @@ + fetch="select"> Date: Fri, 12 Jul 2024 09:26:18 -0400 Subject: [PATCH 06/99] Simplify equality for FactorValue --- .../expression/experiment/FactorValue.java | 45 ++----------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java index f8b150cb4b..c7e8eafee1 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java @@ -205,47 +205,10 @@ public boolean equals( Object object ) { * the fields; pain in butt */ - if ( this.getExperimentalFactor() != null ) { - if ( that.getExperimentalFactor() == null ) - return false; - if ( !this.getExperimentalFactor().equals( that.getExperimentalFactor() ) ) { - return false; - } - } - - if ( !this.getCharacteristics().isEmpty() ) { - if ( that.getCharacteristics().size() != this.getCharacteristics().size() ) - return false; - - for ( Characteristic c : this.getCharacteristics() ) { - boolean match = false; - for ( Characteristic c2 : that.getCharacteristics() ) { - if ( c.equals( c2 ) ) { - if ( match ) { - return false; - } - match = true; - } - } - if ( !match ) - return false; - } - - } - - if ( this.getMeasurement() != null ) { - if ( that.getMeasurement() == null ) - return false; - if ( !this.getMeasurement().equals( that.getMeasurement() ) ) - return false; - } - - if ( this.getValue() != null ) { - return that.getValue() != null && this.getValue().equals( that.getValue() ); - } - - // everything is empty... - return true; + return Objects.equals( getExperimentalFactor(), that.getExperimentalFactor() ) + && Objects.equals( getMeasurement(), that.getMeasurement() ) + && Objects.equals( getCharacteristics(), that.getCharacteristics() ) + && Objects.equals( getValue(), that.getValue() ); } @Override From 551d5fe6c8fa18312eb8515c2d3593ce4912577a Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 10:11:15 -0400 Subject: [PATCH 07/99] Add test and additional simplification for FV equals() --- .../expression/experiment/FactorValue.java | 7 --- .../experiment/FactorValueTest.java | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 gemma-core/src/test/java/ubic/gemma/model/expression/experiment/FactorValueTest.java diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java index c7e8eafee1..1826484e49 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java @@ -187,8 +187,6 @@ public int hashCode() { @Override public boolean equals( Object object ) { - if ( object == null ) - return false; if ( this == object ) return true; if ( !( object instanceof FactorValue ) ) @@ -196,15 +194,10 @@ public boolean equals( Object object ) { FactorValue that = ( FactorValue ) object; if ( this.getId() != null && that.getId() != null ) return this.getId().equals( that.getId() ); - - if ( that.getId() == null && this.getId() != null ) - return false; - /* * at this point, we know we have two FactorValues, at least one of which is transient, so we have to look at * the fields; pain in butt */ - return Objects.equals( getExperimentalFactor(), that.getExperimentalFactor() ) && Objects.equals( getMeasurement(), that.getMeasurement() ) && Objects.equals( getCharacteristics(), that.getCharacteristics() ) diff --git a/gemma-core/src/test/java/ubic/gemma/model/expression/experiment/FactorValueTest.java b/gemma-core/src/test/java/ubic/gemma/model/expression/experiment/FactorValueTest.java new file mode 100644 index 0000000000..18cf92684f --- /dev/null +++ b/gemma-core/src/test/java/ubic/gemma/model/expression/experiment/FactorValueTest.java @@ -0,0 +1,45 @@ +package ubic.gemma.model.expression.experiment; + +import org.junit.Test; +import ubic.gemma.model.common.measurement.Measurement; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +public class FactorValueTest { + + @Test + public void testEquals() { + FactorValue fv1 = new FactorValue(); + fv1.setMeasurement( new Measurement() ); + FactorValue fv2 = new FactorValue(); + fv2.setMeasurement( new Measurement() ); + assertEquals( fv1, fv2 ); + } + + @Test + public void testEqualsWithDifferentCharacteristics() { + FactorValue fv1 = new FactorValue(); + fv1.getCharacteristics().add( createStatement( "bob", "is", "a farmer" ) ); + FactorValue fv2 = new FactorValue(); + fv2.getCharacteristics().add( createStatement( "bob", "is", "an insurance broken" ) ); + assertNotEquals( fv1, fv2 ); + } + + @Test + public void testEqualsWithDifferentValues() { + FactorValue fv1 = new FactorValue(); + fv1.setValue( "bob is a farmer" ); + FactorValue fv2 = new FactorValue(); + fv2.setValue( "bob is an insurance broken" ); + assertNotEquals( fv1, fv2 ); + } + + private Statement createStatement( String subject, String predicate, String object ) { + Statement s = new Statement(); + s.setSubject( subject ); + s.setPredicate( predicate ); + s.setObject( object ); + return s; + } +} \ No newline at end of file From 31a3c2bc8618a51d73dde2d4251a21f133d9bab3 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 10:11:45 -0400 Subject: [PATCH 08/99] No longer require at least one characteristic in a categorical FV Instead, expect the measurement to be null. Relocate validation of FVs in the DAO instead so it can apply universally. --- .../persister/ExpressionPersister.java | 19 ------------------- .../experiment/FactorValueDaoImpl.java | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java b/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java index 4470650ac8..f68471a914 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java @@ -34,7 +34,6 @@ import ubic.gemma.model.expression.biomaterial.BioMaterial; import ubic.gemma.model.expression.biomaterial.Compound; import ubic.gemma.model.expression.experiment.*; -import ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentPrePersistService; import ubic.gemma.persistence.service.expression.bioAssay.BioAssayDao; import ubic.gemma.persistence.service.expression.bioAssayData.BioAssayDimensionDao; import ubic.gemma.persistence.service.expression.biomaterial.BioMaterialDao; @@ -324,26 +323,8 @@ private Set fillInExpressionExperimentDataVectorAssociations( Expressi } private void fillInFactorValueAssociations( FactorValue factorValue, Caches caches ) { - this.fillInExperimentalFactorAssociations( factorValue.getExperimentalFactor(), caches ); - factorValue.setExperimentalFactor( this.persistExperimentalFactor( factorValue.getExperimentalFactor(), caches ) ); - - // validate categorical v.s. continuous factor values - FactorType factorType = factorValue.getExperimentalFactor().getType(); - if ( factorType.equals( FactorType.CONTINUOUS ) && factorValue.getMeasurement() == null ) { - throw new IllegalStateException( "Continuous factor values must have a measurement: " + factorValue ); - } else if ( factorType.equals( FactorType.CATEGORICAL ) && factorValue.getCharacteristics().isEmpty() - && !factorValue.getExperimentalFactor().getName().equals( "batch" ) ) { - // by convention, batch / block factors in Gemma don't have their own characteristics - throw new IllegalStateException( "Non-batch categorical factor values must have at least one characteristic: " + factorValue ); - } - - // sanity check - if ( factorValue.getCharacteristics().size() > 0 && factorValue.getMeasurement() != null ) { - throw new IllegalStateException( "FactorValue can only have one of ontology entry or measurement: " + factorValue ); - } - // measurement will cascade, but not unit. if ( factorValue.getMeasurement() != null && factorValue.getMeasurement().getUnit() != null ) { factorValue.getMeasurement().setUnit( this.persistUnit( factorValue.getMeasurement().getUnit() ) ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java index 6c87900630..ca9212dd86 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java @@ -23,7 +23,9 @@ import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; +import org.springframework.util.Assert; import ubic.gemma.model.expression.biomaterial.BioMaterial; +import ubic.gemma.model.expression.experiment.FactorType; import ubic.gemma.model.expression.experiment.FactorValue; import ubic.gemma.model.expression.experiment.FactorValueValueObject; import ubic.gemma.persistence.service.AbstractDao; @@ -54,6 +56,18 @@ public FactorValueDaoImpl( SessionFactory sessionFactory ) { super( FactorValue.class, sessionFactory ); } + @Override + public FactorValue create( FactorValue factorValue ) { + // validate categorical v.s. continuous factor values + FactorType factorType = factorValue.getExperimentalFactor().getType(); + if ( factorType.equals( FactorType.CONTINUOUS ) ) { + Assert.notNull( factorValue.getMeasurement(), "Continuous factor values must have a measurement: " + factorValue ); + } else if ( factorType.equals( FactorType.CATEGORICAL ) ) { + Assert.isNull( factorValue.getMeasurement(), "Categorical factor values must not have a measurement: " + factorValue ); + } + return super.create( factorValue ); + } + @Override public Collection findByValue( String valuePrefix ) { //noinspection unchecked From f010a3a9d0c3f6395d1449481f0e4ba54f8d7ecf Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 10:54:50 -0400 Subject: [PATCH 09/99] Fix GemmaRestClient tests now that #1134 is resolved Remove Redirection interface and implementation, HTTPURLConnection are transparently redirected by default. --- .../gemma/core/util/GemmaRestApiClient.java | 8 +------- .../core/util/GemmaRestApiClientImpl.java | 9 --------- .../core/util/GemmaRestApiClientTest.java | 19 +++++++++++++------ 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClient.java b/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClient.java index e1754916f1..b5cdabdf75 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClient.java +++ b/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClient.java @@ -1,6 +1,5 @@ package ubic.gemma.core.util; -import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import java.io.IOException; @@ -54,13 +53,8 @@ interface EmptyResponse extends Response { } /** - * For endpoint that return a redirection. + * For endpoints that may return an error. */ - interface Redirection extends Response { - - String getLocation(); - } - interface ErrorResponse extends Response { Error getError(); diff --git a/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClientImpl.java b/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClientImpl.java index 65a8195ab6..c5fab4ae19 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClientImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/util/GemmaRestApiClientImpl.java @@ -107,9 +107,6 @@ private Response performInternal( String endpoint, @Nullable MultiValueMap= 300 && status < 400 ) { - // redirection - return new RedirectionImpl( httpConnection.getHeaderField( "Location" ) ); } else if ( status >= 400 && status < 600 ) { return readJsonResponseFromStream( httpConnection.getErrorStream(), connection.getContentEncoding(), ErrorResponseImpl.class ); } else { @@ -184,12 +181,6 @@ private static class ErrorImpl implements Error { } } - @Data - @EqualsAndHashCode(callSuper = false) - private static class RedirectionImpl extends ResponseImpl implements Redirection { - private final String location; - } - private static class EmptyResponseImpl extends ResponseImpl implements EmptyResponse { } diff --git a/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java b/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java index a0ed6c191f..46a94e1d12 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java @@ -1,7 +1,6 @@ package ubic.gemma.core.util; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; import java.io.IOException; @@ -24,7 +23,12 @@ public static void setUp() { @Test public void test() throws IOException { assertThat( client.perform( "/" ) ) - .isInstanceOf( GemmaRestApiClient.DataResponse.class ); + .asInstanceOf( type( GemmaRestApiClient.DataResponse.class ) ) + .extracting( GemmaRestApiClient.DataResponse::getData ) + .hasFieldOrProperty( "welcome" ) + .hasFieldOrProperty( "version" ) + .hasFieldOrProperty( "externalDatabases" ) + .hasFieldOrProperty( "buildInfo" ); } @Test @@ -43,7 +47,6 @@ public void testEndpointThatRequiresCredentials() throws IOException { } @Test - @Ignore("Requires https://github.com/PavlidisLab/Gemma/issues/1133 to be addressed first.") public void testEndpointWithIncorrectCredentials() throws IOException { try { client.setAuthentication( "foo", "1234" ); @@ -58,16 +61,20 @@ public void testEndpointWithIncorrectCredentials() throws IOException { } @Test - @Ignore("Requires https://github.com/PavlidisLab/Gemma/issues/1134 to be addressed first.") public void testEndpointWithRedirection() throws IOException { assertThat( client.perform( "/datasets/1/analyses/differential/resultSets" ) ) - .isInstanceOf( GemmaRestApiClient.Redirection.class ); + .asInstanceOf( type( GemmaRestApiClient.DataResponse.class ) ) + .extracting( GemmaRestApiClient.DataResponse::getData ) + .hasFieldOrPropertyWithValue( "id", 1 ); } @Test public void testNotFoundEndpoint() throws IOException { assertThat( client.perform( "/bleh" ) ) - .isInstanceOf( GemmaRestApiClient.ErrorResponse.class ); + .asInstanceOf( type( GemmaRestApiClient.ErrorResponse.class ) ) + .satisfies( r -> { + assertThat( r.getError().getCode() ).isEqualTo( 404 ); + } ); } @Test From e4a0737ad96a4262cbd3208810d737c8eef3c12c Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 11:26:39 -0400 Subject: [PATCH 10/99] Fix GemmaRestClient test with redirection --- .../java/ubic/gemma/core/util/GemmaRestApiClientTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java b/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java index 46a94e1d12..4e136001bf 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/util/GemmaRestApiClientTest.java @@ -6,6 +6,7 @@ import java.io.IOException; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.InstanceOfAssertFactories.list; import static org.assertj.core.api.InstanceOfAssertFactories.type; import static ubic.gemma.core.util.test.Assumptions.assumeThatResourceIsAvailable; @@ -65,7 +66,9 @@ public void testEndpointWithRedirection() throws IOException { assertThat( client.perform( "/datasets/1/analyses/differential/resultSets" ) ) .asInstanceOf( type( GemmaRestApiClient.DataResponse.class ) ) .extracting( GemmaRestApiClient.DataResponse::getData ) - .hasFieldOrPropertyWithValue( "id", 1 ); + .asInstanceOf( list( Object.class ) ) + .isNotEmpty() + .allSatisfy( o -> assertThat( o ).hasFieldOrPropertyWithValue( "analysis.bioAssaySetId", 1 ) ); } @Test From 7bfea27c8e1436e63c8367369f93225e6367bfbc Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 13:07:22 -0400 Subject: [PATCH 11/99] Handle WrongClassException in load() by returning null --- .../gemma/persistence/service/AbstractDao.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java index b04c747706..ead44e9bef 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java @@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.hibernate.Hibernate; import org.hibernate.SessionFactory; +import org.hibernate.WrongClassException; import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; import org.hibernate.metadata.ClassMetadata; @@ -183,11 +184,16 @@ public Collection load( Collection ids ) { @Override public T load( Long id ) { - // Don't use 'load' because if the object doesn't exist you can get an invalid proxy. - //noinspection unchecked - T result = ( T ) sessionFactory.getCurrentSession().get( elementClass, id ); - AbstractDao.log.trace( String.format( String.format( "Loaded %s.", formatEntity( result ) ) ) ); - return result; + try { + // Don't use 'load' because if the object doesn't exist you can get an invalid proxy. + //noinspection unchecked + T result = ( T ) sessionFactory.getCurrentSession().get( elementClass, id ); + AbstractDao.log.trace( String.format( String.format( "Loaded %s.", formatEntity( result ) ) ) ); + return result; + } catch ( WrongClassException e ) { + AbstractDao.log.warn( "Wrong class for ID " + id + ", will return null.", e ); + return null; + } } @Override From 1383233df0403f1d07f9f456c79f7101220415fb Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 12 Jul 2024 14:13:24 -0400 Subject: [PATCH 12/99] Use @RequestParam in ExpressionExperimentController --- .../ExpressionExperimentController.java | 46 +++++++------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java index eecc0dc01b..dbab3bb1cb 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentController.java @@ -85,9 +85,8 @@ import ubic.gemma.web.util.EntityNotFoundException; import ubic.gemma.web.view.TextView; +import javax.annotation.Nullable; import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.text.DateFormat; import java.text.NumberFormat; @@ -257,9 +256,7 @@ public boolean doesCurrentUserOwnExperiment( Long eeId ) { } @RequestMapping("/filterExpressionExperiments.html") - public ModelAndView filter( HttpServletRequest request, HttpServletResponse response ) { - String searchString = request.getParameter( "filter" ); - + public ModelAndView filter( @RequestParam("filter") String searchString ) { // Validate the filtering search criteria. if ( StringUtils.isBlank( searchString ) ) { return new ModelAndView( new RedirectView( "/expressionExperiment/showAllExpressionExperiments.html", true ) ).addObject( "message", "No search criteria provided" ); @@ -856,20 +853,14 @@ public Collection searchExpressionExperiments( /** * Show all experiments (optionally conditioned on either a taxon, a list of ids, or a platform) - * - * @param request request - * @param response response - * @return model and view */ @RequestMapping(value = { "/showAllExpressionExperiments.html", "/showAll" }) - public ModelAndView showAllExpressionExperiments( HttpServletRequest request, HttpServletResponse response ) { - + public ModelAndView showAllExpressionExperiments() { return new ModelAndView( "expressionExperiments" ); - } @RequestMapping(value = { "/showAllExpressionExperimentLinkSummaries.html", "/manage.html" }) - public ModelAndView showAllLinkSummaries( HttpServletRequest request, HttpServletResponse response ) { + public ModelAndView showAllLinkSummaries() { return new ModelAndView( "expressionExperimentLinkSummary" ); } @@ -936,21 +927,14 @@ private ModelAndView showExpressionExperiment( ExpressionExperiment ee ) { } /** - * shows a list of BioAssays for an expression experiment subset - * - * @param request request - * @param response response - * @return model and view + * Shows a list of BioAssays for an expression experiment subset. */ @RequestMapping(value = { "/showExpressionExperimentSubSet.html", "/showSubset" }) - public ModelAndView showSubSet( HttpServletRequest request, HttpServletResponse response ) { - Long id = Long.parseLong( request.getParameter( "id" ) ); - + public ModelAndView showSubSet( @RequestParam("id") Long id ) { ExpressionExperimentSubSet subset = expressionExperimentSubSetService.load( id ); if ( subset == null ) { - throw new EntityNotFoundException( id + " not found" ); + throw new EntityNotFoundException( "No experiment subset with ID " + id + "." ); } - // request.setAttribute( "id", id ); return new ModelAndView( "bioAssays" ).addObject( "bioAssays", subset.getBioAssays() ); } @@ -1071,14 +1055,16 @@ public String updatePubMed( Long eeId, String pubmedId ) { } @RequestMapping("/downloadExpressionExperimentList.html") - public ModelAndView handleRequestInternal( HttpServletRequest request ) { - + public ModelAndView handleRequestInternal( + @RequestParam(value = "e", required = false) String e, + @RequestParam(value = "es", required = false) String es, + @RequestParam(value = "esn", required = false) String esn + ) { StopWatch watch = new StopWatch(); watch.start(); - Collection eeIds = ControllerUtils.extractIds( request.getParameter( "e" ) ); // might not be any - Collection eeSetIds = ControllerUtils.extractIds( request.getParameter( "es" ) ); // might not be there - String eeSetName = request.getParameter( "esn" ); // might not be there + Collection eeIds = ControllerUtils.extractIds( e ); // might not be any + Collection eeSetIds = ControllerUtils.extractIds( es ); // might not be there ModelAndView mav = new ModelAndView( new TextView() ); if ( eeIds.isEmpty() && eeSetIds.isEmpty() ) { @@ -1092,7 +1078,7 @@ public ModelAndView handleRequestInternal( HttpServletRequest request ) { ees.addAll( expressionExperimentSetService.getExperimentValueObjectsInSet( id ) ); } - mav.addObject( TextView.TEXT_PARAM, this.format4File( ees, eeSetName ) ); + mav.addObject( TextView.TEXT_PARAM, this.format4File( ees, esn ) ); watch.stop(); long time = watch.getTime(); @@ -1369,7 +1355,7 @@ private Collection applyFilter( Collecti return eeValObjectCol; } - private String format4File( Collection ees, String eeSetName ) { + private String format4File( Collection ees, @Nullable String eeSetName ) { StringBuilder strBuff = new StringBuilder(); strBuff.append( "# Generated by Gemma\n# " ).append( new Date() ).append( "\n" ); strBuff.append( ExpressionDataFileService.DISCLAIMER + "#\n" ); From 1b42e61204f7dbb484952d28e6db07c444a1b4fa Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 11:26:52 -0400 Subject: [PATCH 13/99] Downgrade failure to sort BMs by ED to a warning --- .../datastructure/matrix/ExpressionDataMatrixColumnSort.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/datastructure/matrix/ExpressionDataMatrixColumnSort.java b/gemma-core/src/main/java/ubic/gemma/core/datastructure/matrix/ExpressionDataMatrixColumnSort.java index a49ecd7188..2523abfb83 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/datastructure/matrix/ExpressionDataMatrixColumnSort.java +++ b/gemma-core/src/main/java/ubic/gemma/core/datastructure/matrix/ExpressionDataMatrixColumnSort.java @@ -22,10 +22,10 @@ import org.apache.commons.logging.LogFactory; import ubic.basecode.dataStructure.matrix.DoubleMatrix; import ubic.gemma.core.analysis.expression.diff.BaselineSelection; -import ubic.gemma.model.expression.experiment.ExperimentalDesignUtils; import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.expression.bioAssay.BioAssay; import ubic.gemma.model.expression.biomaterial.BioMaterial; +import ubic.gemma.model.expression.experiment.ExperimentalDesignUtils; import ubic.gemma.model.expression.experiment.ExperimentalFactor; import ubic.gemma.model.expression.experiment.FactorValue; @@ -604,8 +604,7 @@ private static List orderByFactor( ExperimentalFactor ef, Map Date: Sat, 13 Jul 2024 11:59:53 -0400 Subject: [PATCH 14/99] Add more validation for FactorValue Ensure that the measurement value always match the factor value deprecated 'value' field. Ensure that a continuous factor is never marked as a baseline (or not). Validate when the factor is updated or saved. --- .../experiment/FactorValueDaoImpl.java | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java index ca9212dd86..d438bd214e 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java @@ -33,10 +33,7 @@ import ubic.gemma.persistence.util.BusinessKey; import javax.annotation.Nullable; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; import static ubic.gemma.persistence.util.QueryUtils.optimizeParameterList; @@ -58,16 +55,22 @@ public FactorValueDaoImpl( SessionFactory sessionFactory ) { @Override public FactorValue create( FactorValue factorValue ) { - // validate categorical v.s. continuous factor values - FactorType factorType = factorValue.getExperimentalFactor().getType(); - if ( factorType.equals( FactorType.CONTINUOUS ) ) { - Assert.notNull( factorValue.getMeasurement(), "Continuous factor values must have a measurement: " + factorValue ); - } else if ( factorType.equals( FactorType.CATEGORICAL ) ) { - Assert.isNull( factorValue.getMeasurement(), "Categorical factor values must not have a measurement: " + factorValue ); - } + validate( factorValue ); return super.create( factorValue ); } + @Override + public FactorValue save( FactorValue entity ) { + validate( entity ); + return super.save( entity ); + } + + @Override + public void update( FactorValue entity ) { + validate( entity ); + super.update( entity ); + } + @Override public Collection findByValue( String valuePrefix ) { //noinspection unchecked @@ -154,6 +157,19 @@ protected FactorValueValueObject doLoadValueObject( FactorValue entity ) { return new FactorValueValueObject( entity ); } + private void validate( FactorValue factorValue ) { + // validate categorical v.s. continuous factor values + FactorType factorType = factorValue.getExperimentalFactor().getType(); + if ( factorType.equals( FactorType.CONTINUOUS ) ) { + Assert.notNull( factorValue.getMeasurement(), "Continuous factor values must have a measurement: " + factorValue ); + Assert.isTrue( Objects.equals( factorValue.getValue(), factorValue.getMeasurement().getValue() ), + "The value of the factor must match the measurement value." ); + Assert.isNull( factorValue.getIsBaseline(), "Continuous factor values cannot be (or not be) a baseline: " + factorValue ); + } else if ( factorType.equals( FactorType.CATEGORICAL ) ) { + Assert.isNull( factorValue.getMeasurement(), "Categorical factor values must not have a measurement: " + factorValue ); + } + } + private void debug( List results ) { StringBuilder sb = new StringBuilder(); sb.append( "\nFactorValues found:\n" ); From 1bedf5081e1befa4449eeeb35b82a3b8f5b422da Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 12:06:37 -0400 Subject: [PATCH 15/99] Add extra validation for transient/persistent state when creating/updating/deleting entities --- .../ubic/gemma/persistence/persister/ExpressionPersister.java | 4 +++- .../main/java/ubic/gemma/persistence/service/AbstractDao.java | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java b/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java index f68471a914..faf0e6c931 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/persister/ExpressionPersister.java @@ -324,7 +324,9 @@ private Set fillInExpressionExperimentDataVectorAssociations( Expressi private void fillInFactorValueAssociations( FactorValue factorValue, Caches caches ) { this.fillInExperimentalFactorAssociations( factorValue.getExperimentalFactor(), caches ); - factorValue.setExperimentalFactor( this.persistExperimentalFactor( factorValue.getExperimentalFactor(), caches ) ); + if ( factorValue.getExperimentalFactor().getId() == null ) { + factorValue.setExperimentalFactor( this.persistExperimentalFactor( factorValue.getExperimentalFactor(), caches ) ); + } // measurement will cascade, but not unit. if ( factorValue.getMeasurement() != null && factorValue.getMeasurement().getUnit() != null ) { factorValue.getMeasurement().setUnit( this.persistUnit( factorValue.getMeasurement().getUnit() ) ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java index ead44e9bef..0303d6fb62 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java @@ -98,6 +98,7 @@ public Collection create( Collection entities ) { @Override @OverridingMethodsMustInvokeSuper public T create( T entity ) { + Assert.isNull( entity.getId(), "Cannot create an already persistent entity." ); sessionFactory.getCurrentSession().persist( entity ); AbstractDao.log.trace( String.format( "Created %s.", formatEntity( entity ) ) ); return entity; @@ -256,6 +257,7 @@ public void remove( Long id ) { @Override @OverridingMethodsMustInvokeSuper public void remove( T entity ) { + Assert.notNull( entity.getId(), "Cannot delete a transient entity." ); sessionFactory.getCurrentSession().delete( entity ); AbstractDao.log.trace( String.format( "Removed %s.", formatEntity( entity ) ) ); } @@ -272,6 +274,7 @@ public void update( Collection entities ) { @Override @OverridingMethodsMustInvokeSuper public void update( T entity ) { + Assert.notNull( entity.getId(), "Cannot update a transient entity." ); sessionFactory.getCurrentSession().update( entity ); } From 4823b39dd25e07df265a8dd42878e66c7844927c Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 15:34:28 -0400 Subject: [PATCH 16/99] Prevent BMs to be created/updated with more than one factor value per factor --- .../biomaterial/BioMaterialDaoImpl.java | 31 +++++++++++++++++++ .../biomaterial/BioMaterialDaoTest.java | 25 ++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java index 95cda5c7aa..065fc3a62b 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java @@ -24,6 +24,7 @@ import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; +import org.springframework.util.Assert; import ubic.gemma.model.expression.biomaterial.BioMaterial; import ubic.gemma.model.expression.biomaterial.BioMaterialValueObject; import ubic.gemma.model.expression.experiment.ExpressionExperiment; @@ -33,6 +34,8 @@ import ubic.gemma.persistence.util.BusinessKey; import java.util.Collection; +import java.util.HashSet; +import java.util.Set; /** * @author pavlidis @@ -49,6 +52,24 @@ public BioMaterialDaoImpl( SessionFactory sessionFactory ) { super( BioMaterial.class, sessionFactory ); } + @Override + public BioMaterial create( BioMaterial entity ) { + validate( entity ); + return super.create( entity ); + } + + @Override + public BioMaterial save( BioMaterial entity ) { + validate( entity ); + return super.save( entity ); + } + + @Override + public void update( BioMaterial entity ) { + validate( entity ); + super.update( entity ); + } + @Override public BioMaterial find( BioMaterial bioMaterial ) { Criteria queryObject = this.getSessionFactory().getCurrentSession().createCriteria( BioMaterial.class ); @@ -116,4 +137,14 @@ protected BioMaterialValueObject doLoadValueObject( BioMaterial entity ) { return new BioMaterialValueObject( entity ); } + private void validate( BioMaterial bm ) { + // EF is lazily-loaded, so we use IDs to avoid initializing it + Set seenExperimentalFactorIds = new HashSet<>(); + for ( FactorValue fv : bm.getFactorValues() ) { + // already assumed since + Assert.notNull( fv.getExperimentalFactor().getId() ); + Assert.isTrue( seenExperimentalFactorIds.add( fv.getExperimentalFactor().getId() ), + bm + " has more than one factor values for ExperimentalFactor Id=" + fv.getExperimentalFactor().getId() + "." ); + } + } } \ No newline at end of file diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java index 5120248dd9..7daf56074d 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java @@ -7,6 +7,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; +import ubic.gemma.core.context.TestComponent; import ubic.gemma.core.util.test.BaseDatabaseTest; import ubic.gemma.model.expression.biomaterial.BioMaterial; import ubic.gemma.model.expression.biomaterial.Treatment; @@ -15,9 +16,9 @@ import ubic.gemma.model.expression.experiment.FactorType; import ubic.gemma.model.expression.experiment.FactorValue; import ubic.gemma.model.genome.Taxon; -import ubic.gemma.core.context.TestComponent; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; @ContextConfiguration public class BioMaterialDaoTest extends BaseDatabaseTest { @@ -74,4 +75,26 @@ public void testThaw() { .matches( Hibernate::isInitialized ); } ); } + + @Test + public void testCreateWithMultipleFactorValueForSameExperimentalFactor() { + ExperimentalDesign ed = new ExperimentalDesign(); + sessionFactory.getCurrentSession().persist( ed ); + ExperimentalFactor ef = new ExperimentalFactor(); + ef.setExperimentalDesign( ed ); + ef.setType( FactorType.CATEGORICAL ); + FactorValue fv1 = FactorValue.Factory.newInstance( ef ); + fv1.setValue( "foo" ); + ef.getFactorValues().add( fv1 ); + FactorValue fv2 = FactorValue.Factory.newInstance( ef ); + fv2.setValue( "bar" ); + ef.getFactorValues().add( fv2 ); + sessionFactory.getCurrentSession().persist( ef ); + BioMaterial bm = new BioMaterial(); + bm.getFactorValues().add( fv1 ); + bm.getFactorValues().add( fv2 ); + assertThatThrownBy( () -> bioMaterialDao.create( bm ) ) + .isInstanceOf( IllegalArgumentException.class ) + .hasMessage( "BioMaterial has more than one factor values for ExperimentalFactor Id=" + ef.getId() + "." ); + } } \ No newline at end of file From aa1423981e58eaaa55d4d15205b4c56673a3a104 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 15:46:16 -0400 Subject: [PATCH 17/99] Don't require the FV value to match the measurement if null --- .../experiment/FactorValueDaoImpl.java | 9 ++++++--- .../experiment/FactorValueDaoTest.java | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java index d438bd214e..b0cc2e0653 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java @@ -33,7 +33,10 @@ import ubic.gemma.persistence.util.BusinessKey; import javax.annotation.Nullable; -import java.util.*; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import static ubic.gemma.persistence.util.QueryUtils.optimizeParameterList; @@ -162,8 +165,8 @@ private void validate( FactorValue factorValue ) { FactorType factorType = factorValue.getExperimentalFactor().getType(); if ( factorType.equals( FactorType.CONTINUOUS ) ) { Assert.notNull( factorValue.getMeasurement(), "Continuous factor values must have a measurement: " + factorValue ); - Assert.isTrue( Objects.equals( factorValue.getValue(), factorValue.getMeasurement().getValue() ), - "The value of the factor must match the measurement value." ); + Assert.isTrue( factorValue.getValue() == null || factorValue.getValue().equals( factorValue.getMeasurement().getValue() ), + "If provided, the value of the factor must match the measurement value." ); Assert.isNull( factorValue.getIsBaseline(), "Continuous factor values cannot be (or not be) a baseline: " + factorValue ); } else if ( factorType.equals( FactorType.CATEGORICAL ) ) { Assert.isNull( factorValue.getMeasurement(), "Categorical factor values must not have a measurement: " + factorValue ); diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoTest.java index 4ee856f30f..9d7a5910d9 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoTest.java @@ -6,18 +6,20 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; +import ubic.gemma.core.context.TestComponent; import ubic.gemma.core.util.test.BaseDatabaseTest; import ubic.gemma.model.common.description.Characteristic; +import ubic.gemma.model.common.measurement.Measurement; import ubic.gemma.model.expression.biomaterial.BioMaterial; import ubic.gemma.model.expression.experiment.*; import ubic.gemma.model.genome.Taxon; -import ubic.gemma.core.context.TestComponent; import java.sql.PreparedStatement; import java.util.Collections; import java.util.Set; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.*; @ContextConfiguration @@ -148,6 +150,21 @@ public void testRemove() { assertFalse( bm.getFactorValues().contains( fv ) ); } + @Test + public void createFactorWithMeasurementThatDiffersFromValue() { + ExperimentalFactor ef = new ExperimentalFactor(); + ef.setType( FactorType.CONTINUOUS ); + FactorValue fv = new FactorValue(); + fv.setExperimentalFactor( ef ); + fv.setValue( "2" ); + Measurement m = new Measurement(); + m.setValue( "3" ); + fv.setMeasurement( m ); + assertThatThrownBy( () -> factorValueDao.create( fv ) ) + .isInstanceOf( IllegalArgumentException.class ) + .hasMessage( "If provided, the value of the factor must match the measurement value." ); + } + private FactorValue createFactorValue() { return createFactorValue( Collections.emptySet() ); } From 0f02c42b7cf8989ce2582bb8feded256ca03af83 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 16:40:57 -0400 Subject: [PATCH 18/99] Disable GemmaAndExperimentalFactorOntologyTest as it times out on the CI --- .../ontology/GemmaAndExperimentalFactorOntologyTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gemma-core/src/test/java/ubic/gemma/core/ontology/GemmaAndExperimentalFactorOntologyTest.java b/gemma-core/src/test/java/ubic/gemma/core/ontology/GemmaAndExperimentalFactorOntologyTest.java index a98faed890..0be4b4b4ed 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/ontology/GemmaAndExperimentalFactorOntologyTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/ontology/GemmaAndExperimentalFactorOntologyTest.java @@ -1,5 +1,6 @@ package ubic.gemma.core.ontology; +import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.categories.Category; import org.springframework.beans.factory.annotation.Autowired; @@ -16,14 +17,14 @@ import ubic.basecode.ontology.model.OntologyTerm; import ubic.basecode.ontology.providers.ExperimentalFactorOntologyService; import ubic.basecode.ontology.providers.ObiService; -import ubic.gemma.persistence.service.genome.gene.GeneService; +import ubic.gemma.core.context.TestComponent; import ubic.gemma.core.ontology.providers.GemmaOntologyService; import ubic.gemma.core.ontology.providers.GeneOntologyService; import ubic.gemma.core.search.SearchService; import ubic.gemma.core.util.test.TestPropertyPlaceholderConfigurer; import ubic.gemma.core.util.test.category.SlowTest; import ubic.gemma.persistence.service.common.description.CharacteristicService; -import ubic.gemma.core.context.TestComponent; +import ubic.gemma.persistence.service.genome.gene.GeneService; import java.util.Collections; @@ -35,6 +36,7 @@ * This test covers cases where inference is done across two distinct {@link ubic.basecode.ontology.providers.OntologyService}. * @author poirigui */ +@Ignore("This test is timing out on the CI.") @Category(SlowTest.class) @ContextConfiguration public class GemmaAndExperimentalFactorOntologyTest extends AbstractJUnit4SpringContextTests { From db801a4f571ba5540fad44b4c50ed5b80f7f2db8 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 17:06:21 -0400 Subject: [PATCH 19/99] Reuse create() and loadReference() from sub-classes in AbstractDao This ensures that sub-classes behavior is respected in save() and loadReference(). --- .../java/ubic/gemma/persistence/service/AbstractDao.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java index 0303d6fb62..953bdbe598 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java @@ -119,9 +119,7 @@ public Collection save( Collection entities ) { @OverridingMethodsMustInvokeSuper public T save( T entity ) { if ( entity.getId() == null ) { - sessionFactory.getCurrentSession().persist( entity ); - AbstractDao.log.trace( String.format( "Created %s.", formatEntity( entity ) ) ); - return entity; + return create( entity ); } else { //noinspection unchecked T result = ( T ) sessionFactory.getCurrentSession().merge( entity ); @@ -212,7 +210,7 @@ public Collection loadReference( Collection ids ) { //noinspection unchecked Collection results = ids.stream() .distinct().sorted() // this will make the output appear similar to load(Collection) - .map( id -> ( T ) sessionFactory.getCurrentSession().load( elementClass, id ) ) + .map( this::loadReference ) .collect( Collectors.toList() ); // no HashSet here because otherwise proxies would get initialized AbstractDao.log.debug( String.format( "Loaded %d %s entities in %d ms.", results.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); From 8db38d03dc75531cbe2349e6877d0270df0b2e3a Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 13 Jul 2024 17:07:49 -0400 Subject: [PATCH 20/99] Make debug and trace logging conditional in AbstractDao --- .../persistence/service/AbstractDao.java | 109 ++++++++++++++---- 1 file changed, 84 insertions(+), 25 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java index 953bdbe598..e0e5615e68 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java @@ -86,12 +86,20 @@ public String getIdentifierPropertyName() { @Override public Collection create( Collection entities ) { - StopWatch stopWatch = StopWatch.createStarted(); + boolean isDebugEnabled = AbstractDao.log.isDebugEnabled(); + StopWatch timer; + if ( isDebugEnabled ) { + timer = StopWatch.createStarted(); + } else { + timer = null; + } Collection results = new ArrayList<>( entities.size() ); for ( T t : entities ) { results.add( this.create( t ) ); } - AbstractDao.log.debug( String.format( "Created %d %s entities in %s ms.", results.size(), elementClass.getSimpleName(), stopWatch.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( isDebugEnabled ) { + AbstractDao.log.debug( String.format( "Created %d %s entities in %s ms.", results.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + } return results; } @@ -100,18 +108,28 @@ public Collection create( Collection entities ) { public T create( T entity ) { Assert.isNull( entity.getId(), "Cannot create an already persistent entity." ); sessionFactory.getCurrentSession().persist( entity ); - AbstractDao.log.trace( String.format( "Created %s.", formatEntity( entity ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "Created %s.", formatEntity( entity ) ) ); + } return entity; } @Override public Collection save( Collection entities ) { - StopWatch timer = StopWatch.createStarted(); + boolean isDebugEnabled = AbstractDao.log.isDebugEnabled(); + StopWatch timer; + if ( isDebugEnabled ) { + timer = StopWatch.createStarted(); + } else { + timer = null; + } Collection results = new ArrayList<>( entities.size() ); for ( T entity : entities ) { results.add( this.save( entity ) ); } - AbstractDao.log.debug( String.format( "Saved %d entities in %d ms.", entities.size(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( isDebugEnabled ) { + AbstractDao.log.debug( String.format( "Saved %d entities in %d ms.", entities.size(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + } return results; } @@ -123,7 +141,9 @@ public T save( T entity ) { } else { //noinspection unchecked T result = ( T ) sessionFactory.getCurrentSession().merge( entity ); - AbstractDao.log.trace( String.format( "Updated %s.", formatEntity( entity ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "Updated %s.", formatEntity( entity ) ) ); + } return result; } } @@ -134,11 +154,20 @@ public T save( T entity ) { */ @Override public Collection load( Collection ids ) { + boolean isDebugEnabled = AbstractDao.log.isDebugEnabled(); + if ( ids.isEmpty() ) { - AbstractDao.log.trace( String.format( "Loading %s with an empty collection of IDs, returning an empty collection.", elementClass.getSimpleName() ) ); + if ( isDebugEnabled ) { + AbstractDao.log.trace( String.format( "Loading %s with an empty collection of IDs, returning an empty collection.", elementClass.getSimpleName() ) ); + } return Collections.emptyList(); } - StopWatch timer = StopWatch.createStarted(); + StopWatch timer; + if ( isDebugEnabled ) { + timer = StopWatch.createStarted(); + } else { + timer = null; + } String idPropertyName = classMetadata.getIdentifierPropertyName(); List results = new ArrayList<>( ids.size() ); @@ -176,7 +205,9 @@ public Collection load( Collection ids ) { results.sort( Comparator.comparing( Identifiable::getId ) ); } - AbstractDao.log.debug( String.format( "Loaded %d %s entities in %d ms.", results.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( isDebugEnabled ) { + AbstractDao.log.debug( String.format( "Loaded %d %s entities in %d ms.", results.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + } return results; } @@ -187,7 +218,9 @@ public T load( Long id ) { // Don't use 'load' because if the object doesn't exist you can get an invalid proxy. //noinspection unchecked T result = ( T ) sessionFactory.getCurrentSession().get( elementClass, id ); - AbstractDao.log.trace( String.format( String.format( "Loaded %s.", formatEntity( result ) ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( String.format( "Loaded %s.", formatEntity( result ) ) ) ); + } return result; } catch ( WrongClassException e ) { AbstractDao.log.warn( "Wrong class for ID " + id + ", will return null.", e ); @@ -197,23 +230,30 @@ public T load( Long id ) { @Override public Collection loadAll() { - StopWatch timer = StopWatch.createStarted(); + boolean isDebugEnabled = AbstractDao.log.isDebugEnabled(); + StopWatch timer; + if ( isDebugEnabled ) { + timer = StopWatch.createStarted(); + } else { + timer = null; + } //noinspection unchecked Collection results = sessionFactory.getCurrentSession().createCriteria( elementClass ).list(); - AbstractDao.log.debug( String.format( "Loaded all (%d) %s entities in %d ms.", results.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( isDebugEnabled ) { + AbstractDao.log.debug( String.format( "Loaded all (%d) %s entities in %d ms.", results.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + } return results; } @Override public Collection loadReference( Collection ids ) { - StopWatch timer = StopWatch.createStarted(); - //noinspection unchecked Collection results = ids.stream() .distinct().sorted() // this will make the output appear similar to load(Collection) .map( this::loadReference ) .collect( Collectors.toList() ); // no HashSet here because otherwise proxies would get initialized - AbstractDao.log.debug( String.format( "Loaded %d %s entities in %d ms.", results.size(), elementClass.getSimpleName(), - timer.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( AbstractDao.log.isDebugEnabled() ) { + AbstractDao.log.debug( String.format( "Loaded references to %d %s entities.", results.size(), elementClass.getSimpleName() ) ); + } return results; } @@ -222,7 +262,9 @@ public Collection loadReference( Collection ids ) { public T loadReference( Long id ) { //noinspection unchecked T entity = ( T ) sessionFactory.getCurrentSession().load( elementClass, id ); - AbstractDao.log.debug( String.format( "Loaded reference to %s.", formatEntity( entity ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "Loaded reference to %s.", formatEntity( entity ) ) ); + } return entity; } @@ -239,7 +281,9 @@ public void remove( Collection entities ) { for ( T e : entities ) { this.remove( e ); } - AbstractDao.log.debug( String.format( "Removed %d entities in %d ms.", entities.size(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( AbstractDao.log.isDebugEnabled() ) { + AbstractDao.log.debug( String.format( "Removed %d entities in %d ms.", entities.size(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + } } @Override @@ -247,8 +291,8 @@ public void remove( Long id ) { T entity = this.load( id ); if ( entity != null ) { this.remove( entity ); - } else { - AbstractDao.log.trace( String.format( "No %s entity with ID %d, no need to remove anything.", elementClass.getSimpleName(), id ) ); + } else if ( AbstractDao.log.isDebugEnabled() ) { + AbstractDao.log.debug( String.format( "No %s entity with ID %d, no need to remove anything.", elementClass.getSimpleName(), id ) ); } } @@ -257,16 +301,24 @@ public void remove( Long id ) { public void remove( T entity ) { Assert.notNull( entity.getId(), "Cannot delete a transient entity." ); sessionFactory.getCurrentSession().delete( entity ); - AbstractDao.log.trace( String.format( "Removed %s.", formatEntity( entity ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "Removed %s.", formatEntity( entity ) ) ); + } } @Override public void update( Collection entities ) { - StopWatch timer = StopWatch.createStarted(); + boolean isDebugEnabled = AbstractDao.log.isDebugEnabled(); + StopWatch timer; + if ( isDebugEnabled ) { + timer = StopWatch.createStarted(); + } for ( T entity : entities ) { this.update( entity ); } - AbstractDao.log.debug( String.format( "Updated %d %s entities in %d ms.", entities.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + if ( isDebugEnabled ) { + AbstractDao.log.debug( String.format( "Updated %d %s entities in %d ms.", entities.size(), elementClass.getSimpleName(), timer.getTime( TimeUnit.MILLISECONDS ) ) ); + } } @Override @@ -274,6 +326,9 @@ public void update( Collection entities ) { public void update( T entity ) { Assert.notNull( entity.getId(), "Cannot update a transient entity." ); sessionFactory.getCurrentSession().update( entity ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "Updated %s.", formatEntity( entity ) ) ); + } } @Override @@ -281,7 +336,9 @@ public T find( T entity ) { if ( entity.getId() != null ) { return this.load( entity.getId() ); } else { - AbstractDao.log.trace( String.format( "No persistent entity found for %s, returning null.", formatEntity( entity ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "No persistent entity found for %s, returning null.", formatEntity( entity ) ) ); + } return null; } } @@ -292,7 +349,9 @@ public T findOrCreate( T entity ) { if ( found != null ) { return found; } else { - AbstractDao.log.trace( String.format( "No persistent entity found for %s, creating a new one...", formatEntity( entity ) ) ); + if ( AbstractDao.log.isTraceEnabled() ) { + AbstractDao.log.trace( String.format( "No persistent entity found for %s, creating a new one...", formatEntity( entity ) ) ); + } return this.create( entity ); } } From ce5403939dc5b03466fd87b229d3facf0e640dc3 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 15 Jul 2024 09:38:41 -0400 Subject: [PATCH 21/99] Add a new search source for finding genes by GO terms Support searching genes associated to GO terms. Relocate the logic for finding genes from GeneSet matched by GO term in that source. --- .../ArrayDesignAnnotationServiceImpl.java | 14 +- .../gemma/core/ontology/GoMetricImpl.java | 12 +- .../providers/GeneOntologyService.java | 12 +- .../providers/GeneOntologyServiceImpl.java | 107 +++++--------- .../ontology/providers/GeneOntologyUtils.java | 62 ++++++++ .../gemma/core/search/SearchResultSet.java | 12 +- .../gemma/core/search/SearchServiceImpl.java | 42 +----- .../core/search/SearchSettingsUtils.java | 18 +++ .../core/search/lucene/LuceneQueryUtils.java | 46 +++++- .../source/GeneOntologySearchSource.java | 132 ++++++++++++++++++ .../search/source/OntologySearchSource.java | 18 +-- .../persistence/service/AbstractDao.java | 2 + .../association/Gene2GOAssociationDao.java | 11 +- .../Gene2GOAssociationDaoImpl.java | 53 +++---- .../Gene2GOAssociationService.java | 22 +-- .../Gene2GOAssociationServiceImpl.java | 25 ++-- .../genome/gene/GeneSearchService.java | 5 +- .../genome/gene/GeneSearchServiceImpl.java | 24 ++-- .../gemma/core/ontology/ontology.prefixes.txt | 7 + .../providers/GeneOntologyServiceTest.java | 3 +- .../providers/GeneOntologyUtilsTest.java | 26 ++++ .../search/lucene/LuceneQueryUtilsTest.java | 7 + .../source/GeneOntologySearchSourceTest.java | 87 ++++++++++++ .../services/Gene2GOdescriptionEndpoint.java | 4 +- .../web/services/Gene2GoTermEndpoint.java | 4 +- .../web/services/GeneOverlapEndpoint.java | 4 +- 26 files changed, 523 insertions(+), 236 deletions(-) create mode 100644 gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyUtils.java create mode 100644 gemma-core/src/main/java/ubic/gemma/core/search/SearchSettingsUtils.java create mode 100644 gemma-core/src/main/java/ubic/gemma/core/search/source/GeneOntologySearchSource.java create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/ontology/ontology.prefixes.txt create mode 100644 gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyUtilsTest.java create mode 100644 gemma-core/src/test/java/ubic/gemma/core/search/source/GeneOntologySearchSourceTest.java diff --git a/gemma-core/src/main/java/ubic/gemma/core/analysis/service/ArrayDesignAnnotationServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/analysis/service/ArrayDesignAnnotationServiceImpl.java index 305eae7071..8e3c3ec609 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/analysis/service/ArrayDesignAnnotationServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/analysis/service/ArrayDesignAnnotationServiceImpl.java @@ -18,7 +18,6 @@ */ package ubic.gemma.core.analysis.service; -import org.apache.commons.collections4.Transformer; import org.apache.commons.collections4.iterators.TransformIterator; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; @@ -29,8 +28,9 @@ import ubic.basecode.ontology.model.OntologyTerm; import ubic.basecode.util.DateUtil; import ubic.basecode.util.FileTools; +import ubic.gemma.core.config.Settings; import ubic.gemma.core.ontology.providers.GeneOntologyService; -import ubic.gemma.core.ontology.providers.GeneOntologyServiceImpl; +import ubic.gemma.core.ontology.providers.GeneOntologyUtils; import ubic.gemma.model.association.BioSequence2GeneProduct; import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.expression.arrayDesign.ArrayDesign; @@ -41,7 +41,6 @@ import ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService; import ubic.gemma.persistence.service.expression.designElement.CompositeSequenceService; import ubic.gemma.persistence.util.EntityUtils; -import ubic.gemma.core.config.Settings; import java.io.*; import java.util.*; @@ -328,13 +327,6 @@ private static void populateProbeNameToIdMap( ArrayDesign arrayDesign, Map( goTerms.iterator(), GeneOntologyUtils::asRegularGoId ), "|" ); writer.write( terms ); } // otherwise we will just have a blank column diff --git a/gemma-core/src/main/java/ubic/gemma/core/ontology/GoMetricImpl.java b/gemma-core/src/main/java/ubic/gemma/core/ontology/GoMetricImpl.java index 2ddbbfadff..d7857c8149 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/ontology/GoMetricImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/ontology/GoMetricImpl.java @@ -28,13 +28,14 @@ import ubic.basecode.dataStructure.matrix.SparseDoubleMatrix; import ubic.basecode.ontology.model.OntologyTerm; import ubic.gemma.core.ontology.providers.GeneOntologyService; -import ubic.gemma.core.ontology.providers.GeneOntologyServiceImpl; import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.genome.Gene; import ubic.gemma.persistence.service.association.Gene2GOAssociationService; import java.util.*; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; + /** * @author meeta */ @@ -707,13 +708,8 @@ private Double getVectorLength( double[] vector ) { } private boolean isRoot( OntologyTerm term ) { - - String id = GeneOntologyServiceImpl.asRegularGoId( term ); - boolean root = false; - if ( ( id.equalsIgnoreCase( "GO:0008150" ) ) || ( id.equalsIgnoreCase( "GO:0003674" ) ) || ( id - .equalsIgnoreCase( "GO:0005575" ) ) ) - root = true; - return root; + String id = asRegularGoId( term ); + return "GO:0008150".equalsIgnoreCase( id ) || "GO:0003674".equalsIgnoreCase( id ) || "GO:0005575".equalsIgnoreCase( id ); } } diff --git a/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyService.java b/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyService.java index d7d0cf4747..72c04c12bb 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyService.java +++ b/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyService.java @@ -74,13 +74,17 @@ Collection computeOverlap( Collection masterOntos, Set getAllParents( Collection entries, boolean includePartOf ); /** - * @param taxon taxon - * @param goId go id + * Find genes for a given of GO term. * @return Collection of all genes in the given taxon that are annotated with the given id, including its * child terms in the hierarchy, or null if the GO term is not found */ - @Nullable - Collection getGenes( String goId, Taxon taxon ); + Collection getGenes( OntologyTerm goTerm, @Nullable Taxon taxon ); + + /** + * Find genes for a given GO term by GO ID. + * @see #getGenes(OntologyTerm, Taxon) + */ + Collection getGenes( String goId, @Nullable Taxon taxon ); /** * @param gene Take a gene and return a set of all GO terms including the parents of each GO term diff --git a/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceImpl.java index 57569b6d32..5916a5aa23 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceImpl.java @@ -35,13 +35,13 @@ import ubic.basecode.ontology.providers.AbstractOntologyService; import ubic.basecode.ontology.search.OntologySearchException; import ubic.basecode.ontology.search.OntologySearchResult; -import ubic.gemma.persistence.service.genome.gene.GeneService; import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.genome.Gene; import ubic.gemma.model.genome.GeneOntologyTermValueObject; import ubic.gemma.model.genome.Taxon; -import ubic.gemma.persistence.service.association.Gene2GOAssociationService; import ubic.gemma.persistence.cache.CacheUtils; +import ubic.gemma.persistence.service.association.Gene2GOAssociationService; +import ubic.gemma.persistence.service.genome.gene.GeneService; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; @@ -49,6 +49,8 @@ import java.util.*; import java.util.stream.Collectors; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; + /** * Gene Ontology * @@ -64,33 +66,6 @@ public enum GOAspect { private static final Log log = LogFactory.getLog( GeneOntologyServiceImpl.class.getName() ); - /** - * @param term the term - * @return Usual formatted GO id, e.g., GO:0039392 - */ - public static String asRegularGoId( Characteristic term ) { - String uri = term.getValue(); - return GeneOntologyServiceImpl.asRegularGoId( uri ); - } - - /** - * @param term ontology term - * @return Usual formatted GO id, e.g., GO:0039392 - */ - public static String asRegularGoId( OntologyTerm term ) { - if ( term == null ) - return null; - String uri = term.getUri(); - if ( uri == null ) { - return null; - } - return GeneOntologyServiceImpl.asRegularGoId( uri ); - } - - public static String asRegularGoId( String uri ) { - return uri.replaceAll( ".*?/", "" ).replace( "_", ":" ); - } - @Override protected String getOntologyName() { return "Gene Ontology"; @@ -157,18 +132,13 @@ public void afterPropertiesSet() { goTerms = CacheUtils.getCache( cacheManager, "GeneOntologyService.goTerms" ); term2Aspect = CacheUtils.getCache( cacheManager, "GeneOntologyService.term2Aspect" ); if ( autoLoadOntologies ) { - ontologyTaskExecutor.execute( () -> { - initialize( false, false ); - } ); + ontologyTaskExecutor.execute( () -> initialize( false, false ) ); } } @Override public Map> calculateGoTermOverlap( Gene queryGene, Collection geneIds ) { - Map> overlap = new HashMap<>(); - if ( queryGene == null ) - return null; if ( geneIds.isEmpty() ) return overlap; @@ -186,25 +156,18 @@ public Map> calculateGoTermOverlap( Gene queryGen @Override public Collection calculateGoTermOverlap( Gene queryGene1, Gene queryGene2 ) { - - if ( queryGene1 == null || queryGene2 == null ) - return null; - Collection queryGeneTerms1 = this.getGOTerms( queryGene1 ); Collection queryGeneTerms2 = this.getGOTerms( queryGene2 ); - return this.computeOverlap( queryGeneTerms1, queryGeneTerms2 ); } @Override public Map> calculateGoTermOverlap( Long queryGene, Collection geneIds ) { Map> overlap = new HashMap<>(); - if ( queryGene == null ) - return null; if ( geneIds.isEmpty() ) return overlap; - Collection queryGeneTerms = this.getGOTerms( queryGene, true, null ); + Collection queryGeneTerms = this.getGOTerms( geneService.loadOrFail( queryGene ), true, null ); overlap.put( queryGene, queryGeneTerms ); // include the query gene in the list. Clearly 100% overlap // with itself! @@ -255,18 +218,29 @@ public Set getAllParents( Collection entries, boolea } @Override - public Collection getGenes( String goId, Taxon taxon ) { - OntologyTerm t = getTermForId( goId ); - if ( t == null ) - return null; - Collection terms = t.getChildren( false, false ); - Collection results = new HashSet<>( this.gene2GOAssociationService.findByGOTerm( goId, taxon ) ); + public Collection getGenes( OntologyTerm term, @Nullable Taxon taxon ) { + String goId = asRegularGoId( term ); + if ( goId == null ) { + return Collections.emptyList(); + } + Set goIds = new HashSet<>(); + goIds.add( goId ); + for ( OntologyTerm ontologyTerm1 : getChildren( Collections.singleton( term ), false, false ) ) { + String goId1 = asRegularGoId( ontologyTerm1 ); + if ( goId1 != null ) { + goIds.add( goId1 ); + } + } + return gene2GOAssociationService.findByGOTerms( goIds, taxon ); + } - for ( OntologyTerm term : terms ) { - results.addAll( this.gene2GOAssociationService - .findByGOTerm( GeneOntologyServiceImpl.asRegularGoId( term ), taxon ) ); + @Override + public Collection getGenes( String goId, @Nullable Taxon taxon ) { + OntologyTerm t = getTermForId( goId ); + if ( t == null ) { + return Collections.emptyList(); } - return results; + return getGenes( t, taxon ); } @Override @@ -275,7 +249,7 @@ public Collection getGOTerms( Gene gene ) { } @Override - public Collection getGOTerms( Gene gene, boolean includePartOf, GOAspect goAspect ) { + public Collection getGOTerms( Gene gene, boolean includePartOf, @Nullable GOAspect goAspect ) { Cache.ValueWrapper value = goTerms.get( gene.getId() ); //noinspection unchecked Collection cachedTerms = value != null ? ( Collection ) value.get() : null; @@ -327,20 +301,10 @@ public Collection getGOTerms( Gene gene, boolean includePartOf, GO return cachedTerms; } - /** - * @param gene gene - * @param goAspect go aspect - * @param includePartOf include part of - * @return collection of ontology terms - */ - public Collection getGOTerms( Long gene, boolean includePartOf, GOAspect goAspect ) { - return this.getGOTerms( geneService.loadOrFail( gene ), includePartOf, goAspect ); - } - @Override public GOAspect getTermAspect( Characteristic goId ) { - String string = GeneOntologyServiceImpl.asRegularGoId( goId ); - return this.getTermAspect( string ); + String term = asRegularGoId( goId ); + return term != null ? this.getTermAspect( term ) : null; } @Override @@ -386,7 +350,7 @@ public String getTermName( String goId ) { @Override public GeneOntologyTermValueObject getValueObject( OntologyTerm term ) { - return new GeneOntologyTermValueObject( GeneOntologyServiceImpl.asRegularGoId( term ), term ); + return new GeneOntologyTermValueObject( asRegularGoId( term ), term ); } @Override @@ -400,7 +364,7 @@ public List getValueObjects( Collection getValueObjects( Gene gene ) { - return gene == null ? null : this.getValueObjects( this.getGOTerms( gene ) ); + return this.getValueObjects( this.getGOTerms( gene ) ); } @Override @@ -428,7 +392,6 @@ public void initialize( InputStream stream, boolean forceIndexing ) { } private GOAspect getTermAspect( OntologyTerm term ) { - assert term != null; String goId = term.getLabel(); Cache.ValueWrapper value = term2Aspect.get( goId ); GOAspect aspect; @@ -466,7 +429,7 @@ private void logIds( String prefix, Collection terms ) { buf.append( ": [ " ); Iterator i = terms.iterator(); while ( i.hasNext() ) { - buf.append( GeneOntologyServiceImpl.asRegularGoId( i.next() ) ); + buf.append( asRegularGoId( i.next() ) ); if ( i.hasNext() ) buf.append( ", " ); } @@ -478,14 +441,14 @@ private void putOverlapGenes( Map> overlap, Colle Collection genes ) { for ( Gene gene : genes ) { if ( queryGeneTerms.isEmpty() ) { - overlap.put( gene.getId(), new HashSet() ); + overlap.put( gene.getId(), new HashSet<>() ); continue; } Collection comparisonOntos = this.getGOTerms( gene ); if ( comparisonOntos == null || comparisonOntos.isEmpty() ) { - overlap.put( gene.getId(), new HashSet() ); + overlap.put( gene.getId(), new HashSet<>() ); continue; } diff --git a/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyUtils.java b/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyUtils.java new file mode 100644 index 0000000000..0c09e6281d --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/core/ontology/providers/GeneOntologyUtils.java @@ -0,0 +1,62 @@ +package ubic.gemma.core.ontology.providers; + +import ubic.basecode.ontology.model.OntologyTerm; +import ubic.gemma.model.common.description.Characteristic; + +import javax.annotation.Nullable; + +public class GeneOntologyUtils { + + /** + * Check if a given string is a GO ID. + */ + public static boolean isGoId( String s ) { + String goId; + if ( s.startsWith( GeneOntologyService.BASE_GO_URI ) ) { + goId = s.substring( GeneOntologyService.BASE_GO_URI.length() ); + } else { + goId = s; + } + return goId.matches( "GO[:_]\\d+" ); + } + + /** + * Convert various GO IDs formats to the usual format, e.g., GO:0039392. + * @param term ontology term + * @return Usual formatted GO id, e.g., GO:0039392 or null for a free-text term + */ + @Nullable + public static String asRegularGoId( OntologyTerm term ) { + return asRegularGoId( term.getUri() ); + } + + /** + * Convert a characteristic to a regular GO ID. + */ + @Nullable + public static String asRegularGoId( Characteristic c ) { + return asRegularGoId( c.getValue() ); + } + + /** + * Convert various GO IDs formats to the usual format, e.g., GO:0039392. + * @return a regular GO ID or null if the input is null or not a reckognized GO ID format + */ + @Nullable + public static String asRegularGoId( String uri ) { + if ( uri == null ) { + return null; + } + String goId; + if ( uri.startsWith( GeneOntologyService.BASE_GO_URI ) ) { + goId = uri.substring( GeneOntologyService.BASE_GO_URI.length() ); + } else { + goId = uri; + } + if ( goId.startsWith( "GO:" ) || goId.startsWith( "GO_" ) ) { + return goId.replace( "_", ":" ); + } else { + return null; + } + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/core/search/SearchResultSet.java b/gemma-core/src/main/java/ubic/gemma/core/search/SearchResultSet.java index 9a689e406a..76794ada79 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/search/SearchResultSet.java +++ b/gemma-core/src/main/java/ubic/gemma/core/search/SearchResultSet.java @@ -20,18 +20,12 @@ */ public class SearchResultSet extends AbstractSet> { - private final SearchSettings settings; - private final Map, SearchResult> results; + private final int maxResults; public SearchResultSet( SearchSettings settings ) { - this.settings = settings; this.results = new HashMap<>(); - } - - public SearchResultSet( SearchSettings settings, int initialCapacity ) { - this.settings = settings; - this.results = new HashMap<>( initialCapacity ); + this.maxResults = settings.getMaxResults(); } @Override @@ -54,7 +48,7 @@ public boolean add( SearchResult t ) { SearchResult newValue; boolean replaced; if ( previousValue == null ) { - if ( settings.getMaxResults() > 0 && size() >= settings.getMaxResults() ) { + if ( maxResults > 0 && size() >= maxResults ) { // max size reached and not replacing a previous value return false; } diff --git a/gemma-core/src/main/java/ubic/gemma/core/search/SearchServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/search/SearchServiceImpl.java index d89b7237c1..3cbed990a1 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/search/SearchServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/search/SearchServiceImpl.java @@ -34,18 +34,17 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import org.springframework.util.LinkedMultiValueMap; -import ubic.gemma.persistence.service.genome.gene.GeneSearchService; import ubic.gemma.core.search.source.CompositeSearchSource; -import ubic.gemma.model.common.IdentifiableValueObject; import ubic.gemma.model.analysis.expression.ExpressionExperimentSet; import ubic.gemma.model.association.phenotype.PhenotypeAssociation; +import ubic.gemma.model.blacklist.BlacklistedEntity; +import ubic.gemma.model.blacklist.BlacklistedValueObject; import ubic.gemma.model.common.Identifiable; +import ubic.gemma.model.common.IdentifiableValueObject; import ubic.gemma.model.common.description.BibliographicReference; import ubic.gemma.model.common.description.BibliographicReferenceValueObject; import ubic.gemma.model.common.description.CharacteristicValueObject; import ubic.gemma.model.common.search.SearchSettings; -import ubic.gemma.model.blacklist.BlacklistedEntity; -import ubic.gemma.model.blacklist.BlacklistedValueObject; import ubic.gemma.model.expression.arrayDesign.ArrayDesign; import ubic.gemma.model.expression.arrayDesign.ArrayDesignValueObject; import ubic.gemma.model.expression.designElement.CompositeSequence; @@ -141,8 +140,6 @@ private void addAll( Collection> search @Autowired private ArrayDesignService arrayDesignService; @Autowired - private GeneSearchService geneSearchService; - @Autowired private TaxonService taxonService; @Autowired @@ -208,10 +205,6 @@ public SearchResultMap search( SearchSettings settings ) throws SearchException if ( settings.hasResultType( BioSequence.class ) ) { results.addAll( searchSource.searchBioSequence( settings ) ); } - if ( settings.hasResultType( Gene.class ) && settings.isUseGo() ) { - results.addAll( this.dbHitsToSearchResult( settings, Gene.class, geneSearchService.getGOGroupGenes( settings.getQuery(), settings.getTaxon() ), - 0.8, Collections.singletonMap( "GO Group", "From GO group" ), "GeneSearchService.getGOGroupGenes" ) ); - } if ( settings.hasResultType( BibliographicReference.class ) ) { results.addAll( searchSource.searchBibliographicReference( settings ) ); } @@ -415,29 +408,6 @@ private SearchResultSet compositeSequenceSearch( SearchSettin return finalResults; } - /** - * Convert hits from database searches into SearchResults. - */ - private SearchResultSet dbHitsToSearchResult( SearchSettings settings, Class entityClass, Collection entities, double score, Map highlights, String source ) { - StopWatch watch = StopWatch.createStarted(); - SearchResultSet results = new SearchResultSet<>( settings, entities.size() ); - for ( T e : entities ) { - if ( e == null ) { - if ( log.isDebugEnabled() ) - log.debug( "Null search result object" ); - continue; - } - if ( e.getId() == null ) { - log.warn( "Search result object with null ID." ); - } - results.add( SearchResult.from( entityClass, e, score, highlights, source ) ); - } - if ( watch.getTime() > 1000 ) { - log.warn( "Unpack " + results.size() + " search resultsS: " + watch.getTime() + "ms" ); - } - return results; - } - /** * A key method for experiment search. This search does both an database search and a compass search, and looks at * several different associations. To allow maximum flexibility, we try not to limit the number of results here (it @@ -538,9 +508,9 @@ private SearchResultSet expressionExperimentSearch( final if ( ad != null ) { Collection expressionExperiments = this.arrayDesignService .getExpressionExperiments( ad ); - if ( !expressionExperiments.isEmpty() ) - results.addAll( this.dbHitsToSearchResult( settings, ExpressionExperiment.class, expressionExperiments, - 0.8, Collections.singletonMap( "arrayDesign", ad.getShortName() + " - " + ad.getName() ), String.format( "ArrayDesignService.getExpressionExperiments(%s)", ad ) ) ); + for ( ExpressionExperiment ee : expressionExperiments ) { + results.add( SearchResult.from( ExpressionExperiment.class, ee, 0.8, Collections.singletonMap( "arrayDesign", ad.getShortName() + " - " + ad.getName() ), String.format( "ArrayDesignService.getExpressionExperiments(%s)", ad ) ) ); + } } } if ( watch.getTime() > 1000 ) { diff --git a/gemma-core/src/main/java/ubic/gemma/core/search/SearchSettingsUtils.java b/gemma-core/src/main/java/ubic/gemma/core/search/SearchSettingsUtils.java new file mode 100644 index 0000000000..c29e96b238 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/core/search/SearchSettingsUtils.java @@ -0,0 +1,18 @@ +package ubic.gemma.core.search; + +import ubic.gemma.model.common.Identifiable; +import ubic.gemma.model.common.search.SearchSettings; + +import java.util.Collection; + +public class SearchSettingsUtils { + + /** + * Check if a collection of search results is already filled. + * + * @return true if the search results are filled and cannot accept more results, false otherwise + */ + public static boolean isFilled( Collection> results, SearchSettings settings ) { + return settings.getMaxResults() > 0 && results.size() >= settings.getMaxResults(); + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/core/search/lucene/LuceneQueryUtils.java b/gemma-core/src/main/java/ubic/gemma/core/search/lucene/LuceneQueryUtils.java index d1b5035198..de32bce5a5 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/search/lucene/LuceneQueryUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/core/search/lucene/LuceneQueryUtils.java @@ -1,6 +1,8 @@ package ubic.gemma.core.search.lucene; import lombok.extern.apachecommons.CommonsLog; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.lucene.index.Term; import org.apache.lucene.queryParser.ParseException; @@ -13,13 +15,19 @@ import ubic.gemma.persistence.util.QueryUtils; import javax.annotation.Nullable; +import java.io.IOException; +import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; import java.util.Collections; +import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; import java.util.regex.Pattern; +import static java.util.Objects.requireNonNull; + /** * Utilities for parsing search queries using Lucene. * @author poirigui @@ -29,6 +37,28 @@ public class LuceneQueryUtils { private static final Pattern LUCENE_RESERVED_CHARS = Pattern.compile( "[+\\-&|!(){}\\[\\]^\"~*?:\\\\]" ); + /** + * Enumeration of a few known ontology prefixes that shouldn't be parsed as fielded terms. + * TODO: make this configurable + */ + private static final Set KNOWN_ONTOLOGY_PREFIXES = new HashSet<>(); + + static { + try ( InputStream is = LuceneQueryUtils.class.getResourceAsStream( "/ubic/gemma/core/ontology/ontology.prefixes.txt" ) ) { + for ( String line : IOUtils.readLines( requireNonNull( is ), StandardCharsets.UTF_8 ) ) { + line = StringUtils.strip( line ); + // ignore comments + if ( line.startsWith( "#" ) ) { + continue; + } + KNOWN_ONTOLOGY_PREFIXES.add( line ); + } + } catch ( IOException e ) { + throw new RuntimeException( e ); + } + log.debug( "Known ontology prefixes: " + KNOWN_ONTOLOGY_PREFIXES ); + } + private static QueryParser createQueryParser() { return new QueryParser( Version.LUCENE_36, "", new PassThroughAnalyzer( Version.LUCENE_36 ) ); } @@ -265,10 +295,11 @@ public static URI prepareTermUriQuery( SearchSettings settings ) throws SearchEx /** * Check if a given term is global (i.e. not fielded). *

- * This includes the corner case when a term is a URI and would be parsed as a fielded term. + * This includes the corner case when a term is a URI and would be parsed as a fielded term or an ontology term + * using ':' as a delimiter. */ private static boolean isTermGlobal( Term term ) { - return term.field().isEmpty() || tryParseUri( term ) != null; + return term.field().isEmpty() || isOntologyTerm( term ) || tryParseUri( term ) != null; } /** @@ -276,13 +307,22 @@ private static boolean isTermGlobal( Term term ) { */ private static String termToString( Term term ) { URI uri; - if ( ( uri = tryParseUri( term ) ) != null ) { + if ( isOntologyTerm( term ) ) { + return term.field() + ":" + term.text(); + } else if ( ( uri = tryParseUri( term ) ) != null ) { return uri.toString(); } else { return term.text(); } } + /** + * Detect certain ontology terms that use ':' as a delimiter (i.e. GO:0001234). + */ + private static boolean isOntologyTerm( Term term ) { + return KNOWN_ONTOLOGY_PREFIXES.contains( term.field() ); + } + @Nullable private static URI tryParseUri( Term term ) { if ( term.text().startsWith( "http://" ) || term.text().startsWith( "https://" ) ) { diff --git a/gemma-core/src/main/java/ubic/gemma/core/search/source/GeneOntologySearchSource.java b/gemma-core/src/main/java/ubic/gemma/core/search/source/GeneOntologySearchSource.java new file mode 100644 index 0000000000..e56969384d --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/core/search/source/GeneOntologySearchSource.java @@ -0,0 +1,132 @@ +package ubic.gemma.core.search.source; + +import lombok.extern.apachecommons.CommonsLog; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import ubic.basecode.ontology.model.OntologyTerm; +import ubic.basecode.ontology.search.OntologySearchException; +import ubic.basecode.ontology.search.OntologySearchResult; +import ubic.gemma.core.ontology.providers.GeneOntologyService; +import ubic.gemma.core.search.*; +import ubic.gemma.model.common.search.SearchSettings; +import ubic.gemma.model.genome.Gene; +import ubic.gemma.persistence.service.genome.gene.GeneSearchService; + +import java.net.URI; +import java.util.Collection; +import java.util.Collections; +import java.util.DoubleSummaryStatistics; +import java.util.Set; + +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.isGoId; +import static ubic.gemma.core.search.SearchSettingsUtils.isFilled; +import static ubic.gemma.core.search.lucene.LuceneQueryUtils.extractTermsDnf; +import static ubic.gemma.core.search.lucene.LuceneQueryUtils.prepareTermUriQuery; + +/** + * GO-based search source. + *

+ * This does not exactly fit the {@link OntologySearchSource} because it is specialized for the {@link GeneOntologyService} + * and uses higher-level method to retrieve GO-gene associations. + * @author poirigui + */ +@Component +@CommonsLog +public class GeneOntologySearchSource implements SearchSource { + + /** + * Penalty applied on a full-text result. + */ + private static final double FULL_TEXT_SCORE_PENALTY = 0.9; + + @Autowired + private GeneOntologyService geneOntologyService; + + @Autowired + private GeneSearchService geneSearchService; + + @Override + public boolean accepts( SearchSettings settings ) { + return settings.isUseGo(); + } + + @Override + public Collection> searchGene( SearchSettings settings ) throws SearchException { + SearchResultSet results = new SearchResultSet<>( settings ); + Set> dnf = extractTermsDnf( settings ); + for ( Set clause : dnf ) { + SearchResultSet clauseResults = new SearchResultSet<>( settings ); + for ( String term : clause ) { + if ( clauseResults.isEmpty() ) { + clauseResults.addAll( doSearchGene( settings.withQuery( term ) ) ); + } else { + clauseResults.retainAll( doSearchGene( settings.withQuery( term ) ) ); + } + // if there are no elements in common, we can move on to the next clause + if ( clauseResults.isEmpty() ) { + break; + } + } + results.addAll( clauseResults ); + if ( isFilled( results, settings ) ) + break; + } + return results; + } + + private Collection> doSearchGene( SearchSettings settings ) throws SearchException { + SearchResultSet results = new SearchResultSet<>( settings ); + + if ( isGoId( settings.getQuery() ) ) { + // find via a full URI + URI termUri = prepareTermUriQuery( settings ); + if ( termUri != null ) { + OntologyTerm term = geneOntologyService.getTerm( termUri.toString() ); + if ( term != null ) { + for ( Gene g : geneOntologyService.getGenes( term, settings.getTaxon() ) ) { + results.add( SearchResult.from( Gene.class, g, 1.0, Collections.emptyMap(), "GeneOntologyService.getGenes using a GO URI" ) ); + } + } + } else { + // find exact matches of the GO ID + Collection exactMatchResults = geneOntologyService.getGenes( settings.getQuery(), settings.getTaxon() ); + for ( Gene g : exactMatchResults ) { + results.add( SearchResult.from( Gene.class, g, 1.0, Collections.emptyMap(), "GeneOntologyService.getGenes using a GO ID" ) ); + } + } + + return results; + } + + // find inexact match using full-text query of GO terms + try { + Collection> terms = geneOntologyService.findTerm( settings.getQuery(), 2000 ); + // rescale the scores in a [0, 1] range + DoubleSummaryStatistics summaryStatistics = terms.stream() + .mapToDouble( OntologySearchResult::getScore ) + .summaryStatistics(); + double m = summaryStatistics.getMin(); + double d = summaryStatistics.getMax() - summaryStatistics.getMin(); + for ( OntologySearchResult osr : terms ) { + for ( Gene g : geneOntologyService.getGenes( osr.getResult(), settings.getTaxon() ) ) { + double score; + if ( d == 0 ) { + score = FULL_TEXT_SCORE_PENALTY; + } else { + score = FULL_TEXT_SCORE_PENALTY * ( osr.getScore() - m ) / d; + } + results.add( SearchResult.from( Gene.class, g, score, Collections.emptyMap(), "GeneOntologyService.getGenes via full-text matches" ) ); + } + } + } catch ( OntologySearchException e ) { + throw new BaseCodeOntologySearchException( e ); + } + + // find via GO-annotated GeneSet + for ( Gene g : geneSearchService.getGOGroupGenes( settings.getQuery(), settings.getTaxon() ) ) { + results.add( SearchResult.from( Gene.class, g, 0.8, Collections.singletonMap( "GO Group", "From GO group" ), "GeneSearchService.getGOGroupGenes" ) ); + } + + return results; + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/core/search/source/OntologySearchSource.java b/gemma-core/src/main/java/ubic/gemma/core/search/source/OntologySearchSource.java index aa2fb98d65..61c4743dd3 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/search/source/OntologySearchSource.java +++ b/gemma-core/src/main/java/ubic/gemma/core/search/source/OntologySearchSource.java @@ -28,6 +28,7 @@ import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; +import static ubic.gemma.core.search.SearchSettingsUtils.isFilled; import static ubic.gemma.core.search.lucene.LuceneQueryUtils.extractTermsDnf; import static ubic.gemma.core.search.lucene.LuceneQueryUtils.prepareTermUriQuery; @@ -273,16 +274,18 @@ private void findExperimentsByOntologyResults( Collection terms, .mapToDouble( s -> s ) .filter( s -> s != EXACT_MATCH_SCORE ) .summaryStatistics(); + double m = summaryStatistics.getMin(); + double d = summaryStatistics.getMax() - summaryStatistics.getMin(); for ( OntologyResult term : terms ) { uris.add( term.getUri() ); uri2value.put( term.getUri(), term.getLabel() ); if ( term.getScore() == EXACT_MATCH_SCORE ) { uri2score.put( term.getUri(), 1.0 ); - } else if ( summaryStatistics.getMax() == summaryStatistics.getMin() ) { + } else if ( d == 0 ) { uri2score.put( term.getUri(), FULL_TEXT_SCORE_PENALTY ); } else { - uri2score.put( term.getUri(), FULL_TEXT_SCORE_PENALTY * ( term.getScore() - summaryStatistics.getMin() ) / ( summaryStatistics.getMax() - summaryStatistics.getMin() ) ); + uri2score.put( term.getUri(), FULL_TEXT_SCORE_PENALTY * ( term.getScore() - m ) / d ); } } @@ -326,21 +329,12 @@ private void addExperimentsByUrisHits( Map> hi } } - /** - * Check if a collection of search results is already filled. - * - * @return true if the search results are filled and cannot accept more results, false otherwise - */ - private static boolean isFilled( Collection> results, SearchSettings settings ) { - return settings.getMaxResults() > 0 && results.size() >= settings.getMaxResults(); - } - /** * Obtain a limit suitable for the given search results and settings. * * @return the difference between the maximum results and the collection size or -1 if the settings are for * unlimited results - * @throws IllegalArgumentException if the search results are already fully filled as per {@link #isFilled(Collection, SearchSettings)} + * @throws IllegalArgumentException if the search results are already fully filled as per {@link SearchSettingsUtils#isFilled(Collection, SearchSettings)} */ private static int getLimit( Collection> results, SearchSettings settings ) { if ( isFilled( results, settings ) ) { diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java index e0e5615e68..fdcc6379f0 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractDao.java @@ -312,6 +312,8 @@ public void update( Collection entities ) { StopWatch timer; if ( isDebugEnabled ) { timer = StopWatch.createStarted(); + } else { + timer = null; } for ( T entity : entities ) { this.update( entity ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDao.java index d45ca5d586..604bceb68f 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDao.java @@ -24,7 +24,6 @@ import ubic.gemma.model.genome.Taxon; import ubic.gemma.persistence.service.BaseDao; -import javax.annotation.Nullable; import java.util.Collection; import java.util.Map; @@ -46,15 +45,11 @@ public interface Gene2GOAssociationDao extends BaseDao { Map> findByGenes( Collection needToFind ); - Collection findByGoTerm( String goId, Taxon taxon ); + Collection findByGoTerms( Collection goIds ); - Map> findByGoTermsPerTaxon( Collection termsToFetch ); - - @SuppressWarnings("unused") - // Ensures consistency - Collection getGenes( Collection ids ); + Collection findByGoTerms( Collection goIds, Taxon taxon ); - Collection getGenes( Collection ids, @Nullable Taxon taxon ); + Map> findByGoTermsPerTaxon( Collection termsToFetch ); int removeAll(); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDaoImpl.java index ca49fda311..20d66ff95a 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationDaoImpl.java @@ -28,10 +28,10 @@ import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.genome.Gene; import ubic.gemma.model.genome.Taxon; +import ubic.gemma.persistence.hibernate.HibernateUtils; import ubic.gemma.persistence.service.AbstractDao; import ubic.gemma.persistence.util.BusinessKey; import ubic.gemma.persistence.util.EntityUtils; -import ubic.gemma.persistence.hibernate.HibernateUtils; import ubic.gemma.persistence.util.QueryUtils; import javax.annotation.Nullable; @@ -114,51 +114,44 @@ public Map> findByGenes( Collection needT } @Override - public Collection findByGoTerm( String goId, Taxon taxon ) { - //noinspection unchecked - return super.getSessionFactory().getCurrentSession().createQuery( - "select distinct geneAss.gene from Gene2GOAssociation as geneAss " - + "where geneAss.ontologyEntry.value = :goID and geneAss.gene.taxon = :taxon" ) - .setParameter( "goID", goId.replaceFirst( ":", "_" ) ).setParameter( "taxon", taxon ).list(); - } - - @Override - public Map> findByGoTermsPerTaxon( Collection termsToFetch ) { - Collection genes = this.getGenes( termsToFetch ); - Map> results = new HashMap<>(); - - for ( Gene g : genes ) { - if ( !results.containsKey( g.getTaxon() ) ) { - results.put( g.getTaxon(), new HashSet() ); - } - results.get( g.getTaxon() ).add( g ); + public Collection findByGoTerms( Collection goIds ) { + if ( goIds.isEmpty() ) { + return Collections.emptyList(); } - return results; - } - - @Override - public Collection getGenes( Collection ids ) { //noinspection unchecked return this.getSessionFactory().getCurrentSession().createQuery( "select distinct geneAss.gene from Gene2GOAssociation as geneAss " + "where geneAss.ontologyEntry.value in ( :goIDs)" ) - .setParameterList( "goIDs", optimizeParameterList( ids ) ).list(); + .setParameterList( "goIDs", optimizeParameterList( goIds ) ).list(); } @Override - public Collection getGenes( Collection ids, @Nullable Taxon taxon ) { - if ( taxon == null ) - return this.getGenes( ids ); - + public Collection findByGoTerms( Collection goIds, @Nullable Taxon taxon ) { + if ( goIds.isEmpty() ) { + return Collections.emptyList(); + } //noinspection unchecked return this.getSessionFactory().getCurrentSession().createQuery( "select distinct gene from Gene2GOAssociation as geneAss join geneAss.gene as gene " + "where geneAss.ontologyEntry.value in ( :goIDs) and gene.taxon = :tax" ) - .setParameterList( "goIDs", optimizeParameterList( ids ) ) + .setParameterList( "goIDs", optimizeParameterList( goIds ) ) .setParameter( "tax", taxon ) .list(); } + @Override + public Map> findByGoTermsPerTaxon( Collection termsToFetch ) { + Collection genes = this.findByGoTerms( termsToFetch ); + Map> results = new HashMap<>(); + for ( Gene g : genes ) { + if ( !results.containsKey( g.getTaxon() ) ) { + results.put( g.getTaxon(), new HashSet() ); + } + results.get( g.getTaxon() ).add( g ); + } + return results; + } + @Override public int removeAll() { //noinspection unchecked diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationService.java index c9219c212e..1a7c9fe95b 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationService.java @@ -50,21 +50,21 @@ public interface Gene2GOAssociationService extends BaseImmutableService> findByGenes( Collection genes ); - Collection findByGOTerm( String goID, Taxon taxon ); - /** - * Remove all Gene2GO associations in batch. + * Find all the genes that match any of the terms. + *

+ * Used to fetch genes associated with a term + children. */ - @Secured({ "GROUP_ADMIN" }) - int removeAll(); + Collection findByGOTerms( Collection termsToFetch, @Nullable Taxon taxon ); /** - * @param termsToFetch terms - * @param taxon constraint - * @return all the genes that match any of the terms. Used to fetch genes associated with a term + - * children. + * Find all genes associated with a given set of GO terms, grouped by taxon. */ - Collection findByGOTerms( Collection termsToFetch, @Nullable Taxon taxon ); - Map> findByGOTermsPerTaxon( Collection termsToFetch ); + + /** + * Remove all Gene2GO associations in batch. + */ + @Secured({ "GROUP_ADMIN" }) + int removeAll(); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationServiceImpl.java index b948a8fdfc..1decf72408 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/association/Gene2GOAssociationServiceImpl.java @@ -29,8 +29,8 @@ import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.genome.Gene; import ubic.gemma.model.genome.Taxon; -import ubic.gemma.persistence.service.AbstractService; import ubic.gemma.persistence.cache.CacheUtils; +import ubic.gemma.persistence.service.AbstractService; import javax.annotation.Nullable; import java.util.Collection; @@ -114,22 +114,14 @@ public Map> findByGenes( Collection genes } - @Override - @Transactional(readOnly = true) - public Collection findByGOTerm( String goID, Taxon taxon ) { - return this.gene2GOAssociationDao.findByGoTerm( goID, taxon ); - } - - @Override - @Transactional - public int removeAll() { - return this.gene2GOAssociationDao.removeAll(); - } - @Override @Transactional(readOnly = true) public Collection findByGOTerms( Collection termsToFetch, @Nullable Taxon taxon ) { - return this.gene2GOAssociationDao.getGenes( termsToFetch, taxon ); + if ( taxon == null ) { + return this.gene2GOAssociationDao.findByGoTerms( termsToFetch ); + } else { + return this.gene2GOAssociationDao.findByGoTerms( termsToFetch, taxon ); + } } @Override @@ -138,4 +130,9 @@ public Map> findByGOTermsPerTaxon( Collection te return this.gene2GOAssociationDao.findByGoTermsPerTaxon( termsToFetch ); } + @Override + @Transactional + public int removeAll() { + return this.gene2GOAssociationDao.removeAll(); + } } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchService.java index 8bd6a35f0a..27a2fd95bf 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchService.java @@ -24,6 +24,7 @@ import ubic.gemma.model.genome.Taxon; import ubic.gemma.model.genome.gene.GeneValueObject; +import javax.annotation.Nullable; import java.io.IOException; import java.util.Collection; import java.util.Map; @@ -40,12 +41,12 @@ public interface GeneSearchService { * hierarchy * * @param goId GO id that must be in the format "GO_#######" - * @param taxonId must not be null and must correspond to a taxon + * @param taxonId a taxan ID to retrieve results from, or null for genes in any taxon * @return empty if goId was blank or taxonId didn't correspond to a taxon */ Collection getGenesByGOId( String goId, Long taxonId ); - Collection getGOGroupGenes( String goQuery, Taxon taxon ) throws SearchException; + Collection getGOGroupGenes( String goQuery, @Nullable Taxon taxon ) throws SearchException; Collection searchGenesAndGeneGroups( String query, Long taxonId ) throws SearchException; diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchServiceImpl.java index a4c5a23180..4bddb09221 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/genome/gene/GeneSearchServiceImpl.java @@ -36,6 +36,7 @@ import ubic.gemma.model.genome.gene.*; import ubic.gemma.persistence.service.genome.taxon.TaxonService; +import javax.annotation.Nullable; import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; @@ -84,24 +85,23 @@ public GeneSearchServiceImpl( SearchService searchService, SecurityService secur @Override public Collection getGenesByGOId( String goId, Long taxonId ) { - + if ( StringUtils.isBlank( goId ) || !goId.toUpperCase().startsWith( "GO" ) ) { + return Collections.emptySet(); + } Taxon tax = taxonService.load( taxonId ); - - if ( !StringUtils.isBlank( goId ) && tax != null && goId.toUpperCase().startsWith( "GO" ) ) { - - Collection results = geneOntologyService.getGenes( goId, tax ); - if ( results != null ) { - results = geneService.thawLite( results ); - return geneService.loadValueObjects( results ); - } + if ( tax == null ) { + return Collections.emptySet(); + } + Collection results = geneOntologyService.getGenes( goId, tax ); + if ( results != null ) { + results = geneService.thawLite( results ); + return geneService.loadValueObjects( results ); } - return new HashSet<>(); - } @Override - public Collection getGOGroupGenes( String goQuery, Taxon taxon ) throws SearchException { + public Collection getGOGroupGenes( String goQuery, @Nullable Taxon taxon ) throws SearchException { StopWatch timer = new StopWatch(); timer.start(); Collection taxaForPhenotypeAssoc = new ArrayList<>(); diff --git a/gemma-core/src/main/resources/ubic/gemma/core/ontology/ontology.prefixes.txt b/gemma-core/src/main/resources/ubic/gemma/core/ontology/ontology.prefixes.txt new file mode 100644 index 0000000000..183bfa577a --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/ontology/ontology.prefixes.txt @@ -0,0 +1,7 @@ +# This file contains ontology prefixes +# This is mainly used for parsing ontology terms in search queries +GO +MONDO +TGEMO +TGFVO +UBERON \ No newline at end of file diff --git a/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceTest.java b/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceTest.java index d69e6f565d..feee548fb2 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyServiceTest.java @@ -46,6 +46,7 @@ import static org.junit.Assert.*; import static org.mockito.Mockito.mock; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; /** * @author Paul @@ -149,7 +150,7 @@ public final void testAsRegularGoId() { String id = "GO:0000107"; OntologyTerm termForId = gos.getTermForId( id ); assertNotNull( termForId ); - String formatedId = GeneOntologyServiceImpl.asRegularGoId( termForId ); + String formatedId = asRegularGoId( termForId ); assertEquals( id, formatedId ); } diff --git a/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyUtilsTest.java b/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyUtilsTest.java new file mode 100644 index 0000000000..a07bb824f8 --- /dev/null +++ b/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GeneOntologyUtilsTest.java @@ -0,0 +1,26 @@ +package ubic.gemma.core.ontology.providers; + +import org.junit.Test; + +import static org.junit.Assert.*; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.isGoId; + +public class GeneOntologyUtilsTest { + + @Test + public void testIsGoId() { + assertTrue( isGoId( "GO:11209200" ) ); + assertTrue( isGoId( "GO_11209200" ) ); + assertTrue( isGoId( "http://purl.obolibrary.org/obo/GO_11209200" ) ); + assertFalse( isGoId( "http://purl.obolibrary.org/obo/MONDO_11209200" ) ); + } + + @Test + public void testAsRegularGoId() { + assertEquals( "GO:0000001", asRegularGoId( "GO:0000001" ) ); + assertEquals( "GO:0000001", asRegularGoId( "GO_0000001" ) ); + assertEquals( "GO:0000001", asRegularGoId( "http://purl.obolibrary.org/obo/GO_0000001" ) ); + assertNull( asRegularGoId( "MONDO:0000001" ) ); + } +} \ No newline at end of file diff --git a/gemma-core/src/test/java/ubic/gemma/core/search/lucene/LuceneQueryUtilsTest.java b/gemma-core/src/test/java/ubic/gemma/core/search/lucene/LuceneQueryUtilsTest.java index 95764a0e47..dd4e3ee651 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/search/lucene/LuceneQueryUtilsTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/search/lucene/LuceneQueryUtilsTest.java @@ -65,6 +65,13 @@ public void testExtractDnfWithUris() throws SearchException { .contains( set( "http://example.com/GO:1234" ), set( "http://example.com/GO:1235" ) ); } + @Test + public void testExtractDnfWithOntologyTerms() throws SearchException { + // reckognized ontology prefixes are listed in ontology.prefixes.txt + assertThat( extractTermsDnf( SearchSettings.geneSearch( "GO:0100101 OR GO:0100102 OR DGO:1090129", null ) ) ) + .contains( set( "GO:0100101" ), set( "GO:0100102" ) ); + } + @Test public void testPrepareDatabaseQuery() throws SearchException { assertEquals( "BRCA1", prepareDatabaseQuery( SearchSettings.geneSearch( "BRCA1", null ) ) ); diff --git a/gemma-core/src/test/java/ubic/gemma/core/search/source/GeneOntologySearchSourceTest.java b/gemma-core/src/test/java/ubic/gemma/core/search/source/GeneOntologySearchSourceTest.java new file mode 100644 index 0000000000..560b33b6c0 --- /dev/null +++ b/gemma-core/src/test/java/ubic/gemma/core/search/source/GeneOntologySearchSourceTest.java @@ -0,0 +1,87 @@ +package ubic.gemma.core.search.source; + +import org.junit.After; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; +import ubic.basecode.ontology.model.OntologyTerm; +import ubic.basecode.ontology.search.OntologySearchException; +import ubic.basecode.ontology.search.OntologySearchResult; +import ubic.gemma.core.context.TestComponent; +import ubic.gemma.core.ontology.providers.GeneOntologyService; +import ubic.gemma.core.search.SearchException; +import ubic.gemma.model.common.search.SearchSettings; +import ubic.gemma.persistence.service.genome.gene.GeneSearchService; + +import java.util.Collections; + +import static org.mockito.Mockito.*; + +@ContextConfiguration +public class GeneOntologySearchSourceTest extends AbstractJUnit4SpringContextTests { + + @Configuration + @TestComponent + static class GOSSTCC { + + @Bean + public GeneOntologySearchSource GeneOntologySearchSource() { + return new GeneOntologySearchSource(); + } + + @Bean + public GeneOntologyService geneOntologyService() { + return mock(); + } + + @Bean + public GeneSearchService geneSearchService() { + return mock(); + } + } + + @Autowired + private GeneOntologySearchSource geneOntologySearchSource; + + @Autowired + private GeneOntologyService geneOntologyService; + + @After + public void resetMocks() { + reset( geneOntologyService ); + } + + @Test + public void test() throws SearchException, OntologySearchException { + SearchSettings settings = SearchSettings.geneSearch( "GO:000001", null ); + geneOntologySearchSource.searchGene( settings ); + verify( geneOntologyService ).getGenes( "GO:000001", null ); + verifyNoMoreInteractions( geneOntologyService ); + } + + @Test + public void testWithUri() throws SearchException { + when( geneOntologyService.getTerm( "http://purl.obolibrary.org/obo/GO:000001" ) ) + .thenReturn( mock() ); + SearchSettings settings = SearchSettings.geneSearch( "http://purl.obolibrary.org/obo/GO:000001", null ); + geneOntologySearchSource.searchGene( settings ); + verify( geneOntologyService ).getTerm( "http://purl.obolibrary.org/obo/GO:000001" ); + verify( geneOntologyService ).getGenes( any( OntologyTerm.class ), isNull() ); + verifyNoMoreInteractions( geneOntologyService ); + } + + @Test + public void testWithFreeTextTerms() throws SearchException, OntologySearchException { + when( geneOntologyService.findTerm( any(), anyInt() ) ) + .thenReturn( Collections.singleton( new OntologySearchResult<>( mock(), 1.0 ) ) ); + SearchSettings settings = SearchSettings.geneSearch( "synaptic transmission", null ); + geneOntologySearchSource.searchGene( settings ); + verify( geneOntologyService ).findTerm( "synaptic", 2000 ); + verify( geneOntologyService ).findTerm( "transmission", 2000 ); + verify( geneOntologyService, times( 2 ) ).getGenes( any( OntologyTerm.class ), isNull() ); + verifyNoMoreInteractions( geneOntologyService ); + } +} \ No newline at end of file diff --git a/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GOdescriptionEndpoint.java b/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GOdescriptionEndpoint.java index 6cd102a4d6..3aefbe8d0e 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GOdescriptionEndpoint.java +++ b/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GOdescriptionEndpoint.java @@ -33,6 +33,8 @@ import java.util.ArrayList; import java.util.Collection; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; + /** * Given a collection of Gene ID, will return a collection of Gene Ontology IDs (ie. GO:0039392) and their corresponding * descriptions. @@ -107,7 +109,7 @@ protected Element invokeInternal( Element requestElement, Document document ) { e1.appendChild( document.createTextNode( gene.getId().toString() ) ); responseElement.appendChild( e1 ); - String goTerm = GeneOntologyServiceImpl.asRegularGoId( ot ); + String goTerm = asRegularGoId( ot ); Element e2 = document.createElement( "go_id" ); e2.appendChild( document.createTextNode( goTerm ) ); responseElement.appendChild( e2 ); diff --git a/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GoTermEndpoint.java b/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GoTermEndpoint.java index ea231b1d22..de024c03d6 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GoTermEndpoint.java +++ b/gemma-web/src/main/java/ubic/gemma/web/services/Gene2GoTermEndpoint.java @@ -35,6 +35,8 @@ import java.util.Collection; import java.util.HashSet; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; + /** * Given a collection of Gene IDs, will return a collection of Gene Ontology URIs for each gene. * @@ -109,7 +111,7 @@ protected Element invokeInternal( Element requestElement, Document document ) { Collection goTerms = new HashSet(); if ( terms != null ) { for ( OntologyTerm ot : terms ) { - goTerms.add( GeneOntologyServiceImpl.asRegularGoId( ot ) ); + goTerms.add( asRegularGoId( ot ) ); } } else goTerms.add( "NaN" ); diff --git a/gemma-web/src/main/java/ubic/gemma/web/services/GeneOverlapEndpoint.java b/gemma-web/src/main/java/ubic/gemma/web/services/GeneOverlapEndpoint.java index 77f65a3c0f..2c33a06b5f 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/services/GeneOverlapEndpoint.java +++ b/gemma-web/src/main/java/ubic/gemma/web/services/GeneOverlapEndpoint.java @@ -35,6 +35,8 @@ import java.util.HashSet; import java.util.Map; +import static ubic.gemma.core.ontology.providers.GeneOntologyUtils.asRegularGoId; + /** * given a query gene id & collection of target gene ids will determine the overlapping Go terms (intersection) between * each pair of Query Gene and Target Gene. The actual overlapping go terms will be returned as a single string @@ -123,7 +125,7 @@ protected Element invokeInternal( Element requestElement, Document document ) { // get the labels and store them Collection goTerms = new HashSet(); for ( OntologyTerm ot : gene2Ot.get( geneId ) ) { - goTerms.add( GeneOntologyServiceImpl.asRegularGoId( ot ) ); + goTerms.add( asRegularGoId( ot ) ); } String elementString1 = geneId.toString(); From b1ba458d764a128006df8bf3e2b6c32a51ed3d9e Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 22 Jul 2024 14:45:00 -0400 Subject: [PATCH 22/99] Fix duplicated factor values in tests Always check if a sample already has a factor in GeoConverterImpl, in one test case, the timepoint was specified multiple times with different labels (i.e. '6 days' and '6 d') which caused duplication. --- .../expression/geo/GeoConverterImpl.java | 35 +++++++------------ .../biomaterial/BioMaterialDaoImpl.java | 15 ++++++-- .../persistence/util/IdentifiableUtils.java | 12 +++++++ .../biomaterial/BioMaterialDaoTest.java | 2 +- .../FactorValueServiceIntegrationTest.java | 25 ++++--------- 5 files changed, 45 insertions(+), 44 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java index c6edf2f608..8eb19af46d 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java @@ -481,11 +481,7 @@ private void addFactorValueToBioMaterial( ExpressionExperiment expExp, GeoSubset // find the matching biomaterial(s) in the expression experiment. for ( BioAssay bioAssay : expExp.getBioAssays() ) { if ( bioAssay.getAccession().getAccession().equals( sample.getGeoAccession() ) ) { - BioMaterial material = bioAssay.getSampleUsed(); - if ( GeoConverterImpl.log.isDebugEnabled() ) { - GeoConverterImpl.log.debug( "Adding " + factorValue.getExperimentalFactor() + " : " + factorValue + " to " + material ); - } - material.getFactorValues().add( factorValue ); + addFactorValueToBioMaterial( bioAssay.getSampleUsed(), factorValue ); } } @@ -493,21 +489,21 @@ private void addFactorValueToBioMaterial( ExpressionExperiment expExp, GeoSubset } } - /** - * @param bioMaterial BA - * @param experimentalFactor exp factor - * @return true if the biomaterial already has a factorvalue for the given experimentalFactor; - * false otherwise. - */ - private boolean alreadyHasFactorValueForFactor( BioMaterial bioMaterial, ExperimentalFactor experimentalFactor ) { + private void addFactorValueToBioMaterial( BioMaterial bioMaterial, FactorValue matchingFactorValue ) { + ExperimentalFactor experimentalFactor = matchingFactorValue.getExperimentalFactor(); for ( FactorValue fv : bioMaterial.getFactorValues() ) { ExperimentalFactor existingEf = fv.getExperimentalFactor(); // This is a weak form of 'equals' - we just check the name. if ( existingEf.getName().equals( experimentalFactor.getName() ) ) { - return true; + GeoConverterImpl.log.warn( String.format( "%s already has a factor value for %s: %s, ignoring %s.", + bioMaterial, matchingFactorValue.getExperimentalFactor(), fv, matchingFactorValue ) ); + return; } } - return false; + if ( GeoConverterImpl.log.isDebugEnabled() ) { + GeoConverterImpl.log.debug( "Adding " + matchingFactorValue.getExperimentalFactor() + " : " + matchingFactorValue + " to " + bioMaterial ); + } + bioMaterial.getFactorValues().add( matchingFactorValue ); } /** @@ -2874,7 +2870,7 @@ private void matchSampleReplicationToExperimentalFactorValue( BioMaterial bioMat FactorValue convertVariableToFactorValue = this.convertReplicationToFactorValue( replication ); FactorValue matchingFactorValue = this.findMatchingExperimentalFactorValue( experimentalFactors, convertVariableToFactorValue ); if ( matchingFactorValue != null ) { - bioMaterial.getFactorValues().add( matchingFactorValue ); + addFactorValueToBioMaterial( bioMaterial, matchingFactorValue ); } else { throw new IllegalStateException( "Could not find matching factor value for " + replication + " in experimental design for sample " + bioMaterial ); } @@ -2909,13 +2905,7 @@ private void matchSampleVariableToExperimentalFactorValue( BioMaterial bioMateri throw new IllegalStateException( "Could not find matching factor value for " + variable + " in experimental design for sample " + bioMaterial ); } - // make sure we don't put the factor value on more than once. - if ( this.alreadyHasFactorValueForFactor( bioMaterial, matchingFactorValue.getExperimentalFactor() ) ) { - return; - } - - bioMaterial.getFactorValues().add( matchingFactorValue ); - + addFactorValueToBioMaterial( bioMaterial, matchingFactorValue ); } /* @@ -2980,5 +2970,4 @@ private String trimString( String characteristic ) { } return characteristic; } - } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java index 065fc3a62b..aab7aa599b 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoImpl.java @@ -27,15 +27,18 @@ import org.springframework.util.Assert; import ubic.gemma.model.expression.biomaterial.BioMaterial; import ubic.gemma.model.expression.biomaterial.BioMaterialValueObject; +import ubic.gemma.model.expression.experiment.ExperimentalFactor; import ubic.gemma.model.expression.experiment.ExpressionExperiment; import ubic.gemma.model.expression.experiment.FactorValue; import ubic.gemma.persistence.service.AbstractDao; import ubic.gemma.persistence.service.AbstractVoEnabledDao; import ubic.gemma.persistence.util.BusinessKey; +import ubic.gemma.persistence.util.IdentifiableUtils; import java.util.Collection; import java.util.HashSet; import java.util.Set; +import java.util.stream.Collectors; /** * @author pavlidis @@ -143,8 +146,16 @@ private void validate( BioMaterial bm ) { for ( FactorValue fv : bm.getFactorValues() ) { // already assumed since Assert.notNull( fv.getExperimentalFactor().getId() ); - Assert.isTrue( seenExperimentalFactorIds.add( fv.getExperimentalFactor().getId() ), - bm + " has more than one factor values for ExperimentalFactor Id=" + fv.getExperimentalFactor().getId() + "." ); + if ( !seenExperimentalFactorIds.add( fv.getExperimentalFactor().getId() ) ) { + String affectedFvs = bm.getFactorValues().stream(). + filter( fv2 -> fv2.getExperimentalFactor().getId().equals( fv.getExperimentalFactor().getId() ) ) + .map( FactorValue::toString ) + .collect( Collectors.joining( "\n\t" ) ); + throw new IllegalArgumentException( String.format( "%s has more than one factor values for %s:\n\t%s", + bm, + IdentifiableUtils.toString( fv.getExperimentalFactor(), ExperimentalFactor.class ), + affectedFvs ) ); + } } } } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/util/IdentifiableUtils.java b/gemma-core/src/main/java/ubic/gemma/persistence/util/IdentifiableUtils.java index c9f5b05dfb..b43c997739 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/util/IdentifiableUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/util/IdentifiableUtils.java @@ -1,5 +1,6 @@ package ubic.gemma.persistence.util; +import org.hibernate.Hibernate; import ubic.gemma.model.common.Identifiable; import java.util.*; @@ -34,4 +35,15 @@ public class IdentifiableUtils { public static Collector> toIdentifiableMap( Function keyMapper, Function valueMapper ) { return Collectors.toMap( keyMapper, valueMapper, ( a, b ) -> b, () -> new TreeMap<>( Comparator.comparing( Identifiable::getId ) ) ); } + + /** + * Converts an identifiable to string, avoiding its initialization of it is a proxy. + */ + public static String toString( T identifiable, Class clazz ) { + if ( Hibernate.isInitialized( identifiable ) ) { + return Objects.toString( identifiable ); + } else { + return clazz.getSimpleName() + ( identifiable.getId() != null ? " Id=" + identifiable.getId() : "" ); + } + } } diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java index 7daf56074d..f39297dcd3 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/biomaterial/BioMaterialDaoTest.java @@ -95,6 +95,6 @@ public void testCreateWithMultipleFactorValueForSameExperimentalFactor() { bm.getFactorValues().add( fv2 ); assertThatThrownBy( () -> bioMaterialDao.create( bm ) ) .isInstanceOf( IllegalArgumentException.class ) - .hasMessage( "BioMaterial has more than one factor values for ExperimentalFactor Id=" + ef.getId() + "." ); + .hasMessageStartingWith( "BioMaterial has more than one factor values for ExperimentalFactor Id=" + ef.getId() + " Type=CATEGORICAL:" ); } } \ No newline at end of file diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueServiceIntegrationTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueServiceIntegrationTest.java index 1bf5914924..6b8982a5a5 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueServiceIntegrationTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/expression/experiment/FactorValueServiceIntegrationTest.java @@ -19,21 +19,18 @@ package ubic.gemma.persistence.service.expression.experiment; -import org.assertj.core.api.Assertions; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import ubic.gemma.core.util.test.BaseSpringContextTest; -import ubic.gemma.model.expression.bioAssay.BioAssay; import ubic.gemma.model.expression.biomaterial.BioMaterial; import ubic.gemma.model.expression.experiment.ExpressionExperiment; import ubic.gemma.model.expression.experiment.FactorValue; import ubic.gemma.persistence.service.expression.biomaterial.BioMaterialService; -import ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService; -import ubic.gemma.persistence.service.expression.experiment.FactorValueService; -import static org.junit.Assert.*; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertNull; /** * @author paul @@ -68,17 +65,9 @@ public void testDelete() { FactorValue fv = ee.getExperimentalDesign().getExperimentalFactors().iterator().next().getFactorValues() .iterator().next(); - // attach the FV to all the samples - for ( BioAssay ba : ee.getBioAssays() ) { - BioMaterial bm = ba.getSampleUsed(); - bm.getFactorValues().add( fv ); - bioMaterialService.update( bm ); - } - - ee = expressionExperimentService.thawLite( ee ); - Assertions.assertThat( ee.getBioAssays() ).allSatisfy( ba -> { - BioMaterial bm = ba.getSampleUsed(); - assertTrue( bm.getFactorValues().contains( fv ) ); + // ensure that the FV is being used + assertThat( ee.getBioAssays() ).anySatisfy( ba -> { + assertThat( ba.getSampleUsed().getFactorValues() ).contains( fv ); } ); // delete the FV @@ -87,9 +76,9 @@ public void testDelete() { assertNull( factorValueService.load( id ) ); ee = expressionExperimentService.thawLite( ee ); - Assertions.assertThat( ee.getBioAssays() ).allSatisfy( ba -> { + assertThat( ee.getBioAssays() ).allSatisfy( ba -> { BioMaterial bm = ba.getSampleUsed(); - assertFalse( bm.getFactorValues().contains( fv ) ); + assertThat( bm.getFactorValues() ).doesNotContain( fv ); } ); } From c1b0dfc556730d3b5c74c857c1d16e04854ee72b Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 22 Jul 2024 16:31:58 -0400 Subject: [PATCH 23/99] Handle uninitialized EF proxy when validating a FV --- .../expression/experiment/FactorValueDaoImpl.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java index b0cc2e0653..a5e0e2aa61 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/FactorValueDaoImpl.java @@ -39,6 +39,7 @@ import java.util.Set; import java.util.stream.Collectors; +import static java.util.Objects.requireNonNull; import static ubic.gemma.persistence.util.QueryUtils.optimizeParameterList; /** @@ -161,8 +162,18 @@ protected FactorValueValueObject doLoadValueObject( FactorValue entity ) { } private void validate( FactorValue factorValue ) { + FactorType factorType; + if ( Hibernate.isInitialized( factorValue.getExperimentalFactor() ) ) { + factorType = factorValue.getExperimentalFactor().getType(); + } else { + // if the EF is not initialized, just obtain the FactorType directly instead of loading the EF (which also + // loads potentially many other FVs) + factorType = requireNonNull( ( FactorType ) getSessionFactory().getCurrentSession() + .createQuery( "select ef.type from ExperimentalFactor ef where ef = :ef" ) + .setParameter( "ef", factorValue.getExperimentalFactor() ) + .uniqueResult() ); + } // validate categorical v.s. continuous factor values - FactorType factorType = factorValue.getExperimentalFactor().getType(); if ( factorType.equals( FactorType.CONTINUOUS ) ) { Assert.notNull( factorValue.getMeasurement(), "Continuous factor values must have a measurement: " + factorValue ); Assert.isTrue( factorValue.getValue() == null || factorValue.getValue().equals( factorValue.getMeasurement().getValue() ), From 37a65fae0055bbd622e1c92dbce8bd70efac2c05 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 22 Jul 2024 19:23:56 -0400 Subject: [PATCH 24/99] Ensure that :retainedTermUris is set only if used (fix #1178) In some scenarios, this parameter is not used even if non-null and non-empty. --- .../ExpressionExperimentDaoImpl.java | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java index 34b134a07b..b2f3c2900c 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java @@ -630,6 +630,7 @@ private List getAnnotationsByLevel( ExpressionExperiment express @Override public Map getCategoriesUsageFrequency( @Nullable Collection eeIds, @Nullable Collection excludedCategoryUris, @Nullable Collection excludedTermUris, @Nullable Collection retainedTermUris, int maxResults ) { boolean doAclFiltering = eeIds == null; + boolean useRetainedTermUris = false; if ( eeIds != null && eeIds.isEmpty() ) { return Collections.emptyMap(); } @@ -666,7 +667,10 @@ public Map getCategoriesUsageFrequency( @Nullable Collecti } else { query += "where T.EXPRESSION_EXPERIMENT_FK is not null"; } - query += getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); + String c = getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); + if ( !c.isEmpty() ) { + useRetainedTermUris = retainedTermUris != null && !retainedTermUris.isEmpty(); + } if ( doAclFiltering ) { query += EE2CAclQueryUtils.formNativeAclRestrictionClause( ( SessionFactoryImplementor ) getSessionFactory(), "T.ACL_IS_AUTHENTICATED_ANONYMOUSLY_MASK" ); // troubled filtering @@ -689,7 +693,7 @@ public Map getCategoriesUsageFrequency( @Nullable Collecti if ( excludedTermUris != null && !excludedTermUris.isEmpty() ) { q.setParameterList( "excludedTermUris", optimizeParameterList( excludedTermUris ) ); } - if ( retainedTermUris != null && !retainedTermUris.isEmpty() ) { + if ( useRetainedTermUris ) { q.setParameterList( "retainedTermUris", optimizeParameterList( retainedTermUris ) ); } if ( doAclFiltering ) { @@ -731,6 +735,7 @@ private Map aggregateByCategory( List result ) { @Override public Map getAnnotationsUsageFrequency( @Nullable Collection eeIds, @Nullable Class level, int maxResults, int minFrequency, @Nullable String category, @Nullable Collection excludedCategoryUris, @Nullable Collection excludedTermUris, @Nullable Collection retainedTermUris ) { boolean doAclFiltering = eeIds == null; + boolean useRetainedTermUris = false; if ( eeIds != null && eeIds.isEmpty() ) { return Collections.emptyMap(); } @@ -782,10 +787,18 @@ else if ( category.startsWith( "http://" ) ) { query += " and T.CATEGORY = :category"; } // no need to filter out excluded categories if a specific one is requested - query += getExcludeUrisClause( null, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); + String c = getExcludeUrisClause( null, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); + if ( !c.isEmpty() ) { + useRetainedTermUris = retainedTermUris != null && !retainedTermUris.isEmpty(); + } + query += c; } else { // all categories are requested, we may filter out excluded ones - query += getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); + String c = getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); + if ( !c.isEmpty() ) { + useRetainedTermUris = retainedTermUris != null && !retainedTermUris.isEmpty(); + } + query += c; } if ( doAclFiltering ) { query += EE2CAclQueryUtils.formNativeAclRestrictionClause( ( SessionFactoryImplementor ) getSessionFactory(), "T.ACL_IS_AUTHENTICATED_ANONYMOUSLY_MASK" ); @@ -801,6 +814,7 @@ else if ( category.startsWith( "http://" ) ) { query += " having EE_COUNT >= :minFrequency"; if ( retainedTermUris != null && !retainedTermUris.isEmpty() ) { query += " or VALUE_URI in (:retainedTermUris)"; + useRetainedTermUris = true; } } if ( maxResults > 0 ) { @@ -826,7 +840,8 @@ else if ( category.startsWith( "http://" ) ) { if ( excludedTermUris != null && !excludedTermUris.isEmpty() ) { q.setParameterList( "excludedTermUris", optimizeParameterList( excludedTermUris ) ); } - if ( retainedTermUris != null && !retainedTermUris.isEmpty() ) { + if ( useRetainedTermUris ) { + assert retainedTermUris != null; q.setParameterList( "retainedTermUris", optimizeParameterList( retainedTermUris ) ); } if ( level != null ) { From 8756880685b9b9a805fa19eed9eb0981648ffc15 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 23 Jul 2024 10:50:37 -0400 Subject: [PATCH 25/99] Improve logic for generating excluded terms/categories clauses --- .../ExpressionExperimentDaoImpl.java | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java index b2f3c2900c..8fac206ac8 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java @@ -667,9 +667,15 @@ public Map getCategoriesUsageFrequency( @Nullable Collecti } else { query += "where T.EXPRESSION_EXPERIMENT_FK is not null"; } - String c = getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); - if ( !c.isEmpty() ) { - useRetainedTermUris = retainedTermUris != null && !retainedTermUris.isEmpty(); + String excludeUrisClause = getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized ); + if ( excludeUrisClause != null ) { + query += " and ("; + query += "(" + excludeUrisClause + ")"; + if ( retainedTermUris != null && !retainedTermUris.isEmpty() ) { + query += " or T.VALUE_URI in (:retainedTermUris)"; + useRetainedTermUris = true; + } + query += ")"; } if ( doAclFiltering ) { query += EE2CAclQueryUtils.formNativeAclRestrictionClause( ( SessionFactoryImplementor ) getSessionFactory(), "T.ACL_IS_AUTHENTICATED_ANONYMOUSLY_MASK" ); @@ -775,6 +781,7 @@ public Map getAnnotationsUsageFrequency( @Nullable Collect if ( level != null ) { query += " and T.LEVEL = :level"; } + String excludeUrisClause; if ( category != null ) { // a specific category is requested if ( category.equals( UNCATEGORIZED ) ) { @@ -787,18 +794,19 @@ else if ( category.startsWith( "http://" ) ) { query += " and T.CATEGORY = :category"; } // no need to filter out excluded categories if a specific one is requested - String c = getExcludeUrisClause( null, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); - if ( !c.isEmpty() ) { - useRetainedTermUris = retainedTermUris != null && !retainedTermUris.isEmpty(); - } - query += c; + excludeUrisClause = getExcludeUrisClause( null, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized ); } else { // all categories are requested, we may filter out excluded ones - String c = getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized, retainedTermUris ); - if ( !c.isEmpty() ) { - useRetainedTermUris = retainedTermUris != null && !retainedTermUris.isEmpty(); + excludeUrisClause = getExcludeUrisClause( excludedCategoryUris, excludedTermUris, excludeFreeTextCategories, excludeFreeTextTerms, excludeUncategorized ); + } + if ( excludeUrisClause != null ) { + query += " and ("; + query += "(" + excludeUrisClause + ")"; + if ( retainedTermUris != null && !retainedTermUris.isEmpty() ) { + query += " or T.VALUE_URI in (:retainedTermUris)"; + useRetainedTermUris = true; } - query += c; + query += ")"; } if ( doAclFiltering ) { query += EE2CAclQueryUtils.formNativeAclRestrictionClause( ( SessionFactoryImplementor ) getSessionFactory(), "T.ACL_IS_AUTHENTICATED_ANONYMOUSLY_MASK" ); @@ -893,17 +901,19 @@ private Characteristic convertRowToCharacteristic( Object[] row ) { } /** - * Produce a SQL clause for excluding URIs and free-text (i.e. null) URIs. + * Produce a SQL clause for excluding various terms and categories. *

* FIXME: There's a bug in Hibernate that that prevents it from producing proper tuples the excluded URIs and * retained term URIs - * @param excludedTermUris list of URIs to exclude - * + * @param excludedCategoryUris list of category URIs to exclude + * @param excludedTermUris list of URIs to exclude * @param excludeFreeTextCategories whether to exclude free-text categories * @param excludeFreeTextTerms whether to exclude free-text terms - * @param retainedTermUris list of terms that should bypass the exclusion + * @param excludeUncategorized whether to exclude uncategorized terms + * @return a SQL clause for excluding terms and categories or null if no clause is necessary */ - private String getExcludeUrisClause( @Nullable Collection excludedCategoryUris, @Nullable Collection excludedTermUris, boolean excludeFreeTextCategories, boolean excludeFreeTextTerms, boolean excludeUncategorized, @Nullable Collection retainedTermUris ) { + @Nullable + private String getExcludeUrisClause( @Nullable Collection excludedCategoryUris, @Nullable Collection excludedTermUris, boolean excludeFreeTextCategories, boolean excludeFreeTextTerms, boolean excludeUncategorized ) { List clauses = new ArrayList<>( 5 ); if ( excludedCategoryUris != null && !excludedCategoryUris.isEmpty() ) { clauses.add( "T.CATEGORY_URI is null or T.CATEGORY_URI not in (:excludedCategoryUris)" ); @@ -922,15 +932,9 @@ private String getExcludeUrisClause( @Nullable Collection excludedCatego clauses.add( "COALESCE(T.CATEGORY_URI, T.CATEGORY) is not null" ); } if ( !clauses.isEmpty() ) { - String query = ""; - query += " and ((" + String.join( ") and (", clauses ) + ")"; - if ( retainedTermUris != null && !retainedTermUris.isEmpty() ) { - query += " or T.VALUE_URI in (:retainedTermUris)"; - } - query += ")"; - return query; + return "(" + String.join( ") and (", clauses ) + ")"; } - return ""; + return null; } @Override From bc8c7c52a71213127dcf8b04327bb83e384db673 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 23 Jul 2024 11:48:28 -0400 Subject: [PATCH 26/99] Add updateEE2Ad, updateGene2Cs and implement -mdate options Fix logic for detecting if both -auto and -mdate are specified. --- .../ubic/gemma/core/apps/UpdateEE2CCli.java | 32 +++++++----- .../ubic/gemma/core/apps/UpdateEe2AdCli.java | 51 +++++++++++++++++++ .../gemma/core/apps/UpdateGene2CsCli.java | 48 +++++++++++++++++ .../ubic/gemma/core/util/AbstractCLI.java | 2 +- 4 files changed, 118 insertions(+), 15 deletions(-) create mode 100644 gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEe2AdCli.java create mode 100644 gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateGene2CsCli.java diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEE2CCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEE2CCli.java index a760688349..f942363bb0 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEE2CCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEE2CCli.java @@ -8,6 +8,7 @@ import ubic.gemma.persistence.service.maintenance.TableMaintenanceUtil; import javax.annotation.Nullable; +import java.util.Date; public class UpdateEE2CCli extends AbstractAuthenticatedCLI { @@ -17,36 +18,39 @@ public class UpdateEE2CCli extends AbstractAuthenticatedCLI { private TableMaintenanceUtil tableMaintenanceUtil; private boolean truncate; + private Date since; + @Nullable @Override - protected void buildOptions( Options options ) { - options.addOption( TRUNCATE_OPTION, "truncate", false, "Truncate the table before updating it" ); + public String getCommandName() { + return "updateEe2c"; } + @Nullable @Override - protected void processOptions( CommandLine commandLine ) throws ParseException { - truncate = commandLine.hasOption( TRUNCATE_OPTION ); + public String getShortDesc() { + return "Update the EXPRESSION_EXPERIMENT2CHARACTERISTIC table"; } @Override - protected void doWork() throws Exception { - tableMaintenanceUtil.updateExpressionExperiment2CharacteristicEntries( null, truncate ); + public GemmaCLI.CommandGroup getCommandGroup() { + return GemmaCLI.CommandGroup.EXPERIMENT; } - @Nullable @Override - public String getCommandName() { - return "updateEe2c"; + protected void buildOptions( Options options ) { + options.addOption( TRUNCATE_OPTION, "truncate", false, "Truncate the table before updating it" ); + addDateOption( options ); } - @Nullable @Override - public String getShortDesc() { - return "Update the EXPRESSION_EXPERIMENT2CHARACTERISTIC table"; + protected void processOptions( CommandLine commandLine ) throws ParseException { + truncate = commandLine.hasOption( TRUNCATE_OPTION ); + since = getLimitingDate(); } @Override - public GemmaCLI.CommandGroup getCommandGroup() { - return GemmaCLI.CommandGroup.EXPERIMENT; + protected void doWork() throws Exception { + tableMaintenanceUtil.updateExpressionExperiment2CharacteristicEntries( since, truncate ); } } diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEe2AdCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEe2AdCli.java new file mode 100644 index 0000000000..21b4484dab --- /dev/null +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateEe2AdCli.java @@ -0,0 +1,51 @@ +package ubic.gemma.core.apps; + +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.springframework.beans.factory.annotation.Autowired; +import ubic.gemma.core.util.AbstractAuthenticatedCLI; +import ubic.gemma.persistence.service.maintenance.TableMaintenanceUtil; + +import javax.annotation.Nullable; +import java.util.Date; + +public class UpdateEe2AdCli extends AbstractAuthenticatedCLI { + + @Autowired + private TableMaintenanceUtil tableMaintenanceUtil; + + private Date since; + + @Nullable + @Override + public String getCommandName() { + return "updateEe2Ad"; + } + + @Nullable + @Override + public String getShortDesc() { + return "Update the EXPRESSION_EXPERIMENT2ARRAY_DESIGN table"; + } + + @Override + public GemmaCLI.CommandGroup getCommandGroup() { + return GemmaCLI.CommandGroup.EXPERIMENT; + } + + @Override + protected void buildOptions( Options options ) { + addDateOption( options ); + } + + @Override + protected void processOptions( CommandLine commandLine ) throws ParseException { + since = getLimitingDate(); + } + + @Override + protected void doWork() throws Exception { + tableMaintenanceUtil.updateExpressionExperiment2ArrayDesignEntries( since ); + } +} diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateGene2CsCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateGene2CsCli.java new file mode 100644 index 0000000000..da8c995576 --- /dev/null +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/UpdateGene2CsCli.java @@ -0,0 +1,48 @@ +package ubic.gemma.core.apps; + +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.springframework.beans.factory.annotation.Autowired; +import ubic.gemma.core.util.AbstractAuthenticatedCLI; +import ubic.gemma.persistence.service.maintenance.TableMaintenanceUtil; + +import javax.annotation.Nullable; + +public class UpdateGene2CsCli extends AbstractAuthenticatedCLI { + + @Autowired + private TableMaintenanceUtil tableMaintenanceUtil; + + @Nullable + @Override + public String getCommandName() { + return "updateGene2Cs"; + } + + @Nullable + @Override + public String getShortDesc() { + return "Update the GENE2CS table"; + } + + @Override + public GemmaCLI.CommandGroup getCommandGroup() { + return GemmaCLI.CommandGroup.MISC; + } + + @Override + protected void buildOptions( Options options ) { + + } + + @Override + protected void processOptions( CommandLine commandLine ) throws ParseException { + + } + + @Override + protected void doWork() throws Exception { + tableMaintenanceUtil.updateGene2CsEntries(); + } +} diff --git a/gemma-cli/src/main/java/ubic/gemma/core/util/AbstractCLI.java b/gemma-cli/src/main/java/ubic/gemma/core/util/AbstractCLI.java index 86995df8cd..df822e7165 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/util/AbstractCLI.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/util/AbstractCLI.java @@ -365,7 +365,7 @@ protected void buildStandardOptions( Options options ) { * purposes. */ protected void processStandardOptions( CommandLine commandLine ) throws ParseException { - if ( commandLine.hasOption( DATE_OPTION ) ^ commandLine.hasOption( AbstractCLI.AUTO_OPTION_NAME ) ) { + if ( commandLine.hasOption( DATE_OPTION ) && commandLine.hasOption( AbstractCLI.AUTO_OPTION_NAME ) ) { throw new IllegalArgumentException( String.format( "Please only select one of -%s or -%s", DATE_OPTION, AUTO_OPTION_NAME ) ); } From 411934ef3ffa918de7807a88db10569c3df69c4b Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Tue, 23 Jul 2024 11:06:53 -0700 Subject: [PATCH 27/99] enable back-filling of the bioAssay.originalPlatform This is set up as a kind of temporary; once we are done backfilling it shouldn't be needed --- .../expression/geo/GeoConverterImpl.java | 22 +++++++-------- .../geo/service/GeoServiceImpl.java | 28 +++++++++++++++---- .../geo/service/GeoDatasetServiceTest.java | 5 ++++ 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java index 8eb19af46d..2f3b16bb76 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/GeoConverterImpl.java @@ -1688,20 +1688,20 @@ private BioAssay convertSample( GeoSample sample, BioMaterial bioMaterial, Exper // Taxon lastTaxon = null; - if ( !this.skipDataVectors ) { - for ( GeoPlatform platform : sample.getPlatforms() ) { - ArrayDesign arrayDesign; - if ( seenPlatforms.containsKey( platform.getGeoAccession() ) ) { - arrayDesign = seenPlatforms.get( platform.getGeoAccession() ); - } else { - // platform not exist yet - arrayDesign = this.convertPlatform( platform ); - } + // if ( !this.skipDataVectors ) { // this is commented out to allow updating of the originalPlatform via GeoService. + for ( GeoPlatform platform : sample.getPlatforms() ) { + ArrayDesign arrayDesign; + if ( seenPlatforms.containsKey( platform.getGeoAccession() ) ) { + arrayDesign = seenPlatforms.get( platform.getGeoAccession() ); + } else { + // platform not exist yet + arrayDesign = this.convertPlatform( platform ); + } - bioAssay.setArrayDesignUsed( arrayDesign ); + bioAssay.setArrayDesignUsed( arrayDesign ); - } } + // } return bioAssay; } diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java index 740d0c5298..f850812789 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java @@ -327,17 +327,19 @@ public void updateFromGEO( String geoAccession ) { ExpressionExperiment freshFromGEO = result.iterator().next(); // make map of characteristics by GSM ID for biassays - Map> characteristicsByGSM = new HashMap<>(); + Map freshBAsByGSM = new HashMap<>(); for ( BioAssay ba : freshFromGEO.getBioAssays() ) { String acc = ba.getAccession().getAccession(); - characteristicsByGSM.put( acc, ba.getSampleUsed().getCharacteristics() ); + freshBAsByGSM + .put( acc, ba ); } BibliographicReference primaryPublication = freshFromGEO.getPrimaryPublication(); // update the experiment in Gemma: // 1) publication - // 2) BioMaterial Characteristics + // 2) BioMaterial Characteristics (mostly for backporting) + // 3) Original platform (this is for backporting, and may be removed in the future) for ( ExpressionExperiment ee : ees ) { // because it could be a split int numNewCharacteristics = 0; boolean pubUpdate = false; @@ -355,8 +357,22 @@ public void updateFromGEO( String geoAccession ) { BioMaterial bm = ba.getSampleUsed(); String gsmID = ba.getAccession().getAccession(); - if ( !characteristicsByGSM.containsKey( gsmID ) ) { // sanity check ... + if ( !freshBAsByGSM.containsKey( gsmID ) ) { // sanity check ... log.warn( "GEO didn't have " + gsmID + " associated with " + ee ); + continue; + } + + // fill in the original paltform, if we need to. + ArrayDesign arrayDesignUsed = freshBAsByGSM.get( gsmID ).getArrayDesignUsed(); + if ( ba.getOriginalPlatform() == null ) { + ArrayDesign ad = arrayDesignService.findByShortName( arrayDesignUsed.getShortName() ); + if ( ad != null ) { + log.info( "Updating original platform for " + gsmID + " in " + ee.getShortName() + " = " + arrayDesignUsed ); + ba.setOriginalPlatform( ad ); + bioAssayService.update( ba ); + } else { + log.warn( "Could not update original platform for " + gsmID + " in " + ee.getShortName() + ", it was not in the system: " + arrayDesignUsed ); + } } /* @@ -366,7 +382,7 @@ public void updateFromGEO( String geoAccession ) { int numOldChars = bmchars.size(); bmchars.clear(); characteristicService.remove( bmchars ); - Collection freshCharacteristics = characteristicsByGSM.get( gsmID ); + Collection freshCharacteristics = freshBAsByGSM.get( gsmID ).getSampleUsed().getCharacteristics(); if ( log.isDebugEnabled() ) log.debug( "Found " + freshCharacteristics.size() + " characteristics for " + gsmID + " replacing " + numOldChars + " old ones ..." ); bmchars.addAll( freshCharacteristics ); @@ -386,7 +402,7 @@ public void updateFromGEO( String geoAccession ) { @Override @Transactional - public Collection loadFromSoftFile( String accession, String softFile, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform ) { + public Collection loadFromSoftFile( String accession, String softFile, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform ) { File f = new File( softFile ); this.setGeoDomainObjectGenerator( new GeoDomainObjectGeneratorLocal( f.getParent() ) ); diff --git a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoDatasetServiceTest.java b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoDatasetServiceTest.java index 3d27fa873d..d813f3fcf8 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoDatasetServiceTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoDatasetServiceTest.java @@ -369,7 +369,11 @@ public void testLoadGSE30521ExonArray() { // Test the update mechanism ee.setPrimaryPublication( null ); + for ( BioAssay ba : ee.getBioAssays() ) { + ba.setOriginalPlatform( null ); + } eeService.update( ee ); + geoService.updateFromGEO( "GSE30521" ); ee = eeService.load( ee.getId() ); assertNotNull( ee ); @@ -381,6 +385,7 @@ public void testLoadGSE30521ExonArray() { for ( Characteristic c : ba.getSampleUsed().getCharacteristics() ) { assertNotNull( c.getCategory() ); } + assertNotNull( ba.getOriginalPlatform() ); } } From 3463878deb787da72095fe90b981eb0f844b4f08 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 09:59:35 -0400 Subject: [PATCH 28/99] Fix NPE when comparing a persistent and a transient vector --- .../model/expression/bioAssayData/RawExpressionDataVector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.java b/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.java index 36a0d5f925..7ac9d8aff4 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.java @@ -47,7 +47,7 @@ public boolean equals( Object object ) { return false; } final RawExpressionDataVector that = ( RawExpressionDataVector ) object; - if ( this.getId() != null || that.getId() != null ) { + if ( this.getId() != null && that.getId() != null ) { return getId().equals( that.getId() ); } return Objects.equals( getExpressionExperiment(), that.getExpressionExperiment() ) From ae091431ddeedf38f1c259cf8bb94cd17212a11c Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 10:27:17 -0400 Subject: [PATCH 29/99] Relocate default @Securable annotations into more specific interfaces Introduce Gemma-specific interfaces equivalents of gsec's such that they can derive from Identifiable. --- .../CharacteristicUpdateTaskImpl.java | 2 +- .../gemma/model/analysis/Investigation.java | 2 +- .../analysis/SingleExperimentAnalysis.java | 4 +- .../expression/ExpressionExperimentSet.java | 2 +- .../diff/ExpressionAnalysisResultSet.java | 4 +- ...eneDifferentialExpressionMetaAnalysis.java | 2 +- ...ressionMetaAnalysisSummaryValueObject.java | 2 +- .../phenotype/PhenotypeAssociation.java | 3 +- .../common/auditAndSecurity/Auditable.java | 8 +- .../common/auditAndSecurity/JobInfo.java | 1 - .../common/auditAndSecurity/Securable.java | 7 + .../common/auditAndSecurity/SecuredChild.java | 7 + .../auditAndSecurity/SecuredNotChild.java | 4 + .../common/auditAndSecurity/UserQuery.java | 4 +- .../gemma/model/common/protocol/Protocol.java | 2 +- .../expression/arrayDesign/ArrayDesign.java | 3 +- .../model/expression/bioAssay/BioAssay.java | 5 +- .../bioAssayData/MeanVarianceRelation.java | 6 +- .../expression/biomaterial/BioMaterial.java | 5 +- .../experiment/ExperimentalDesign.java | 5 +- .../experiment/ExperimentalFactor.java | 4 +- .../experiment/ExpressionExperiment.java | 2 +- .../ExpressionExperimentSetValueObject.java | 2 +- .../ExpressionExperimentSubSet.java | 4 +- ...ExpressionExperimentSubsetValueObject.java | 2 +- .../ExpressionExperimentValueObject.java | 2 +- .../expression/experiment/FactorValue.java | 2 +- .../ubic/gemma/model/genome/gene/GeneSet.java | 2 +- .../model/genome/gene/GeneSetValueObject.java | 2 +- .../curation/CuratableService.java | 149 ------------------ .../SecurableBaseService.java | 101 ++++++++++++ .../SecurableFilteringVoEnabledService.java | 67 ++++++++ .../arrayDesign/ArrayDesignService.java | 6 +- .../arrayDesign/ArrayDesignServiceImpl.java | 2 +- .../ExpressionExperimentService.java | 8 +- .../persistence/util/AclCriteriaUtils.java | 4 +- .../gemma/persistence/util/AclQueryUtils.java | 4 +- .../persistence/util/EE2CAclQueryUtils.java | 2 +- .../acl/AclAuthorizationTest.java | 2 +- .../authorization/acl/AclTestUtils.java | 4 +- .../src/test/resources/log4j-test.properties | 2 + .../auditAndSecurity/SecurityController.java | 2 +- .../SecurityControllerImpl.java | 2 +- .../SecurityInfoValueObject.java | 2 +- 44 files changed, 252 insertions(+), 205 deletions(-) create mode 100644 gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Securable.java create mode 100644 gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredChild.java create mode 100644 gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredNotChild.java delete mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/CuratableService.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java diff --git a/gemma-core/src/main/java/ubic/gemma/core/tasks/maintenance/CharacteristicUpdateTaskImpl.java b/gemma-core/src/main/java/ubic/gemma/core/tasks/maintenance/CharacteristicUpdateTaskImpl.java index cf48a204e1..eac5a4be70 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/tasks/maintenance/CharacteristicUpdateTaskImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/tasks/maintenance/CharacteristicUpdateTaskImpl.java @@ -15,7 +15,7 @@ package ubic.gemma.core.tasks.maintenance; import gemma.gsec.SecurityService; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.StopWatch; import org.apache.commons.logging.Log; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/Investigation.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/Investigation.java index 94c312b67d..f1916ff14a 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/Investigation.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/Investigation.java @@ -19,7 +19,7 @@ package ubic.gemma.model.analysis; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import ubic.gemma.model.common.auditAndSecurity.AbstractAuditable; import ubic.gemma.model.common.auditAndSecurity.Contact; import ubic.gemma.model.common.description.BibliographicReference; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/SingleExperimentAnalysis.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/SingleExperimentAnalysis.java index 039be4e5f0..ff6ea25d96 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/SingleExperimentAnalysis.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/SingleExperimentAnalysis.java @@ -19,8 +19,8 @@ package ubic.gemma.model.analysis; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.analysis.expression.ExpressionAnalysis; import ubic.gemma.model.expression.experiment.BioAssaySet; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.java index d19bf6b4de..cc42bb14b2 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.java @@ -19,7 +19,7 @@ package ubic.gemma.model.analysis.expression; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Indexed; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java index 8f0227a35a..6a6b0558d8 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java @@ -19,8 +19,8 @@ package ubic.gemma.model.analysis.expression.diff; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.analysis.expression.FactorAssociatedAnalysisResultSet; import ubic.gemma.model.association.BioSequence2GeneProduct; import ubic.gemma.model.expression.designElement.CompositeSequence; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysis.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysis.java index 9c4537d055..9774079be7 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysis.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysis.java @@ -18,7 +18,7 @@ */ package ubic.gemma.model.analysis.expression.diff; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import ubic.gemma.model.analysis.expression.ExpressionAnalysis; import java.util.Collection; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisSummaryValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisSummaryValueObject.java index 2101d5bf93..428d9a7c41 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisSummaryValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisSummaryValueObject.java @@ -19,7 +19,7 @@ package ubic.gemma.model.analysis.expression.diff; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import gemma.gsec.model.SecureValueObject; import ubic.gemma.model.genome.gene.phenotype.valueObject.DiffExpressionEvidenceValueObject; diff --git a/gemma-core/src/main/java/ubic/gemma/model/association/phenotype/PhenotypeAssociation.java b/gemma-core/src/main/java/ubic/gemma/model/association/phenotype/PhenotypeAssociation.java index 3688af8991..5bb51d54b2 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/association/phenotype/PhenotypeAssociation.java +++ b/gemma-core/src/main/java/ubic/gemma/model/association/phenotype/PhenotypeAssociation.java @@ -20,6 +20,7 @@ import ubic.gemma.model.association.GOEvidenceCode; import ubic.gemma.model.common.auditAndSecurity.AbstractAuditable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.common.description.DatabaseEntry; import ubic.gemma.model.common.quantitationtype.QuantitationType; @@ -35,7 +36,7 @@ * @author Paul */ @Deprecated -public abstract class PhenotypeAssociation extends AbstractAuditable implements gemma.gsec.model.Securable { +public abstract class PhenotypeAssociation extends AbstractAuditable implements Securable { /** * The serial version UID of this class. Needed for serialization. diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Auditable.java b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Auditable.java index 061e1b53e4..c8c67f5f8c 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Auditable.java +++ b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Auditable.java @@ -1,7 +1,5 @@ package ubic.gemma.model.common.auditAndSecurity; -import gemma.gsec.model.Securable; -import ubic.gemma.model.common.Identifiable; /** * Created by tesarst on 07/03/17. @@ -9,9 +7,9 @@ * Interface that covers objects that are Auditable. * When creating new Auditable entity, new AuditTrail is automatically created in {@link ubic.gemma.persistence.persister.PersisterHelper} */ -public interface Auditable extends Identifiable, Securable { +public interface Auditable extends Securable { - ubic.gemma.model.common.auditAndSecurity.AuditTrail getAuditTrail(); + AuditTrail getAuditTrail(); - void setAuditTrail( ubic.gemma.model.common.auditAndSecurity.AuditTrail auditTrail ); + void setAuditTrail( AuditTrail auditTrail ); } diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/JobInfo.java b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/JobInfo.java index 999e6cbd89..d7a9fe1c5e 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/JobInfo.java +++ b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/JobInfo.java @@ -19,7 +19,6 @@ package ubic.gemma.model.common.auditAndSecurity; -import gemma.gsec.model.SecuredNotChild; import ubic.gemma.model.common.Identifiable; import java.io.Serializable; diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Securable.java b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Securable.java new file mode 100644 index 0000000000..8713b927a8 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/Securable.java @@ -0,0 +1,7 @@ +package ubic.gemma.model.common.auditAndSecurity; + +import ubic.gemma.model.common.Identifiable; + +public interface Securable extends Identifiable, gemma.gsec.model.Securable { + +} diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredChild.java b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredChild.java new file mode 100644 index 0000000000..ba352acf53 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredChild.java @@ -0,0 +1,7 @@ +package ubic.gemma.model.common.auditAndSecurity; + +public interface SecuredChild extends Securable, gemma.gsec.model.SecuredChild { + + @Override + Securable getSecurityOwner(); +} diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredNotChild.java b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredNotChild.java new file mode 100644 index 0000000000..e4fb5883af --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/SecuredNotChild.java @@ -0,0 +1,4 @@ +package ubic.gemma.model.common.auditAndSecurity; + +public interface SecuredNotChild extends Securable, gemma.gsec.model.SecuredNotChild { +} diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/UserQuery.java b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/UserQuery.java index 977ac098d6..085cd75853 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/UserQuery.java +++ b/gemma-core/src/main/java/ubic/gemma/model/common/auditAndSecurity/UserQuery.java @@ -21,7 +21,9 @@ import ubic.gemma.model.common.search.SearchSettings; -public class UserQuery implements java.io.Serializable, gemma.gsec.model.SecuredNotChild { +import java.io.Serializable; + +public class UserQuery implements Serializable, SecuredNotChild { private static final long serialVersionUID = -2790140985613402440L; private String url; diff --git a/gemma-core/src/main/java/ubic/gemma/model/common/protocol/Protocol.java b/gemma-core/src/main/java/ubic/gemma/model/common/protocol/Protocol.java index 781665b209..e3561f7fca 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/common/protocol/Protocol.java +++ b/gemma-core/src/main/java/ubic/gemma/model/common/protocol/Protocol.java @@ -18,7 +18,7 @@ */ package ubic.gemma.model.common.protocol; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import ubic.gemma.model.common.AbstractDescribable; import java.io.Serializable; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/arrayDesign/ArrayDesign.java b/gemma-core/src/main/java/ubic/gemma/model/expression/arrayDesign/ArrayDesign.java index 389087587c..70ebc77d2a 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/arrayDesign/ArrayDesign.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/arrayDesign/ArrayDesign.java @@ -22,6 +22,7 @@ import org.hibernate.search.annotations.*; import ubic.gemma.model.common.auditAndSecurity.AbstractAuditable; import ubic.gemma.model.common.auditAndSecurity.Contact; +import ubic.gemma.model.common.auditAndSecurity.SecuredNotChild; import ubic.gemma.model.common.auditAndSecurity.curation.Curatable; import ubic.gemma.model.common.auditAndSecurity.curation.CurationDetails; import ubic.gemma.model.common.description.DatabaseEntry; @@ -37,7 +38,7 @@ * @author Paul */ @Indexed -public class ArrayDesign extends AbstractAuditable implements gemma.gsec.model.SecuredNotChild, Curatable { +public class ArrayDesign extends AbstractAuditable implements Curatable, SecuredNotChild { public static final class Factory { diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssay/BioAssay.java b/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssay/BioAssay.java index 57e35b2e85..5c7315aaa3 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssay/BioAssay.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssay/BioAssay.java @@ -18,9 +18,10 @@ */ package ubic.gemma.model.expression.bioAssay; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import org.hibernate.search.annotations.*; import ubic.gemma.model.common.AbstractDescribable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.common.description.DatabaseEntry; import ubic.gemma.model.expression.arrayDesign.ArrayDesign; import ubic.gemma.model.expression.biomaterial.BioMaterial; @@ -36,7 +37,7 @@ * slots that are used specifically to support sequence-based data, but is intended to be generic. */ @Indexed -public class BioAssay extends AbstractDescribable implements gemma.gsec.model.SecuredChild, Serializable { +public class BioAssay extends AbstractDescribable implements SecuredChild, Serializable { private static final long serialVersionUID = -7868768731812964045L; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.java b/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.java index 3521f7c576..55c5cabbcc 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.java @@ -19,15 +19,17 @@ package ubic.gemma.model.expression.bioAssayData; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.expression.experiment.ExpressionExperiment; import javax.persistence.Transient; +import java.io.Serializable; /** * @author Patrick */ -public class MeanVarianceRelation implements java.io.Serializable, gemma.gsec.model.SecuredChild { +public class MeanVarianceRelation implements SecuredChild, Serializable { /** * The serial version UID of this class. Needed for serialization. diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/biomaterial/BioMaterial.java b/gemma-core/src/main/java/ubic/gemma/model/expression/biomaterial/BioMaterial.java index 6a7c11585e..aa8ae53686 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/biomaterial/BioMaterial.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/biomaterial/BioMaterial.java @@ -19,9 +19,10 @@ package ubic.gemma.model.expression.biomaterial; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import org.hibernate.search.annotations.*; import ubic.gemma.model.common.AbstractDescribable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.common.description.Characteristic; import ubic.gemma.model.common.description.DatabaseEntry; import ubic.gemma.model.expression.bioAssay.BioAssay; @@ -40,7 +41,7 @@ * the experimental procedures and we just lump all of the BioMaterial into one class. */ @Indexed -public class BioMaterial extends AbstractDescribable implements gemma.gsec.model.SecuredChild, Serializable { +public class BioMaterial extends AbstractDescribable implements SecuredChild, Serializable { private static final long serialVersionUID = 4374359557498220256L; private ubic.gemma.model.genome.Taxon sourceTaxon; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalDesign.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalDesign.java index f4e4457038..f61fe99fb4 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalDesign.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalDesign.java @@ -18,9 +18,10 @@ */ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import org.hibernate.search.annotations.*; import ubic.gemma.model.common.AbstractDescribable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.common.description.Characteristic; import javax.persistence.Transient; @@ -28,7 +29,7 @@ import java.util.Set; @Indexed -public class ExperimentalDesign extends AbstractDescribable implements gemma.gsec.model.SecuredChild, Serializable { +public class ExperimentalDesign extends AbstractDescribable implements SecuredChild, Serializable { private static final long serialVersionUID = 1734101852541885497L; private String replicateDescription; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactor.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactor.java index c432371e0b..c402336d81 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactor.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactor.java @@ -19,8 +19,8 @@ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import org.hibernate.search.annotations.*; import ubic.gemma.model.common.AbstractDescribable; import ubic.gemma.model.common.description.Characteristic; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperiment.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperiment.java index d20654d471..086eaf1ddb 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperiment.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperiment.java @@ -14,10 +14,10 @@ */ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.SecuredNotChild; import lombok.extern.apachecommons.CommonsLog; import org.hibernate.proxy.HibernateProxyHelper; import org.hibernate.search.annotations.*; +import ubic.gemma.model.common.auditAndSecurity.SecuredNotChild; import ubic.gemma.model.common.auditAndSecurity.curation.Curatable; import ubic.gemma.model.common.auditAndSecurity.curation.CurationDetails; import ubic.gemma.model.common.description.BibliographicReference; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSetValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSetValueObject.java index 97e5993fbb..0891aec54b 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSetValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSetValueObject.java @@ -18,7 +18,7 @@ */ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import gemma.gsec.model.SecureValueObject; import ubic.gemma.model.common.IdentifiableValueObject; import ubic.gemma.model.analysis.expression.ExpressionExperimentSet; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubSet.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubSet.java index 2a52965088..766b26f3e0 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubSet.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubSet.java @@ -18,8 +18,8 @@ */ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import ubic.gemma.model.expression.bioAssay.BioAssay; import javax.persistence.Transient; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubsetValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubsetValueObject.java index d12e3bb4e0..18e041049d 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubsetValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentSubsetValueObject.java @@ -1,6 +1,6 @@ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; public class ExpressionExperimentSubsetValueObject extends ExpressionExperimentValueObject { diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentValueObject.java index f0573ce212..33adf27740 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExpressionExperimentValueObject.java @@ -5,7 +5,7 @@ import gemma.gsec.acl.domain.AclObjectIdentity; import gemma.gsec.acl.domain.AclPrincipalSid; import gemma.gsec.acl.domain.AclSid; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import gemma.gsec.model.SecureValueObject; import gemma.gsec.util.SecurityUtil; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java index 1826484e49..64b0deb75f 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValue.java @@ -18,7 +18,7 @@ */ package ubic.gemma.model.expression.experiment; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.IndexedEmbedded; diff --git a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSet.java b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSet.java index 3460677e87..ec557fb8ce 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSet.java +++ b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSet.java @@ -19,7 +19,7 @@ package ubic.gemma.model.genome.gene; -import gemma.gsec.model.SecuredNotChild; +import ubic.gemma.model.common.auditAndSecurity.SecuredNotChild; import org.hibernate.search.annotations.*; import ubic.gemma.model.common.auditAndSecurity.AbstractAuditable; import ubic.gemma.model.common.description.BibliographicReference; diff --git a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSetValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSetValueObject.java index 368e6d8b75..5ad336598a 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSetValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneSetValueObject.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import gemma.gsec.model.SecureValueObject; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/CuratableService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/CuratableService.java deleted file mode 100644 index f6961a0dca..0000000000 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/CuratableService.java +++ /dev/null @@ -1,149 +0,0 @@ -package ubic.gemma.persistence.service.auditAndSecurity.curation; - -import org.springframework.security.access.annotation.Secured; -import ubic.gemma.model.common.auditAndSecurity.curation.AbstractCuratableValueObject; -import ubic.gemma.model.common.auditAndSecurity.curation.Curatable; -import ubic.gemma.persistence.service.BaseService; -import ubic.gemma.persistence.service.FilteringVoEnabledService; -import ubic.gemma.persistence.util.Filters; -import ubic.gemma.persistence.util.Slice; -import ubic.gemma.persistence.util.Sort; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.Collection; -import java.util.List; -import java.util.function.Function; -import java.util.function.Supplier; - -/** - * Interface for curatable services. - *

- * For now, this mainly adds {@link Secured} annotations to safeguard methods inherited from {@link BaseService}. - * @author poirigui - */ -public interface CuratableService> extends BaseService, FilteringVoEnabledService { - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) - C find( C curatable ); - - @Override - @Secured({ "GROUP_USER", "AFTER_ACL_READ" }) - C findOrCreate( C curatable ); - - @Override - @Secured({ "GROUP_USER" }) - Collection create( Collection entities ); - - @Override - @Secured({ "GROUP_USER" }) - C create( C curatable ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) - Collection load( Collection ids ); - - @Override - @Nullable - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) - C load( Long id ); - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id ) throws NullPointerException; - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id, Supplier exceptionSupplier ) throws T; - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id, Function exceptionSupplier ) throws T; - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id, Function exceptionSupplier, String message ) throws T; - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) - Collection loadAll(); - - // The methods below using Filters do not require AFTER_ACL_COLLECTION_READ because the ACL filtering is performed - // in the query itself. - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - List loadIds( @Nullable Filters filters, @Nullable Sort sort ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - List load( @Nullable Filters filters, @Nullable Sort sort ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - Slice load( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - List loadValueObjects( @Nullable Filters filters, @Nullable Sort sort ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - Slice loadValueObjects( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); - - @Override - @Nullable - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) - VO loadValueObject( C entity ); - - @Override - @Nullable - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) - VO loadValueObjectById( Long entityId ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) - List loadValueObjects( Collection entities ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) - List loadValueObjectsByIds( Collection ids ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) - List loadAllValueObjects(); - - @Override - @Secured({ "GROUP_USER", "ACL_SECURABLE_COLLECTION_EDIT_IGNORE_TRANSIENT" }) - Collection save( Collection entities ); - - @Override - @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT_IGNORE_TRANSIENT" }) - C save( C entity ); - - @Override - @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) - void update( C entity ); - - @Override - @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) - void update( Collection entities ); - - /** - * {@inheritDoc} - *

- * Only administrator are allowed to remove entity by ID. - */ - @Override - @Secured({ "GROUP_ADMIN" }) - void remove( Long id ); - - @Override - @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) - void remove( C expressionExperiment ); -} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java new file mode 100644 index 0000000000..59c760461e --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java @@ -0,0 +1,101 @@ +package ubic.gemma.persistence.service.common.auditAndSecurity; + +import org.springframework.security.access.annotation.Secured; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.persistence.service.BaseService; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.Collection; +import java.util.function.Function; +import java.util.function.Supplier; + +/** + * A base service for securable entities. + *

+ * This interface provides sensible default {@link Secured} annotations for all methods defined and inherited from + * {@link BaseService}. + * @author poirigui + * @see gemma.gsec.model.Securable + * @see BaseService + */ +public interface SecurableBaseService extends BaseService { + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) + C find( C entity ); + + @Override + @Secured({ "GROUP_USER", "AFTER_ACL_READ" }) + C findOrCreate( C entity ); + + @Override + @Secured({ "GROUP_USER" }) + Collection create( Collection entities ); + + @Override + @Secured({ "GROUP_USER" }) + C create( C entity ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) + Collection load( Collection ids ); + + @Override + @Nullable + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) + C load( Long id ); + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id ) throws NullPointerException; + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id, Supplier exceptionSupplier ) throws T; + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id, Function exceptionSupplier ) throws T; + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id, Function exceptionSupplier, String message ) throws T; + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) + Collection loadAll(); + + @Override + @Secured({ "GROUP_USER", "ACL_SECURABLE_COLLECTION_EDIT_IGNORE_TRANSIENT" }) + Collection save( Collection entities ); + + @Override + @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT_IGNORE_TRANSIENT" }) + C save( C entity ); + + @Override + @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) + void update( C entity ); + + @Override + @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) + void update( Collection entities ); + + /** + * {@inheritDoc} + *

+ * Only administrator are allowed to remove entity by ID. + */ + @Override + @Secured({ "GROUP_ADMIN" }) + void remove( Long id ); + + @Override + @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) + void remove( C entity ); +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java new file mode 100644 index 0000000000..44f1a78876 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java @@ -0,0 +1,67 @@ +package ubic.gemma.persistence.service.common.auditAndSecurity; + +import org.springframework.security.access.annotation.Secured; +import ubic.gemma.model.common.IdentifiableValueObject; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.persistence.service.FilteringVoEnabledService; +import ubic.gemma.persistence.util.Filters; +import ubic.gemma.persistence.util.Slice; +import ubic.gemma.persistence.util.Sort; + +import javax.annotation.Nullable; +import java.util.Collection; +import java.util.List; + +/** + * A base service for securable entities with filtering and VO capabilities. + * @author poirigui + * @see gemma.gsec.model.Securable + * @see FilteringVoEnabledService + */ +public interface SecurableFilteringVoEnabledService> extends FilteringVoEnabledService { + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + List loadValueObjects( @Nullable Filters filters, @Nullable Sort sort ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + Slice loadValueObjects( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); + + @Override + @Nullable + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) + VO loadValueObject( C entity ); + + @Override + @Nullable + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) + VO loadValueObjectById( Long entityId ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) + List loadValueObjects( Collection entities ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) + List loadValueObjectsByIds( Collection ids ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) + List loadAllValueObjects(); + + // The methods below using Filters do not require AFTER_ACL_COLLECTION_READ because the ACL filtering is performed + // in the query itself. + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + List loadIds( @Nullable Filters filters, @Nullable Sort sort ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + List load( @Nullable Filters filters, @Nullable Sort sort ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + Slice load( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignService.java index c4b9a57b9b..c0a0a1eff0 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignService.java @@ -28,7 +28,8 @@ import ubic.gemma.model.genome.Taxon; import ubic.gemma.model.genome.biosequence.BioSequence; import ubic.gemma.model.genome.sequenceAnalysis.BlatResult; -import ubic.gemma.persistence.service.auditAndSecurity.curation.CuratableService; +import ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseService; +import ubic.gemma.persistence.service.common.auditAndSecurity.SecurableFilteringVoEnabledService; import ubic.gemma.persistence.util.Filters; import ubic.gemma.persistence.util.Slice; import ubic.gemma.persistence.util.Sort; @@ -41,7 +42,8 @@ import java.util.function.Function; @SuppressWarnings("unused") // Possible external use -public interface ArrayDesignService extends CuratableService { +public interface ArrayDesignService extends SecurableBaseService, + SecurableFilteringVoEnabledService { /** * Load a platform by ID and thaw it with {@link #thawLite(ArrayDesign)} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignServiceImpl.java index 752d9cbf74..51f62589e9 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignServiceImpl.java @@ -28,8 +28,8 @@ import ubic.gemma.model.genome.biosequence.BioSequence; import ubic.gemma.model.genome.sequenceAnalysis.BlatResult; import ubic.gemma.persistence.service.AbstractFilteringVoEnabledService; -import ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventDao; import ubic.gemma.persistence.service.blacklist.BlacklistedEntityService; +import ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventDao; import ubic.gemma.persistence.util.Filters; import ubic.gemma.persistence.util.Slice; import ubic.gemma.persistence.util.Sort; diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentService.java index ee4ea37e9b..a69600ff4b 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentService.java @@ -21,7 +21,6 @@ import lombok.Value; import org.springframework.security.access.annotation.Secured; import ubic.basecode.ontology.model.OntologyTerm; -import ubic.gemma.core.analysis.preprocess.batcheffects.BatchEffectDetails; import ubic.gemma.core.search.SearchException; import ubic.gemma.model.common.auditAndSecurity.AuditEvent; import ubic.gemma.model.common.description.AnnotationValueObject; @@ -41,7 +40,8 @@ import ubic.gemma.model.expression.experiment.*; import ubic.gemma.model.genome.Gene; import ubic.gemma.model.genome.Taxon; -import ubic.gemma.persistence.service.auditAndSecurity.curation.CuratableService; +import ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseService; +import ubic.gemma.persistence.service.common.auditAndSecurity.SecurableFilteringVoEnabledService; import ubic.gemma.persistence.util.Filters; import ubic.gemma.persistence.util.Slice; import ubic.gemma.persistence.util.Sort; @@ -57,8 +57,8 @@ * @author kelsey */ @SuppressWarnings("unused") // Possible external use -public interface ExpressionExperimentService - extends CuratableService { +public interface ExpressionExperimentService extends SecurableBaseService, + SecurableFilteringVoEnabledService { ExpressionExperiment loadReference( Long id ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/util/AclCriteriaUtils.java b/gemma-core/src/main/java/ubic/gemma/persistence/util/AclCriteriaUtils.java index 2a3f57b75b..1e864b8ede 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/util/AclCriteriaUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/util/AclCriteriaUtils.java @@ -1,8 +1,8 @@ package ubic.gemma.persistence.util; import gemma.gsec.acl.domain.AclObjectIdentity; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import gemma.gsec.util.SecurityUtil; import org.apache.commons.lang3.StringUtils; import org.hibernate.Criteria; diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/util/AclQueryUtils.java b/gemma-core/src/main/java/ubic/gemma/persistence/util/AclQueryUtils.java index 5570368dbb..76e91f8baf 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/util/AclQueryUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/util/AclQueryUtils.java @@ -1,7 +1,7 @@ package ubic.gemma.persistence.util; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import gemma.gsec.util.SecurityUtil; import org.apache.commons.lang3.StringUtils; import org.hibernate.Query; diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/util/EE2CAclQueryUtils.java b/gemma-core/src/main/java/ubic/gemma/persistence/util/EE2CAclQueryUtils.java index a1e6003747..0777bffca7 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/util/EE2CAclQueryUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/util/EE2CAclQueryUtils.java @@ -1,6 +1,6 @@ package ubic.gemma.persistence.util; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import gemma.gsec.util.SecurityUtil; import org.hibernate.Query; import org.hibernate.dialect.function.SQLFunction; diff --git a/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclAuthorizationTest.java b/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclAuthorizationTest.java index bd3d51703a..4b7415f120 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclAuthorizationTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclAuthorizationTest.java @@ -20,7 +20,7 @@ import gemma.gsec.SecurityService; import gemma.gsec.authentication.UserDetailsImpl; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Before; import org.junit.Test; diff --git a/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclTestUtils.java b/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclTestUtils.java index 5ae9660a99..d0f8429951 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclTestUtils.java +++ b/gemma-core/src/test/java/ubic/gemma/core/security/authorization/acl/AclTestUtils.java @@ -2,8 +2,8 @@ import gemma.gsec.acl.domain.AclObjectIdentity; import gemma.gsec.acl.domain.AclService; -import gemma.gsec.model.Securable; -import gemma.gsec.model.SecuredChild; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.model.common.auditAndSecurity.SecuredChild; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/gemma-core/src/test/resources/log4j-test.properties b/gemma-core/src/test/resources/log4j-test.properties index 71e8d2c29e..3c90d06534 100644 --- a/gemma-core/src/test/resources/log4j-test.properties +++ b/gemma-core/src/test/resources/log4j-test.properties @@ -11,6 +11,8 @@ log4j.appender.progressUpdate=ubic.gemma.core.job.progress.ProgressUpdateAppende log4j.rootLogger=WARN,stderr log4j.logger.ubic.gemma=INFO,progressUpdate +log4j.logger.org.hibernate.stat=DEBUG +log4j.logger.org.hibernate.SQL=DEBUG log4j.logger.net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy=ERROR log4j.logger.org.hibernate.cache.ehcache.internal.strategy.AbstractReadWriteEhcacheAccessStrategy=ERROR log4j.logger.com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler=ERROR \ No newline at end of file diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityController.java b/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityController.java index 9dc36f887c..055b644518 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityController.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityController.java @@ -14,7 +14,7 @@ */ package ubic.gemma.web.controller.common.auditAndSecurity; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService; import ubic.gemma.web.remote.EntityDelegator; diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityControllerImpl.java b/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityControllerImpl.java index 564065e248..79f1be8f53 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityControllerImpl.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityControllerImpl.java @@ -21,7 +21,7 @@ import gemma.gsec.AuthorityConstants; import gemma.gsec.SecurityService; import gemma.gsec.authentication.UserDetailsImpl; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import gemma.gsec.util.SecurityUtil; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityInfoValueObject.java b/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityInfoValueObject.java index a497d00164..263ff0f448 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityInfoValueObject.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/common/auditAndSecurity/SecurityInfoValueObject.java @@ -18,7 +18,7 @@ */ package ubic.gemma.web.controller.common.auditAndSecurity; -import gemma.gsec.model.Securable; +import ubic.gemma.model.common.auditAndSecurity.Securable; import java.util.Collection; import java.util.HashSet; From 3394a5b012d52311316db9bad0b8b666fcebd9fc Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 11:04:33 -0400 Subject: [PATCH 30/99] Modify a fresh copy of the auditable when recording an error audit event --- .../AuditTrailServiceImpl.java | 14 +++++- .../curation/AbstractCuratableDao.java | 10 ++-- .../AuditTrailServiceImplTest.java | 50 +++++++++++++++++++ 3 files changed, 68 insertions(+), 6 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java index 674a0ab4dd..cd990e600e 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java @@ -19,6 +19,7 @@ package ubic.gemma.persistence.service.common.auditAndSecurity; import org.apache.commons.lang3.exception.ExceptionUtils; +import org.hibernate.Hibernate; import org.hibernate.SessionFactory; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.metadata.ClassMetadata; @@ -27,10 +28,10 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import ubic.gemma.core.security.authentication.UserManager; -import ubic.gemma.model.common.auditAndSecurity.Auditable; import ubic.gemma.model.common.auditAndSecurity.AuditAction; import ubic.gemma.model.common.auditAndSecurity.AuditEvent; import ubic.gemma.model.common.auditAndSecurity.AuditTrail; +import ubic.gemma.model.common.auditAndSecurity.Auditable; import ubic.gemma.model.common.auditAndSecurity.curation.Curatable; import ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType; import ubic.gemma.persistence.service.AbstractService; @@ -93,6 +94,17 @@ public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note, Throwable throwable ) { + Class entityClass = Hibernate.getClass( auditable ); + Long id = auditable.getId(); + // because of the REQUIRES_NEW, the auditable might originate from a different session, so it would be unsafe to + // modify it + auditable = ( Auditable ) sessionFactory.getCurrentSession().get( entityClass, id ); + if ( auditable == null ) { + log.error( String.format( "Failed to retrieve an auditable entity with class %s and ID %d in order to add an audit event with an exception.\n\tEvent Type: %s%s", + entityClass.getName(), id, type.getName(), note != null ? "\n\tNote: " + note : "" ), throwable ); + + return AuditEvent.Factory.newInstance( new Date(), AuditAction.UPDATE, note, null, userManager.getCurrentUser(), getAuditEventType( type ) ); + } return doAddUpdateEvent( auditable, getAuditEventType( type ), note, ExceptionUtils.getStackTrace( throwable ), null ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java index 8b4a94e742..54e58aa45e 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java @@ -4,6 +4,7 @@ import org.hibernate.SessionFactory; import org.hibernate.metadata.ClassMetadata; import org.hibernate.persister.entity.SingleTableEntityPersister; +import org.springframework.util.Assert; import ubic.gemma.model.common.auditAndSecurity.AuditEvent; import ubic.gemma.model.common.auditAndSecurity.curation.AbstractCuratableValueObject; import ubic.gemma.model.common.auditAndSecurity.curation.Curatable; @@ -44,12 +45,11 @@ protected AbstractCuratableDao( String objectAlias, Class elementClass, Sessi } @Override - public void updateCurationDetailsFromAuditEvent( Curatable curatable, AuditEvent auditEvent ) { - if ( curatable.getId() == null ) { - throw new IllegalArgumentException( "Cannot update curation details for a transient entity." ); - } + public void updateCurationDetailsFromAuditEvent( C curatable, AuditEvent auditEvent ) { + Assert.notNull( curatable.getId(), "Cannot update curation details for a transient entity." ); if ( curatable.getCurationDetails() == null ) { + log.info( curatable + " has no curation details, creating a new one..." ); curatable.setCurationDetails( new CurationDetails() ); } @@ -64,7 +64,7 @@ public void updateCurationDetailsFromAuditEvent( Curatable curatable, AuditEvent eventType.updateCurationDetails( curationDetails, auditEvent ); } - curatable.setCurationDetails( ( CurationDetails ) getSessionFactory().getCurrentSession().merge( curationDetails ) ); + update( curatable ); } protected void addEventsToMap( Map> eventMap, Long id, AuditEvent event ) { diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java index 1653c7d473..45b96afbaa 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java @@ -19,6 +19,7 @@ package ubic.gemma.persistence.service.common.auditAndSecurity; import org.apache.commons.lang3.RandomStringUtils; +import org.assertj.core.api.Assertions; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.junit.After; @@ -262,6 +263,55 @@ public void testAddEventWhenTransactionIsRolledBack2() { assertEquals( size + 1, auditable.getAuditTrail().getEvents().size() ); } + @Test + public final void testAddTroubleEventWhenCurationDetailsAreModified() { + Session session = sessionFactory.openSession(); + try { + TransactionStatus t = pta.getTransaction( new DefaultTransactionDefinition() ); + auditable = arrayDesignService.load( auditable.getId() ); + assertNotNull( auditable ); + auditable.setDescription( "foo" ); + assertFalse( auditable.getCurationDetails().getNeedsAttention() ); + // modify the curation details and audit trail (those must be rolled-back) + auditable.getCurationDetails().setNeedsAttention( true ); + auditTrailService.addUpdateEvent( auditable, "this should be rolled back" ); + auditTrailService.addUpdateEvent( auditable, TroubledStatusFlagEvent.class, "nothing special, just testing", new RuntimeException() ); + pta.rollback( t ); + } finally { + session.close(); + } + auditable = arrayDesignService.load( auditable.getId() ); + assertNotNull( auditable ); + auditable = arrayDesignService.thawLite( auditable ); + assertNull( auditable.getDescription() ); + assertFalse( auditable.getCurationDetails().getNeedsAttention() ); + assertTrue( auditable.getCurationDetails().getTroubled() ); + Assertions.assertThat( auditable.getAuditTrail().getEvents() ) + .extracting( AuditEvent::getNote ) + .doesNotContain( "this should be rolled back" ) + .contains( "nothing special, just testing" ); + } + + @Test + public void testAddTroubleEventOnTransientEntity() { + ArrayDesign auditable; + Session session = sessionFactory.openSession(); + try { + TransactionStatus t = pta.getTransaction( new DefaultTransactionDefinition() ); + auditable = new ArrayDesign(); + auditable.setPrimaryTaxon( getTaxon( "human" ) ); + auditable = arrayDesignService.create( auditable ); + assertNotNull( auditable ); + // now, the AD does not exist yet because the transaction will be suspended + auditTrailService.addUpdateEvent( auditable, TroubledStatusFlagEvent.class, "nothing special, just testing", new RuntimeException() ); + pta.rollback( t ); + } finally { + session.close(); + } + auditable = arrayDesignService.load( auditable.getId() ); + assertNull( auditable ); + } + @Test public void testAddUpdateEventOnTransientEntity() { ArrayDesign ad = new ArrayDesign(); From 417e62f8981bcb39958abe84b5aa79aa03c3f0a5 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 18:42:15 -0400 Subject: [PATCH 31/99] Revert merge -> update for curation details from 3394a5b012d52311316db9bad0b8b666fcebd9fc --- .../common/auditAndSecurity/curation/AbstractCuratableDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java index 54e58aa45e..67e3c6c5bc 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/curation/AbstractCuratableDao.java @@ -64,7 +64,7 @@ public void updateCurationDetailsFromAuditEvent( C curatable, AuditEvent auditEv eventType.updateCurationDetails( curationDetails, auditEvent ); } - update( curatable ); + curatable.setCurationDetails( ( CurationDetails ) getSessionFactory().getCurrentSession().merge( curationDetails ) ); } protected void addEventsToMap( Map> eventMap, Long id, AuditEvent event ) { From d9867c29896fcd6b76d4f982caa640e8bb621cd6 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 18:45:42 -0400 Subject: [PATCH 32/99] Remove debug logging for hibernate in tests --- gemma-core/src/test/resources/log4j-test.properties | 2 -- 1 file changed, 2 deletions(-) diff --git a/gemma-core/src/test/resources/log4j-test.properties b/gemma-core/src/test/resources/log4j-test.properties index 3c90d06534..71e8d2c29e 100644 --- a/gemma-core/src/test/resources/log4j-test.properties +++ b/gemma-core/src/test/resources/log4j-test.properties @@ -11,8 +11,6 @@ log4j.appender.progressUpdate=ubic.gemma.core.job.progress.ProgressUpdateAppende log4j.rootLogger=WARN,stderr log4j.logger.ubic.gemma=INFO,progressUpdate -log4j.logger.org.hibernate.stat=DEBUG -log4j.logger.org.hibernate.SQL=DEBUG log4j.logger.net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy=ERROR log4j.logger.org.hibernate.cache.ehcache.internal.strategy.AbstractReadWriteEhcacheAccessStrategy=ERROR log4j.logger.com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler=ERROR \ No newline at end of file From 5206c1d41646c34d7e62c23ff0cfe975d1d4064b Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 19:09:06 -0400 Subject: [PATCH 33/99] Add missing @Secured annotations for findOrFail() and remove() with a collection Break down interfaces further into an equivalent hierarchy that is used for services. --- .../SecurableBaseImmutableService.java | 41 +++++++++++ .../SecurableBaseReadOnlyService.java | 54 ++++++++++++++ .../SecurableBaseService.java | 70 +------------------ .../SecurableBaseVoEnabledService.java | 36 ++++++++++ .../SecurableFilteringVoEnabledService.java | 45 ++++-------- 5 files changed, 145 insertions(+), 101 deletions(-) create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseReadOnlyService.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseVoEnabledService.java diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java new file mode 100644 index 0000000000..cd0ddc5403 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java @@ -0,0 +1,41 @@ +package ubic.gemma.persistence.service.common.auditAndSecurity; + +import org.springframework.security.access.annotation.Secured; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.persistence.service.BaseImmutableService; + +import java.util.Collection; + +public interface SecurableBaseImmutableService extends BaseImmutableService, + SecurableBaseReadOnlyService { + + @Override + @Secured({ "GROUP_USER", "AFTER_ACL_READ" }) + C findOrCreate( C entity ); + + @Override + @Secured({ "GROUP_USER" }) + Collection create( Collection entities ); + + @Override + @Secured({ "GROUP_USER" }) + C create( C entity ); + + /** + * {@inheritDoc} + *

+ * Only administrator are allowed to remove entity by ID. + */ + @Override + @Secured({ "GROUP_ADMIN" }) + void remove( Long id ); + + @Override + @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) + void remove( C entity ); + + @Override + // FIXME: this does not work with generics + // @Secured({ "GROUP_USER", "ACL_SECURABLE_COLLECTION_EDIT" }) + void remove( Collection entities ); +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseReadOnlyService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseReadOnlyService.java new file mode 100644 index 0000000000..ca83365f0a --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseReadOnlyService.java @@ -0,0 +1,54 @@ +package ubic.gemma.persistence.service.common.auditAndSecurity; + +import org.springframework.security.access.annotation.Secured; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.persistence.service.BaseReadOnlyService; + +import javax.annotation.Nonnull; +import java.util.Collection; +import java.util.function.Function; +import java.util.function.Supplier; + +public interface SecurableBaseReadOnlyService extends BaseReadOnlyService { + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) + C find( C entity ); + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C findOrFail( C entity ) throws NullPointerException; + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) + Collection load( Collection ids ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) + C load( Long id ); + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id ) throws NullPointerException; + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id, Supplier exceptionSupplier ) throws T; + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id, Function exceptionSupplier ) throws T; + + @Nonnull + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) + C loadOrFail( Long id, Function exceptionSupplier, String message ) throws T; + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) + Collection loadAll(); +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java index 59c760461e..6bcee01856 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java @@ -4,11 +4,7 @@ import ubic.gemma.model.common.auditAndSecurity.Securable; import ubic.gemma.persistence.service.BaseService; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Collection; -import java.util.function.Function; -import java.util.function.Supplier; /** * A base service for securable entities. @@ -16,59 +12,10 @@ * This interface provides sensible default {@link Secured} annotations for all methods defined and inherited from * {@link BaseService}. * @author poirigui - * @see gemma.gsec.model.Securable * @see BaseService */ -public interface SecurableBaseService extends BaseService { - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) - C find( C entity ); - - @Override - @Secured({ "GROUP_USER", "AFTER_ACL_READ" }) - C findOrCreate( C entity ); - - @Override - @Secured({ "GROUP_USER" }) - Collection create( Collection entities ); - - @Override - @Secured({ "GROUP_USER" }) - C create( C entity ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) - Collection load( Collection ids ); - - @Override - @Nullable - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ_QUIET" }) - C load( Long id ); - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id ) throws NullPointerException; - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id, Supplier exceptionSupplier ) throws T; - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id, Function exceptionSupplier ) throws T; - - @Nonnull - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_READ" }) - C loadOrFail( Long id, Function exceptionSupplier, String message ) throws T; - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_COLLECTION_READ" }) - Collection loadAll(); +public interface SecurableBaseService extends BaseService, + SecurableBaseImmutableService { @Override @Secured({ "GROUP_USER", "ACL_SECURABLE_COLLECTION_EDIT_IGNORE_TRANSIENT" }) @@ -85,17 +32,4 @@ public interface SecurableBaseService extends BaseService entities ); - - /** - * {@inheritDoc} - *

- * Only administrator are allowed to remove entity by ID. - */ - @Override - @Secured({ "GROUP_ADMIN" }) - void remove( Long id ); - - @Override - @Secured({ "GROUP_USER", "ACL_SECURABLE_EDIT" }) - void remove( C entity ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseVoEnabledService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseVoEnabledService.java new file mode 100644 index 0000000000..c19c2af397 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseVoEnabledService.java @@ -0,0 +1,36 @@ +package ubic.gemma.persistence.service.common.auditAndSecurity; + +import org.springframework.security.access.annotation.Secured; +import ubic.gemma.model.common.IdentifiableValueObject; +import ubic.gemma.model.common.auditAndSecurity.Securable; +import ubic.gemma.persistence.service.BaseVoEnabledService; + +import javax.annotation.Nullable; +import java.util.Collection; +import java.util.List; + +public interface SecurableBaseVoEnabledService> extends BaseVoEnabledService, + SecurableBaseReadOnlyService { + + @Override + @Nullable + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) + VO loadValueObject( C entity ); + + @Override + @Nullable + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) + VO loadValueObjectById( Long entityId ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) + List loadValueObjects( Collection entities ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) + List loadValueObjectsByIds( Collection ids ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) + List loadAllValueObjects(); +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java index 44f1a78876..7de4e2a7a7 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableFilteringVoEnabledService.java @@ -9,46 +9,17 @@ import ubic.gemma.persistence.util.Sort; import javax.annotation.Nullable; -import java.util.Collection; import java.util.List; /** * A base service for securable entities with filtering and VO capabilities. + *

* @author poirigui - * @see gemma.gsec.model.Securable * @see FilteringVoEnabledService */ -public interface SecurableFilteringVoEnabledService> extends FilteringVoEnabledService { - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - List loadValueObjects( @Nullable Filters filters, @Nullable Sort sort ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - Slice loadValueObjects( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); - - @Override - @Nullable - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) - VO loadValueObject( C entity ); - - @Override - @Nullable - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_READ" }) - VO loadValueObjectById( Long entityId ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) - List loadValueObjects( Collection entities ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) - List loadValueObjectsByIds( Collection ids ); - - @Override - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" }) - List loadAllValueObjects(); +public interface SecurableFilteringVoEnabledService> extends + FilteringVoEnabledService, + SecurableBaseVoEnabledService { // The methods below using Filters do not require AFTER_ACL_COLLECTION_READ because the ACL filtering is performed // in the query itself. @@ -64,4 +35,12 @@ public interface SecurableFilteringVoEnabledService load( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + List loadValueObjects( @Nullable Filters filters, @Nullable Sort sort ); + + @Override + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) + Slice loadValueObjects( @Nullable Filters filters, @Nullable Sort sort, int offset, int limit ); } From 0543d03f7833164e2eb6c5e20b864d6459e3eb37 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 24 Jul 2024 19:24:53 -0400 Subject: [PATCH 34/99] Drop empty package --- .../service/auditAndSecurity/curation/package-info.java | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/package-info.java diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/package-info.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/package-info.java deleted file mode 100644 index 7857783867..0000000000 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/auditAndSecurity/curation/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * - */ -@ParametersAreNonnullByDefault -package ubic.gemma.persistence.service.auditAndSecurity.curation; - -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file From 27d1beb20be0e7d91b0e9066be69abd15dbc51b4 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 25 Jul 2024 12:23:52 -0400 Subject: [PATCH 35/99] Fixes deadlock when reporting an error git ds --- .../loader/expression/DataUpdaterImpl.java | 6 +- .../auditAndSecurity/AuditTrailService.java | 3 - .../AuditTrailServiceImpl.java | 72 ++++++++----------- .../AuditTrailServiceImplTest.java | 9 ++- 4 files changed, 41 insertions(+), 49 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/DataUpdaterImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/DataUpdaterImpl.java index 95401563d2..63e650eb43 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/DataUpdaterImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/DataUpdaterImpl.java @@ -51,6 +51,7 @@ import ubic.gemma.model.expression.experiment.ExpressionExperiment; import ubic.gemma.persistence.service.analysis.expression.pca.PrincipalComponentAnalysisService; import ubic.gemma.persistence.service.analysis.expression.sampleCoexpression.SampleCoexpressionAnalysisService; +import ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventService; import ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService; import ubic.gemma.persistence.service.common.quantitationtype.QuantitationTypeService; import ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService; @@ -87,6 +88,9 @@ public class DataUpdaterImpl implements DataUpdater { @Autowired private AuditTrailService auditTrailService; + @Autowired + private AuditEventService auditEventService; + @Autowired private BioAssayDimensionService bioAssayDimensionService; @@ -875,7 +879,7 @@ private ArrayDesign getAffymetrixTargetPlatform( ArrayDesign ad ) { */ private boolean hasVectorMergeEvent( Auditable a ) { - for ( AuditEvent event : this.auditTrailService.getEvents( a ) ) { + for ( AuditEvent event : this.auditEventService.getEvents( a ) ) { if ( event == null ) continue; // just in case; should not happen if ( event.getEventType() instanceof ExpressionExperimentVectorMergeEvent ) { diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailService.java index 5e8bc44439..f63dd861ec 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailService.java @@ -91,7 +91,4 @@ public interface AuditTrailService extends BaseImmutableService { @Override @Secured({ "GROUP_USER" }) AuditTrail create( AuditTrail auditTrail ); - - @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - List getEvents( Auditable auditable ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java index cd990e600e..4124037e7a 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java @@ -27,6 +27,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.Assert; import ubic.gemma.core.security.authentication.UserManager; import ubic.gemma.model.common.auditAndSecurity.AuditAction; import ubic.gemma.model.common.auditAndSecurity.AuditEvent; @@ -39,7 +40,6 @@ import javax.annotation.Nullable; import java.util.Date; -import java.util.List; /** * @author pavlidis @@ -49,21 +49,15 @@ public class AuditTrailServiceImpl extends AbstractService implements AuditTrailService { private final AuditTrailDao auditTrailDao; - - private final AuditEventDao auditEventDao; - private final GenericCuratableDao curatableDao; - private final UserManager userManager; - private final SessionFactory sessionFactory; @Autowired - public AuditTrailServiceImpl( AuditTrailDao auditTrailDao, AuditEventDao auditEventDao, - GenericCuratableDao curatableDao, UserManager userManager, SessionFactory sessionFactory ) { + public AuditTrailServiceImpl( AuditTrailDao auditTrailDao, GenericCuratableDao curatableDao, UserManager userManager, + SessionFactory sessionFactory ) { super( auditTrailDao ); this.auditTrailDao = auditTrailDao; - this.auditEventDao = auditEventDao; this.curatableDao = curatableDao; this.userManager = userManager; this.sessionFactory = sessionFactory; @@ -72,19 +66,19 @@ public AuditTrailServiceImpl( AuditTrailDao auditTrailDao, AuditEventDao auditEv @Override @Transactional public AuditEvent addUpdateEvent( final Auditable auditable, final String note ) { - return doAddUpdateEvent( auditable, null, note, null, null ); + return doAddUpdateEvent( auditable, null, note, null, null, true ); } @Override @Transactional public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note ) { - return doAddUpdateEvent( auditable, getAuditEventType( type ), note, null, null ); + return doAddUpdateEvent( auditable, type, note, null, null, true ); } @Override @Transactional public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note, String detail ) { - return doAddUpdateEvent( auditable, getAuditEventType( type ), note, detail, null ); + return doAddUpdateEvent( auditable, type, note, detail, null, true ); } /** @@ -94,58 +88,50 @@ public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note, Throwable throwable ) { - Class entityClass = Hibernate.getClass( auditable ); - Long id = auditable.getId(); // because of the REQUIRES_NEW, the auditable might originate from a different session, so it would be unsafe to // modify it + // also, for this reason we cannot update the curation details because that can cause a deadlock if those have + // been altered in the suspended transaction + Class entityClass = Hibernate.getClass( auditable ); + Long id = auditable.getId(); auditable = ( Auditable ) sessionFactory.getCurrentSession().get( entityClass, id ); if ( auditable == null ) { log.error( String.format( "Failed to retrieve an auditable entity with class %s and ID %d in order to add an audit event with an exception.\n\tEvent Type: %s%s", entityClass.getName(), id, type.getName(), note != null ? "\n\tNote: " + note : "" ), throwable ); - - return AuditEvent.Factory.newInstance( new Date(), AuditAction.UPDATE, note, null, userManager.getCurrentUser(), getAuditEventType( type ) ); + return createAuditEvent( type, note, ExceptionUtils.getStackTrace( throwable ), null ); } - return doAddUpdateEvent( auditable, getAuditEventType( type ), note, ExceptionUtils.getStackTrace( throwable ), null ); + return doAddUpdateEvent( auditable, type, note, ExceptionUtils.getStackTrace( throwable ), null, false ); } @Override @Transactional public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note, @Nullable String detail, Date performedDate ) { - return doAddUpdateEvent( auditable, getAuditEventType( type ), note, detail, performedDate ); - } - - @Override - @Transactional(readOnly = true) - public List getEvents( Auditable ad ) { - return this.auditEventDao.getEvents( ad ); + return doAddUpdateEvent( auditable, type, note, detail, performedDate, true ); } - private AuditEvent doAddUpdateEvent( Auditable auditable, @Nullable AuditEventType auditEventType, @Nullable String note, @Nullable String detail, @Nullable Date performedDate ) { + private AuditEvent doAddUpdateEvent( Auditable auditable, @Nullable Class auditEventType, @Nullable String note, @Nullable String detail, @Nullable Date performedDate, boolean updateCurationDetails ) { if ( auditable.getId() == null ) { throw new IllegalArgumentException( "Cannot add an update event on a transient entity." ); } - if ( performedDate == null ) { - performedDate = new Date(); - } else if ( performedDate.after( new Date() ) ) { - throw new IllegalArgumentException( "Cannot create an audit event for something that has not yet occurred." ); - } - //Create new audit event - AuditEvent auditEvent = AuditEvent.Factory.newInstance( performedDate, AuditAction.UPDATE, note, detail, userManager.getCurrentUser(), auditEventType ); - //If object is curatable, update curation details - if ( auditable instanceof Curatable ) { + AuditTrail trail = ensureInSession( auditable.getAuditTrail() ); + auditable.setAuditTrail( trail ); + AuditEvent auditEvent = createAuditEvent( auditEventType, note, detail, performedDate ); + // If object is curatable, update curation details + if ( ( auditable instanceof Curatable ) && updateCurationDetails ) { curatableDao.updateCurationDetailsFromAuditEvent( ( Curatable ) auditable, auditEvent ); } - return this.addEvent( auditable, auditEvent ); + trail.getEvents().add( auditEvent ); + // event will be created in cascade + auditTrailDao.update( trail ); + return auditEvent; } - private AuditEvent addEvent( final Auditable auditable, final AuditEvent auditEvent ) { - AuditTrail trail = auditable.getAuditTrail(); - trail = ensureInSession( trail ); - // this is necessary otherwise we would have to guess the event from the audit trail - AuditEvent persistedAuditEvent = auditEventDao.save( auditEvent ); - trail.getEvents().add( auditEvent ); - auditable.setAuditTrail( auditTrailDao.save( trail ) ); - return persistedAuditEvent; + private AuditEvent createAuditEvent( @Nullable Class auditEventType, @Nullable String note, @Nullable String detail, @Nullable Date performedDate ) { + Assert.isTrue( performedDate == null || performedDate.after( new Date() ), "Cannot create an audit event for something that has not yet occurred." ); + if ( performedDate == null ) { + performedDate = new Date(); + } + return AuditEvent.Factory.newInstance( performedDate, AuditAction.UPDATE, note, detail, userManager.getCurrentUser(), auditEventType != null ? getAuditEventType( auditEventType ) : null ); } private AuditEventType getAuditEventType( Class type ) { diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java index 45b96afbaa..1d8fc508c8 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImplTest.java @@ -50,6 +50,9 @@ public class AuditTrailServiceImplTest extends BaseSpringContextTest { @Autowired private AuditTrailService auditTrailService; + @Autowired + private AuditEventService auditEventService; + @Autowired private ArrayDesignService arrayDesignService; @@ -218,7 +221,7 @@ public final void testGetEntitiesWithEvent() { Collection events = auditTrail.getEvents(); assertTrue( events.contains( ev ) ); - events = auditTrailService.getEvents( auditable ); + events = auditEventService.getEvents( auditable ); assertTrue( events.contains( ev ) ); } @@ -275,6 +278,7 @@ public final void testAddTroubleEventWhenCurationDetailsAreModified() { // modify the curation details and audit trail (those must be rolled-back) auditable.getCurationDetails().setNeedsAttention( true ); auditTrailService.addUpdateEvent( auditable, "this should be rolled back" ); + session.flush(); // make sure CURATION_DETAILS are updated auditTrailService.addUpdateEvent( auditable, TroubledStatusFlagEvent.class, "nothing special, just testing", new RuntimeException() ); pta.rollback( t ); } finally { @@ -285,7 +289,8 @@ public final void testAddTroubleEventWhenCurationDetailsAreModified() { auditable = arrayDesignService.thawLite( auditable ); assertNull( auditable.getDescription() ); assertFalse( auditable.getCurationDetails().getNeedsAttention() ); - assertTrue( auditable.getCurationDetails().getTroubled() ); + // unfortunately, curation details cannot be altered because that would cause a deadlock + assertFalse( auditable.getCurationDetails().getTroubled() ); Assertions.assertThat( auditable.getAuditTrail().getEvents() ) .extracting( AuditEvent::getNote ) .doesNotContain( "this should be rolled back" ) From f814b8aa0dd50470338b921946e3a6512a9f7f7f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 25 Jul 2024 12:23:52 -0400 Subject: [PATCH 36/99] Fixes deadlock when reporting an error via the audit trail --- .../java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java | 2 +- .../gemma/core/apps/ArrayDesignSequenceManipulatingCli.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java index 072d58a3b8..7192e2f61e 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java @@ -296,7 +296,7 @@ boolean needToRun( Date skipIfLastRunLaterThan, ArrayDesign arrayDesign, AbstractCLI.log.debug( "Re-Checking status of " + arrayDesign ); - List allEvents = this.auditTrailService.getEvents( arrayDesign ); + List allEvents = this.auditEventService.getEvents( arrayDesign ); AuditEvent lastSequenceAnalysis = null; AuditEvent lastRepeatMask = null; AuditEvent lastSequenceUpdate = null; diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignSequenceManipulatingCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignSequenceManipulatingCli.java index f7c9c6f848..206f9d4343 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignSequenceManipulatingCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignSequenceManipulatingCli.java @@ -34,6 +34,7 @@ import ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType; import ubic.gemma.model.expression.arrayDesign.ArrayDesign; import ubic.gemma.model.expression.arrayDesign.TechnologyType; +import ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventService; import ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService; import ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService; @@ -54,6 +55,8 @@ public abstract class ArrayDesignSequenceManipulatingCli extends AbstractAuthent private ArrayDesignService arrayDesignService; @Autowired protected AuditTrailService auditTrailService; + @Autowired + protected AuditEventService auditEventService; private Collection arrayDesignsToProcess = new HashSet<>(); @@ -224,7 +227,7 @@ private List getEvents( ArrayDesign arrayDesign, Class eventClass ) { List events = new ArrayList<>(); - for ( AuditEvent event : this.auditTrailService.getEvents( arrayDesign ) ) { + for ( AuditEvent event : this.auditEventService.getEvents( arrayDesign ) ) { if ( event == null ) continue; if ( eventClass == null || ( event.getEventType() != null && eventClass From 165515c8220c5dc429112d18a61a21138354745e Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 25 Jul 2024 15:28:25 -0400 Subject: [PATCH 37/99] Use StringUtils.strip() instead of trim() and fix related NPE in #1170 --- .../ubic/gemma/core/apps/LoadSimpleExpressionDataCli.java | 2 +- .../gemma/core/loader/expression/geo/DatasetCombiner.java | 2 +- .../designElement/CompositeSequenceServiceImpl.java | 2 +- .../gemma/web/controller/GeneralSearchControllerImpl.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/LoadSimpleExpressionDataCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/LoadSimpleExpressionDataCli.java index 1eebd03ff2..916d6277ee 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/LoadSimpleExpressionDataCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/LoadSimpleExpressionDataCli.java @@ -240,7 +240,7 @@ private void loadExperiment( String configurationLine ) throws Exception { throw new IllegalArgumentException( "Field Missing Got[" + fields.length + "]: " + configurationLine ); } for ( i = 0; i < fields.length; i++ ) - fields[i] = StringUtils.trim( fields[i] ); + fields[i] = StringUtils.strip( fields[i] ); SimpleExpressionExperimentMetaData metaData = new SimpleExpressionExperimentMetaData(); diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java index e58f5ccf76..943263ede1 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java @@ -186,7 +186,7 @@ public static Collection findGDSforGSE( String seriesAccession ) { * Bug 2690. There must be a better way. */ details = details.replaceAll( "encoding=\"UTF-8\"", "" ); - try (StringInputStream sis = new StringInputStream( StringUtils.trim( details ) )) { + try ( StringInputStream sis = new StringInputStream( StringUtils.strip( details ) ) ) { Document document = builder.parse( sis ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/designElement/CompositeSequenceServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/designElement/CompositeSequenceServiceImpl.java index 3860563a4d..dd21db5485 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/designElement/CompositeSequenceServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/designElement/CompositeSequenceServiceImpl.java @@ -153,7 +153,7 @@ public Collection findByNamesInArrayDesigns( Collection Date: Thu, 25 Jul 2024 13:18:13 -0700 Subject: [PATCH 38/99] Curators can duplicate factorvaluesl https://github.com/PavlidisLab/Gemma/issues/1160 Needs more testing --- .../gemma/core/ontology/Relation.terms.txt | 4 +- .../ExperimentalDesignController.java | 41 +++++++++++++++++++ .../src/main/webapp/WEB-INF/gemma-servlet.xml | 1 + .../api/annotation/FactorValueEditor.js | 39 +++++++++++++++++- .../main/webapp/scripts/api/dwrServices.js | 5 +++ 5 files changed, 88 insertions(+), 2 deletions(-) diff --git a/gemma-core/src/main/resources/ubic/gemma/core/ontology/Relation.terms.txt b/gemma-core/src/main/resources/ubic/gemma/core/ontology/Relation.terms.txt index 61b0a53f82..120aff4af1 100644 --- a/gemma-core/src/main/resources/ubic/gemma/core/ontology/Relation.terms.txt +++ b/gemma-core/src/main/resources/ubic/gemma/core/ontology/Relation.terms.txt @@ -17,4 +17,6 @@ http://gemma.msl.ubc.ca/ont/TGEMO_00168 has developmental stage http://gemma.msl.ubc.ca/ont/TGEMO_00169 positive for product of gene http://gemma.msl.ubc.ca/ont/TGEMO_00170 negative for product of gene http://gemma.msl.ubc.ca/ont/TGEMO_00171 induced by -http://gemma.msl.ubc.ca/ont/TGEMO_00183 delivered to \ No newline at end of file +http://gemma.msl.ubc.ca/ont/TGEMO_00183 delivered to +http://gemma.msl.ubc.ca/ont/TGEMO_00202 sampled after +http://gemma.msl.ubc.ca/ont/TGEMO_00201 has child with disease diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java index cd6b62a923..3f8dc2c439 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java @@ -343,6 +343,47 @@ public void deleteFactorValueCharacteristics( FactorValueValueObject[] fvvos ) { } } + /** + * Make an exact copy of a factorvalue and add it to the experiment. + * As per https://github.com/PavlidisLab/Gemma/issues/1160 + * @param e the experimental factor + * @param fvId the id of the FV to duplicate + */ + public void duplicateFactorValue( EntityDelegator e, Long fvId ) { + if ( e == null || e.getId() == null ) return; + ExperimentalFactor ef = experimentalFactorService.load( e.getId() ); + if ( ef == null ) return; + FactorValue fv = factorValueService.load( fvId ); + if ( fv == null ) return; + ExpressionExperiment ee = expressionExperimentService.findByFactorValue( fv ); + if ( ee == null ) return; + + FactorValue newFv = FactorValue.Factory.newInstance(); + newFv.setExperimentalFactor( ef ); + Set chars = new HashSet<>(); + + for ( Statement c : fv.getCharacteristics() ) { + Statement newC = new Statement(); + newC.setCategory( c.getCategory() ); + newC.setCategoryUri( c.getCategoryUri() ); + newC.setSubject( c.getSubject() ); + newC.setSubjectUri( c.getSubjectUri() ); + newC.setPredicate( c.getPredicate() ); + newC.setPredicateUri( c.getPredicateUri() ); + newC.setSecondObject( c.getSecondObject() ); + newC.setSecondObjectUri( c.getSecondObjectUri() ); + newC.setSecondPredicate( c.getSecondPredicate() ); + newC.setSecondPredicateUri( c.getSecondPredicateUri() ); + newC.setEvidenceCode( GOEvidenceCode.IC ); + chars.add( newC ); + } + + newFv.setCharacteristics( chars ); + expressionExperimentService.addFactorValue( ee, newFv ); + + this.experimentReportService.evictFromCache( ee.getId() ); + } + public void deleteFactorValues( EntityDelegator e, Long[] fvIds ) { if ( e == null || e.getId() == null ) return; diff --git a/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml b/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml index a5032cce27..f09884b6f0 100644 --- a/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml +++ b/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml @@ -438,6 +438,7 @@ + diff --git a/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js b/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js index f30cf1c570..51d44f69a7 100755 --- a/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js +++ b/gemma-web/src/main/webapp/scripts/api/annotation/FactorValueEditor.js @@ -382,10 +382,12 @@ Gemma.FactorValueGrid = Ext.extend( Gemma.GemmaGridPanel, { this.deleteFactorValueButton.enable(); this.markAsNeedsAttentionButton.enable() this.clearNeedsAttentionButton.enable(); + this.duplicateButton.enable(); } else { this.deleteFactorValueButton.disable(); this.markAsNeedsAttentionButton.disable(); this.clearNeedsAttentionButton.disable(); + this.duplicateButton.disable(); } }, this.getTopToolbar() ); @@ -460,6 +462,27 @@ Gemma.FactorValueGrid = Ext.extend( Gemma.GemmaGridPanel, { ExperimentalDesignController.updateFactorValueCharacteristics( edited, callback ); }, this ); + this.getTopToolbar().on( "duplicate", function() { + var selectedIds = this.getSelectedFactorValues(); + if ( selectedIds && selectedIds.length > 0 ) { + + if ( selectedIds.length > 1 ) { + Ext.Msg.alert( "Select single", "Select a single factor value to be duplicated" ); + return; + } + + var selectedId = selectedIds[0]; + + var ef = this.experimentalFactor; + this.getEl().mask(); + var callback = function() { + this.getEl().unmask(); + this.factorValuesChanged( selectedIds ); // these ids are not changed, but forces a refresh. + }.createDelegate( this ); + ExperimentalDesignController.duplicateFactorValue( ef, selectedId, callback, this ); + } + }.createDelegate( this ), this ); + this.getTopToolbar().on( "undo", this.revertSelected.createDelegate( this ), this ); var that = this; @@ -522,6 +545,7 @@ Gemma.FactorValueGrid = Ext.extend( Gemma.GemmaGridPanel, { }.createDelegate( this ); ExperimentalDesignController.deleteFactorValueCharacteristics( selected, callback ); }.createDelegate( this ), this ); + } }, @@ -634,7 +658,7 @@ Gemma.FactorValueToolbar = Ext.extend( Ext.Toolbar, { */ initComponent : function() { Gemma.FactorValueToolbar.superclass.initComponent.call( this ); - this.addEvents( "create", "save", "delete", "undo", "markAsNeedsAttention", "clearNeedsAttention", "refresh", "toggleExpand", "toggleCollapse" ); + this.addEvents( "create", "save", "delete", "duplicate", "undo", "markAsNeedsAttention", "clearNeedsAttention", "refresh", "toggleExpand", "toggleCollapse" ); }, @@ -675,6 +699,17 @@ Gemma.FactorValueToolbar = Ext.extend( Ext.Toolbar, { }.createDelegate( this ) } ); + this.duplicateButton = new Ext.Toolbar.Button( { + text : "Dupl", + id : 'factor-value-duplicate-button', + tooltip : "Duplicate the selected factor value", + disabled : true, + handler : function() { + this.fireEvent( "duplicate" ); + }, + scope : this + } ); + this.revertButton = new Ext.Toolbar.Button( { text : "Undo", id : 'factor-value-undo-button', @@ -722,6 +757,8 @@ Gemma.FactorValueToolbar = Ext.extend( Ext.Toolbar, { this.addSpacer(); this.addButton( this.saveButton ); this.addSpacer(); + this.addButton( this.duplicateButton ); + this.addSpacer(); this.addButton( this.revertButton ); this.addSpacer(); this.addButton( this.markAsNeedsAttentionButton ) diff --git a/gemma-web/src/main/webapp/scripts/api/dwrServices.js b/gemma-web/src/main/webapp/scripts/api/dwrServices.js index 0778eb1ae4..b9720023ff 100755 --- a/gemma-web/src/main/webapp/scripts/api/dwrServices.js +++ b/gemma-web/src/main/webapp/scripts/api/dwrServices.js @@ -428,6 +428,11 @@ ExperimentalDesignController.deleteFactorValues = function( p0, p1, callback ) { dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteFactorValues', p0, p1, callback ); }; +ExperimentalDesignController.duplicateFactorValue = function( p0, p1, callback ) { + googleAnalyticsTrackPageviewIfConfigured( "/Gemma/ExperimentalDesignController/duplicateFactorValue" ); + dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'duplicateFactorValue', p0, + p1, callback ); +}; ExperimentalDesignController.getFactorValuesWithCharacteristics = function( p0, callback ) { dwr.engine._execute( ExperimentalDesignController._path, 'ExperimentalDesignController', 'getFactorValuesWithCharacteristics', p0, callback ); From 594b5a2f9df965f9128b6e0b2fed7e6c0128b050 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 25 Jul 2024 16:59:56 -0400 Subject: [PATCH 39/99] Add missing mock for AuditEventService --- .../ubic/gemma/core/apps/ArrayDesignMergeCliTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gemma-cli/src/test/java/ubic/gemma/core/apps/ArrayDesignMergeCliTest.java b/gemma-cli/src/test/java/ubic/gemma/core/apps/ArrayDesignMergeCliTest.java index 627a2f03ca..dec6f49462 100644 --- a/gemma-cli/src/test/java/ubic/gemma/core/apps/ArrayDesignMergeCliTest.java +++ b/gemma-cli/src/test/java/ubic/gemma/core/apps/ArrayDesignMergeCliTest.java @@ -12,12 +12,13 @@ import org.springframework.test.context.TestExecutionListeners; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import ubic.gemma.core.analysis.report.ArrayDesignReportService; +import ubic.gemma.core.context.TestComponent; import ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignMergeService; import ubic.gemma.core.util.GemmaRestApiClient; import ubic.gemma.model.expression.arrayDesign.ArrayDesign; +import ubic.gemma.persistence.service.common.auditAndSecurity.AuditEventService; import ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService; import ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService; -import ubic.gemma.core.context.TestComponent; import java.util.Arrays; import java.util.Collection; @@ -49,6 +50,11 @@ public AuditTrailService auditTrailService() { return mock(); } + @Bean + public AuditEventService auditEventService() { + return mock(); + } + @Bean public ArrayDesignMergeService arrayDesignMergeService() { return mock( ArrayDesignMergeService.class ); From f909c8855d7ad0b948eae766b853a7a4511e5171 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 26 Jul 2024 12:03:35 -0400 Subject: [PATCH 40/99] Fix removal from a EE set from which the user lacks permission (fix #1166) --- .../ExpressionExperimentServiceImpl.java | 14 +------------- .../ExpressionExperimentSetService.java | 12 ++++++++++++ .../ExpressionExperimentSetServiceImpl.java | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentServiceImpl.java index 88a7b0f8d7..b51e02ad6a 100755 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentServiceImpl.java @@ -39,7 +39,6 @@ import ubic.gemma.core.search.SearchResult; import ubic.gemma.core.search.SearchService; import ubic.gemma.core.util.ListUtils; -import ubic.gemma.model.analysis.expression.ExpressionExperimentSet; import ubic.gemma.model.association.GOEvidenceCode; import ubic.gemma.model.common.auditAndSecurity.AuditEvent; import ubic.gemma.model.common.auditAndSecurity.eventType.*; @@ -62,7 +61,6 @@ import ubic.gemma.model.genome.Gene; import ubic.gemma.model.genome.Taxon; import ubic.gemma.persistence.service.AbstractFilteringVoEnabledService; -import ubic.gemma.persistence.service.AbstractService; import ubic.gemma.persistence.service.analysis.expression.coexpression.CoexpressionAnalysisService; import ubic.gemma.persistence.service.analysis.expression.diff.DifferentialExpressionAnalysisService; import ubic.gemma.persistence.service.analysis.expression.pca.PrincipalComponentAnalysisService; @@ -1352,17 +1350,7 @@ public void remove( ExpressionExperiment ee ) { * from other sets, and update them. IMPORTANT, this section assumes that we already checked for gene2gene * analyses! */ - Collection sets = this.expressionExperimentSetService.find( ee ); - for ( ExpressionExperimentSet eeSet : sets ) { - if ( eeSet.getExperiments().size() == 1 && eeSet.getExperiments().iterator().next().equals( ee ) ) { - AbstractService.log.info( "Removing from set " + eeSet ); - this.expressionExperimentSetService - .remove( eeSet ); // remove the set because in only contains this experiment - } else { - AbstractService.log.info( "Removing " + ee + " from " + eeSet ); - eeSet.getExperiments().remove( ee ); - } - } + this.expressionExperimentSetService.removeFromSets( ee ); super.remove( ee ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetService.java index 78e29ece54..eff120e728 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetService.java @@ -161,4 +161,16 @@ ExpressionExperimentSet initAutomaticallyGeneratedExperimentSet( @CheckReturnValue @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "ACL_SECURABLE_READ" }) ExpressionExperimentSet thaw( ExpressionExperimentSet set ); + + /** + * Remove an experiment from all sets it is in. + *

+ * Using this allows one to bypass the requirement of "owning edit rights" on the set as long as the current user + * has the right to edit the experiment itself. + *

+ * If a set ends-up empty as a result, it is removed as well. + * @return the number of sets this experiment was removed from + */ + @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "ACL_SECURABLE_EDIT" }) + int removeFromSets( BioAssaySet bas ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetServiceImpl.java index e384d5e98b..d38d4f8cac 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentSetServiceImpl.java @@ -217,4 +217,22 @@ public void update( final ExpressionExperimentSet expressionExperimentSet ) { public void update( Collection entities ) { entities.forEach( this::update ); } + + @Override + @Transactional + public int removeFromSets( BioAssaySet bas ) { + Collection sets = expressionExperimentSetDao.find( bas ); + for ( ExpressionExperimentSet eeSet : sets ) { + log.info( "Removing " + bas + " from " + eeSet ); + eeSet.getExperiments().remove( bas ); + if ( eeSet.getExperiments().isEmpty() ) { + // remove the set because in only contains this experiment + // TODO: do we want to check for ACLs? the current user might not have the right to do that, even if the + // set is now empty + log.info( "Removing now empty set " + eeSet ); + expressionExperimentSetDao.remove( eeSet ); + } + } + return sets.size(); + } } \ No newline at end of file From d2e7d6a4a8bea01cb72b73246b134c980698ad21 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 26 Jul 2024 13:36:40 -0400 Subject: [PATCH 41/99] Fix logic for checking of an audit event happened --- .../AuditTrailServiceImpl.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java index 4124037e7a..4516c67a5f 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/AuditTrailServiceImpl.java @@ -66,19 +66,19 @@ public AuditTrailServiceImpl( AuditTrailDao auditTrailDao, GenericCuratableDao c @Override @Transactional public AuditEvent addUpdateEvent( final Auditable auditable, final String note ) { - return doAddUpdateEvent( auditable, null, note, null, null, true ); + return doAddUpdateEvent( auditable, null, note, null, new Date(), true ); } @Override @Transactional public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note ) { - return doAddUpdateEvent( auditable, type, note, null, null, true ); + return doAddUpdateEvent( auditable, type, note, null, new Date(), true ); } @Override @Transactional public AuditEvent addUpdateEvent( Auditable auditable, Class type, @Nullable String note, String detail ) { - return doAddUpdateEvent( auditable, type, note, detail, null, true ); + return doAddUpdateEvent( auditable, type, note, detail, new Date(), true ); } /** @@ -98,9 +98,9 @@ public AuditEvent addUpdateEvent( Auditable auditable, Class auditEventType, @Nullable String note, @Nullable String detail, @Nullable Date performedDate, boolean updateCurationDetails ) { + private AuditEvent doAddUpdateEvent( Auditable auditable, @Nullable Class auditEventType, @Nullable String note, @Nullable String detail, Date performedDate, boolean updateCurationDetails ) { if ( auditable.getId() == null ) { throw new IllegalArgumentException( "Cannot add an update event on a transient entity." ); } @@ -126,11 +126,8 @@ private AuditEvent doAddUpdateEvent( Auditable auditable, @Nullable Class auditEventType, @Nullable String note, @Nullable String detail, @Nullable Date performedDate ) { - Assert.isTrue( performedDate == null || performedDate.after( new Date() ), "Cannot create an audit event for something that has not yet occurred." ); - if ( performedDate == null ) { - performedDate = new Date(); - } + private AuditEvent createAuditEvent( @Nullable Class auditEventType, @Nullable String note, @Nullable String detail, Date performedDate ) { + Assert.isTrue( !performedDate.after( new Date() ), "Cannot create an audit event for something that has not yet occurred." ); return AuditEvent.Factory.newInstance( performedDate, AuditAction.UPDATE, note, detail, userManager.getCurrentUser(), auditEventType != null ? getAuditEventType( auditEventType ) : null ); } From 3eb34e6a97b2f152cb10bbc2e3d03d515f8a1bf7 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 26 Jul 2024 15:00:26 -0400 Subject: [PATCH 42/99] Update gsec to 0.0.17 and fix secured methods with collection generics --- .../common/auditAndSecurity/SecurableBaseImmutableService.java | 3 +-- .../service/common/auditAndSecurity/SecurableBaseService.java | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java index cd0ddc5403..1b3bf4183d 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseImmutableService.java @@ -35,7 +35,6 @@ public interface SecurableBaseImmutableService extends Base void remove( C entity ); @Override - // FIXME: this does not work with generics - // @Secured({ "GROUP_USER", "ACL_SECURABLE_COLLECTION_EDIT" }) + @Secured({ "GROUP_USER", "ACL_SECURABLE_COLLECTION_EDIT" }) void remove( Collection entities ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java index 6bcee01856..c99d1458a7 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/common/auditAndSecurity/SecurableBaseService.java @@ -30,6 +30,6 @@ public interface SecurableBaseService extends BaseService entities ); } diff --git a/pom.xml b/pom.xml index b37ae793b3..387d94fc0a 100644 --- a/pom.xml +++ b/pom.xml @@ -699,7 +699,7 @@ 3.1.1 - 0.0.16 + 0.0.17 3.2.18.RELEASE 3.2.10.RELEASE 2.25.1 From cebab6b5b42105e52770c13008c065c988cbba30 Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Fri, 26 Jul 2024 12:19:37 -0700 Subject: [PATCH 43/99] forgot to copy some fields --- .../experiment/ExperimentalDesignController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java index 3f8dc2c439..2c61a2c922 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExperimentalDesignController.java @@ -366,15 +366,20 @@ public void duplicateFactorValue( EntityDelegator e, Long fv Statement newC = new Statement(); newC.setCategory( c.getCategory() ); newC.setCategoryUri( c.getCategoryUri() ); + newC.setValue( c.getValue() ); // deprecated + newC.setValueUri( c.getOriginalValue() );// deprecated newC.setSubject( c.getSubject() ); newC.setSubjectUri( c.getSubjectUri() ); newC.setPredicate( c.getPredicate() ); + newC.setObject( c.getObject() ); + newC.setObjectUri( c.getObjectUri() ); newC.setPredicateUri( c.getPredicateUri() ); newC.setSecondObject( c.getSecondObject() ); newC.setSecondObjectUri( c.getSecondObjectUri() ); newC.setSecondPredicate( c.getSecondPredicate() ); newC.setSecondPredicateUri( c.getSecondPredicateUri() ); - newC.setEvidenceCode( GOEvidenceCode.IC ); + newC.setEvidenceCode( c.getEvidenceCode() ); + newC.setOriginalValue( c.getOriginalValue() ); chars.add( newC ); } From 0e91580b38b42f0cefda585c1ebe67870468491b Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 26 Jul 2024 15:14:34 -0400 Subject: [PATCH 44/99] Update dependencies --- gemma-groovy-support/pom.xml | 2 +- gemma-web/pom.xml | 2 +- pom.xml | 14 ++++++-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gemma-groovy-support/pom.xml b/gemma-groovy-support/pom.xml index de96a3962f..7c79009cc4 100644 --- a/gemma-groovy-support/pom.xml +++ b/gemma-groovy-support/pom.xml @@ -53,7 +53,7 @@ org.apache.groovy groovy-all - 4.0.21 + 4.0.22 pom true diff --git a/gemma-web/pom.xml b/gemma-web/pom.xml index 1d52b0b3ad..d9c4824468 100644 --- a/gemma-web/pom.xml +++ b/gemma-web/pom.xml @@ -206,7 +206,7 @@ opensymphony sitemesh - 2.5.0 + 2.6.0 runtime diff --git a/pom.xml b/pom.xml index 387d94fc0a..22a00b340b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ ubc.pavlab pavlab-starter-parent - 1.2.14 + 1.2.15 gemma-core @@ -300,7 +300,7 @@ org.apache.commons commons-lang3 - 3.14.0 + 3.15.0 org.apache.commons @@ -310,7 +310,6 @@ commons-logging commons-logging - 1.3.2 commons-logging @@ -440,12 +439,11 @@ org.assertj assertj-core - 3.26.0 com.h2database h2 - 2.2.224 + 2.3.230 test @@ -703,12 +701,12 @@ 3.2.18.RELEASE 3.2.10.RELEASE 2.25.1 - 2.17.1 + 2.17.2 2.2.22 3.9 3.6.2 - 1.40.1 - 1.13.1 + 1.40.3 + 1.13.2 2.1.4 8.4.0 From 425b1d573add2b7364c17849cefa5ad3f9911e97 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 11:27:10 -0400 Subject: [PATCH 45/99] Convert missing annotation files into a 404 exception --- .../ArrayDesignControllerImpl.java | 9 +- .../web/util/EntityNotFoundException.java | 11 +- .../ArrayDesignControllerTest.java | 105 +++++++++++++++--- 3 files changed, 104 insertions(+), 21 deletions(-) diff --git a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerImpl.java b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerImpl.java index 3990065b05..95e0d9107d 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerImpl.java +++ b/gemma-web/src/main/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerImpl.java @@ -37,13 +37,14 @@ import ubic.gemma.core.analysis.sequence.CompositeSequenceMapValueObject; import ubic.gemma.core.analysis.service.ArrayDesignAnnotationService; import ubic.gemma.core.analysis.service.ArrayDesignAnnotationServiceImpl; +import ubic.gemma.core.config.Settings; +import ubic.gemma.core.job.AbstractTask; import ubic.gemma.core.job.TaskCommand; import ubic.gemma.core.job.TaskResult; import ubic.gemma.core.job.TaskRunningService; import ubic.gemma.core.search.SearchException; import ubic.gemma.core.search.SearchResult; import ubic.gemma.core.search.SearchService; -import ubic.gemma.core.job.AbstractTask; import ubic.gemma.model.common.description.DatabaseEntry; import ubic.gemma.model.common.description.DatabaseEntryValueObject; import ubic.gemma.model.common.search.SearchSettings; @@ -57,7 +58,6 @@ import ubic.gemma.persistence.util.EntityUtils; import ubic.gemma.persistence.util.Filter; import ubic.gemma.persistence.util.Filters; -import ubic.gemma.core.config.Settings; import ubic.gemma.web.remote.EntityDelegator; import ubic.gemma.web.remote.JsonReaderResponse; import ubic.gemma.web.remote.ListBatchCommand; @@ -196,8 +196,9 @@ public void downloadAnnotationFile( @RequestParam("id") Long arrayDesignId, @Req response.setContentLength( ( int ) f.length() ); IOUtils.copy( is, response.getOutputStream() ); } catch ( FileNotFoundException e ) { - throw new RuntimeException( String.format( "The annotation file could not be found for %s. Please contact %s for assistance.", - arrayDesign.getShortName(), SUPPORT_EMAIL ) ); + throw new EntityNotFoundException( + String.format( "The annotation file could not be found for %s. Please contact %s for assistance.", + arrayDesign.getShortName(), SUPPORT_EMAIL ), e ); } } diff --git a/gemma-web/src/main/java/ubic/gemma/web/util/EntityNotFoundException.java b/gemma-web/src/main/java/ubic/gemma/web/util/EntityNotFoundException.java index 88ec465cbb..f35d825325 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/util/EntityNotFoundException.java +++ b/gemma-web/src/main/java/ubic/gemma/web/util/EntityNotFoundException.java @@ -20,15 +20,20 @@ /** * Signals that an entity was not found in the system. - * + *

+ * This is translated into a 404 error by the exception resolver. * @author pavlidis */ public class EntityNotFoundException extends RuntimeException { private static final long serialVersionUID = -4361183252269974819L; - public EntityNotFoundException( String string ) { - super( string ); + public EntityNotFoundException( String message ) { + super( message ); + } + + public EntityNotFoundException( String message, Throwable cause ) { + super( message, cause ); } } diff --git a/gemma-web/src/test/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerTest.java b/gemma-web/src/test/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerTest.java index 8a7d4dd3e3..b680fce117 100644 --- a/gemma-web/src/test/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerTest.java +++ b/gemma-web/src/test/java/ubic/gemma/web/controller/expression/arrayDesign/ArrayDesignControllerTest.java @@ -18,30 +18,107 @@ */ package ubic.gemma.web.controller.expression.arrayDesign; +import org.junit.After; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.servlet.ModelAndView; -import ubic.gemma.core.util.test.BaseIntegrationTest; -import ubic.gemma.web.util.BaseWebIntegrationTest; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.test.context.ContextConfiguration; +import ubic.gemma.core.analysis.report.ArrayDesignReportService; +import ubic.gemma.core.analysis.sequence.ArrayDesignMapResultService; +import ubic.gemma.core.analysis.service.ArrayDesignAnnotationService; +import ubic.gemma.core.context.TestComponent; +import ubic.gemma.core.job.TaskRunningService; +import ubic.gemma.core.search.SearchService; +import ubic.gemma.model.expression.arrayDesign.ArrayDesign; +import ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignService; +import ubic.gemma.persistence.service.expression.designElement.CompositeSequenceService; +import ubic.gemma.web.util.BaseWebTest; -import java.util.Collection; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * @author keshav */ -public class ArrayDesignControllerTest extends BaseWebIntegrationTest { +@ContextConfiguration +public class ArrayDesignControllerTest extends BaseWebTest { + + @Configuration + @TestComponent + static class CC extends BaseWebTest.BaseWebTestContextConfiguration { + + @Bean + public ArrayDesignController arrayDesignController() { + return new ArrayDesignControllerImpl(); + } + + @Bean + public ArrayDesignMapResultService arrayDesignMapResultService() { + return mock(); + } + + @Bean + public ArrayDesignReportService arrayDesignReportService() { + return mock(); + } + + @Bean + public ArrayDesignService arrayDesignService() { + return mock(); + } + + @Bean + public CompositeSequenceService compositeSequenceService() { + return mock(); + } + + @Bean + public SearchService searchService() { + return mock(); + } + + @Bean + public TaskRunningService taskRunningService() { + return mock(); + } + + @Bean + public ArrayDesignAnnotationService annotationFileService() { + return mock(); + } + } @Autowired - private ArrayDesignController arrayDesignController; + private ArrayDesignService arrayDesignService; + + @Autowired + private ArrayDesignAnnotationService annotationFileService; + + @After + public void resetMocks() { + reset( arrayDesignService ); + } + + @Test + public void testShowAllArrayDesigns() throws Exception { + perform( get( "/arrays/showAllArrayDesigns.html" ) ) + .andExpect( status().isOk() ) + .andExpect( view().name( "arrayDesigns" ) ); + } @Test - public void testShowAllArrayDesigns() { - ModelAndView mav = arrayDesignController.showAllArrayDesigns(); - Collection c = mav.getModel().values(); - assertNotNull( c ); - assertEquals( "arrayDesigns", mav.getViewName() ); + public void testDownloadAnnotationsWhenFileCannotBeCreated() throws Exception { + ArrayDesign ad = new ArrayDesign(); + when( arrayDesignService.load( 1L ) ).thenReturn( ad ); + perform( get( "/arrays/downloadAnnotationFile.html" ) + .param( "id", "1" ) ) + .andExpect( status().isNotFound() ) + .andExpect( view().name( "error/404" ) ) + .andExpect( model().attributeExists( "exception" ) ); + verify( arrayDesignService ).load( 1L ); + // no file will be created because it's just a mock + verify( annotationFileService ).create( ad, true, false ); } } From 4bfa2b2e8850afd923e93c9967b4f32c157f579b Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 12:39:00 -0400 Subject: [PATCH 46/99] Fix slow RNG by using commons-math RandomUtils instead of commons-lang3 This also removes a deprecated API usage from commons-lang3. The other problematic class that has a slow RNG is RandomStringUtils. --- .../main/java/ubic/gemma/core/apps/BibRefUpdaterCli.java | 6 +++--- .../java/ubic/gemma/core/ontology/OntologyServiceImpl.java | 6 +++--- .../expression/experiment/ExperimentalDesignDaoImpl.java | 6 +++--- .../GeneMultifunctionalityPopulationServiceTest.java | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/BibRefUpdaterCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/BibRefUpdaterCli.java index 22e867f710..e60608402c 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/BibRefUpdaterCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/BibRefUpdaterCli.java @@ -22,11 +22,11 @@ import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; -import org.apache.commons.lang3.RandomUtils; -import ubic.gemma.persistence.service.common.description.BibliographicReferenceService; +import org.apache.commons.lang.math.RandomUtils; import ubic.gemma.core.apps.GemmaCLI.CommandGroup; import ubic.gemma.core.util.AbstractAuthenticatedCLI; import ubic.gemma.model.common.description.BibliographicReference; +import ubic.gemma.persistence.service.common.description.BibliographicReferenceService; import java.util.ArrayList; import java.util.Collection; @@ -106,7 +106,7 @@ protected void doWork() throws Exception { } catch ( Exception e ) { log.info( "Failed to update: " + bibref + " (" + e.getMessage() + ")" ); } - Thread.sleep( RandomUtils.nextInt( 0, 1000 ) ); + Thread.sleep( RandomUtils.nextInt( 1000 ) ); } } diff --git a/gemma-core/src/main/java/ubic/gemma/core/ontology/OntologyServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/ontology/OntologyServiceImpl.java index 9301066d40..9b4d1782e2 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/ontology/OntologyServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/ontology/OntologyServiceImpl.java @@ -19,7 +19,7 @@ package ubic.gemma.core.ontology; import io.micrometer.core.annotation.Timed; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.time.StopWatch; @@ -43,7 +43,6 @@ import ubic.basecode.ontology.providers.ObiService; import ubic.basecode.ontology.search.OntologySearchException; import ubic.basecode.ontology.search.OntologySearchResult; -import ubic.gemma.persistence.service.genome.gene.GeneService; import ubic.gemma.core.ontology.providers.GeneOntologyService; import ubic.gemma.core.ontology.providers.OntologyServiceFactory; import ubic.gemma.core.search.*; @@ -56,6 +55,7 @@ import ubic.gemma.model.genome.Taxon; import ubic.gemma.model.genome.gene.GeneValueObject; import ubic.gemma.persistence.service.common.description.CharacteristicService; +import ubic.gemma.persistence.service.genome.gene.GeneService; import javax.annotation.Nullable; import java.io.BufferedReader; @@ -979,7 +979,7 @@ private T pollCompletionService( ExecutorCompletionService completionServ double recheckMs = Math.min( checkFrequencyMillis, timeoutMs ); // a fuzz factor to prevent concurrent tasks from all timing out at the same time // up to 10% of the initial timeout - double fuzzyMs = RandomUtils.nextDouble( 0.0, checkFrequencyMillis / 10.0 ); + double fuzzyMs = RandomUtils.nextDouble() * checkFrequencyMillis / 10.0; while ( ( future = completionService.poll( ( long ) recheckMs, TimeUnit.MILLISECONDS ) ) == null ) { long remainingTimeMs = Math.max( timeoutMs - timer.getTime(), 0 ); long i = futures.stream().filter( Future::isDone ).count(); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java index 583a8014b5..f246a9d51f 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java @@ -18,7 +18,7 @@ */ package ubic.gemma.persistence.service.expression.experiment; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.hibernate.SessionFactory; import org.hibernate.criterion.Restrictions; import org.springframework.beans.factory.annotation.Autowired; @@ -28,7 +28,7 @@ import ubic.gemma.persistence.service.AbstractDao; import javax.annotation.Nullable; -import java.util.List; +import java.util.Random; /** * @see ubic.gemma.model.expression.experiment.ExperimentalDesign @@ -79,7 +79,7 @@ public ExperimentalDesign getRandomExperimentalDesignThatNeedsAttention( Experim .createQuery( "select distinct ed from ExperimentalDesign ed join ed.experimentalFactors ef " + "join ef.factorValues fv where ed.id != :edId and fv.needsAttention = true" ) .setParameter( "edId", excludedDesign.getId() ) - .setFirstResult( RandomUtils.nextInt( 0, numThatNeedsAttention.intValue() ) ) + .setFirstResult( RandomUtils.nextInt( numThatNeedsAttention.intValue() ) ) .setMaxResults( 1 ) .uniqueResult(); } diff --git a/gemma-core/src/test/java/ubic/gemma/core/analysis/service/GeneMultifunctionalityPopulationServiceTest.java b/gemma-core/src/test/java/ubic/gemma/core/analysis/service/GeneMultifunctionalityPopulationServiceTest.java index 2b4c37a5cf..81cb5d5ee0 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/analysis/service/GeneMultifunctionalityPopulationServiceTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/analysis/service/GeneMultifunctionalityPopulationServiceTest.java @@ -19,8 +19,8 @@ package ubic.gemma.core.analysis.service; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -28,7 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; import org.springframework.test.annotation.DirtiesContext; -import ubic.gemma.persistence.service.genome.gene.GeneService; import ubic.gemma.core.ontology.providers.GeneOntologyService; import ubic.gemma.core.util.test.BaseSpringContextTest; import ubic.gemma.core.util.test.category.SlowTest; @@ -44,6 +43,7 @@ import ubic.gemma.model.genome.Taxon; import ubic.gemma.persistence.service.association.Gene2GOAssociationService; import ubic.gemma.persistence.service.common.description.ExternalDatabaseService; +import ubic.gemma.persistence.service.genome.gene.GeneService; import java.io.InputStream; import java.util.Collection; @@ -95,7 +95,7 @@ public void setUp() throws Exception { testTaxon = taxonService.findOrCreate( Taxon.Factory .newInstance( "foobly" + RandomStringUtils.randomAlphabetic( 2 ), - "doobly" + RandomStringUtils.randomAlphabetic( 2 ), RandomUtils.nextInt( 0, 5000 ), true ) ); + "doobly" + RandomStringUtils.randomAlphabetic( 2 ), RandomUtils.nextInt( 5000 ), true ) ); /* * Create genes From 8f0223ff491c451163075acdbf23b2a472d5d59e Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 12:49:02 -0400 Subject: [PATCH 47/99] Revert commons-lang3 to 3.14.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22a00b340b..7f4a20cd0d 100644 --- a/pom.xml +++ b/pom.xml @@ -300,7 +300,7 @@ org.apache.commons commons-lang3 - 3.15.0 + 3.14.0 org.apache.commons From b29172469c33291c78c1f3b53aa61c942ee4ddad Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 12:53:31 -0400 Subject: [PATCH 48/99] Mention #1194 next to commons-lang3 version --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 7f4a20cd0d..46b9e63729 100644 --- a/pom.xml +++ b/pom.xml @@ -300,6 +300,7 @@ org.apache.commons commons-lang3 + 3.14.0 From 4729c90007710d0ad575d89ffeda9d5315b60780 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 16:31:58 -0400 Subject: [PATCH 49/99] Delete PCA laodings, eigenvalues and eigenvectors in bulk --- .../PrincipalComponentAnalysisDaoImpl.java | 26 +++++++ ...PrincipalComponentAnalysisDaoImplTest.java | 73 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImplTest.java diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java index f574f80a69..94ce33af70 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java @@ -62,4 +62,30 @@ public void removeForExperiment( ExpressionExperiment ee ) { this.remove( this.findByProperty( "experimentAnalyzed", ee ) ); } + @Override + public void remove( PrincipalComponentAnalysis entity ) { + // detach the entity because we're going to do some manual removal + getSessionFactory().getCurrentSession().evict( entity ); + + getSessionFactory().getCurrentSession() + .createSQLQuery( "delete ev from EIGENVALUE ev where ev.PRINCIPAL_COMPONENT_ANALYSIS_FK = :id" ) + .setParameter( "id", entity.getId() ) + .executeUpdate(); + + getSessionFactory().getCurrentSession() + .createSQLQuery( "delete ev from EIGENVECTOR ev where ev.PRINCIPAL_COMPONENT_ANALYSIS_FK = :id" ) + .setParameter( "id", entity.getId() ) + .executeUpdate(); + + getSessionFactory().getCurrentSession() + .createSQLQuery( "delete pl from PROBE_LOADING pl where pl.PRINCIPAL_COMPONENT_ANALYSIS_FK = :id" ) + .setParameter( "id", entity.getId() ) + .executeUpdate(); + + // re-retrieve the PCA from the database + entity = load( entity.getId() ); + if ( entity != null ) { + super.remove( entity ); + } + } } diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImplTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImplTest.java new file mode 100644 index 0000000000..03befcc065 --- /dev/null +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImplTest.java @@ -0,0 +1,73 @@ +package ubic.gemma.persistence.service.analysis.expression.pca; + +import org.hibernate.SessionFactory; +import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.test.context.ContextConfiguration; +import ubic.gemma.core.context.TestComponent; +import ubic.gemma.core.util.test.BaseDatabaseTest; +import ubic.gemma.model.analysis.expression.pca.Eigenvalue; +import ubic.gemma.model.analysis.expression.pca.Eigenvector; +import ubic.gemma.model.analysis.expression.pca.PrincipalComponentAnalysis; +import ubic.gemma.model.analysis.expression.pca.ProbeLoading; +import ubic.gemma.model.expression.arrayDesign.ArrayDesign; +import ubic.gemma.model.expression.designElement.CompositeSequence; +import ubic.gemma.model.genome.Taxon; + +import java.util.ArrayList; +import java.util.List; + +@ContextConfiguration +public class PrincipalComponentAnalysisDaoImplTest extends BaseDatabaseTest { + + @Configuration + @TestComponent + static class PCACC extends BaseDatabaseTestContextConfiguration { + @Bean + public PrincipalComponentAnalysisDao principalComponentAnalysisDao( SessionFactory sessionFactory ) { + return new PrincipalComponentAnalysisDaoImpl( sessionFactory ); + } + } + + @Autowired + private PrincipalComponentAnalysisDao principalComponentAnalysisDao; + + @Test + public void testBulkDelete() { + Taxon t = new Taxon(); + sessionFactory.getCurrentSession().persist( t ); + ArrayDesign ad = new ArrayDesign(); + ad.setPrimaryTaxon( t ); + for ( int i = 0; i < 100; i++ ) { + CompositeSequence cs = new CompositeSequence(); + cs.setArrayDesign( ad ); + cs.setName( "cs" + i ); + ad.getCompositeSequences().add( cs ); + } + sessionFactory.getCurrentSession().persist( ad ); + List cs = new ArrayList<>( ad.getCompositeSequences() ); + PrincipalComponentAnalysis pca = new PrincipalComponentAnalysis(); + for ( int i = 0; i < 100; i++ ) { + Eigenvalue ev = new Eigenvalue(); + ev.setComponentNumber( i ); + ev.setValue( 1.0 ); + pca.getEigenValues().add( ev ); + Eigenvector evc = new Eigenvector(); + evc.setComponentNumber( i ); + evc.setVector( new byte[0] ); + pca.getEigenVectors().add( evc ); + ProbeLoading pl = new ProbeLoading(); + pl.setComponentNumber( i ); + pl.setLoading( 1.0 ); + pl.setLoadingRank( 1 ); + pl.setProbe( cs.get( i ) ); + pca.getProbeLoadings().add( pl ); + } + pca = principalComponentAnalysisDao.create( pca ); + sessionFactory.getCurrentSession().flush(); + principalComponentAnalysisDao.remove( pca ); + sessionFactory.getCurrentSession().flush(); + } +} \ No newline at end of file From 5c450bf42f8b15fd01b852d84385b5b949c09c8b Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 16:35:15 -0400 Subject: [PATCH 50/99] Detach and remove FVs/BAs from all BMs (fix #1167) --- .../ExpressionExperimentDaoImpl.java | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java index 8fac206ac8..c63f85a944 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java @@ -1870,16 +1870,31 @@ public void remove( ExpressionExperiment ee ) { } } - // detach BAs from the samples, completely detached samples will be removed later - Set samplesToRemove = new HashSet<>(); + // find BMs attached to BAs + Set bms = new HashSet<>(); + if ( !ee.getBioAssays().isEmpty() ) { + bms.addAll( listByIdentifiableBatch( getSessionFactory().getCurrentSession() + .createQuery( "select distinct bm from BioMaterial bm join bm.bioAssaysUsedIn ba where ba in :bas" ), + "bas", ee.getBioAssays(), MAX_PARAMETER_LIST_SIZE ) ); + } + + // find BMs attached to FVs Set fvs = new HashSet<>( getFactorValues( ee ) ); - for ( BioAssay ba : ee.getBioAssays() ) { - ba.getSampleUsed().getFactorValues().removeAll( fvs ); - ba.getSampleUsed().getBioAssaysUsedIn().removeAll( ee.getBioAssays() ); - if ( ba.getSampleUsed().getBioAssaysUsedIn().isEmpty() && ba.getSampleUsed().getFactorValues().isEmpty() ) { - samplesToRemove.add( ba.getSampleUsed() ); + if ( !fvs.isEmpty() ) { + bms.addAll( listByIdentifiableBatch( getSessionFactory().getCurrentSession() + .createQuery( "select distinct bm from BioMaterial bm join bm.factorValues fv where fv in :fvs" ), + "fvs", fvs, MAX_PARAMETER_LIST_SIZE ) ); + } + + Set samplesToRemove = new HashSet<>(); + for ( BioMaterial bm : bms ) { + // detach BAs and FVs from the samples, completely detached samples will be removed later + bm.getFactorValues().removeAll( fvs ); + bm.getBioAssaysUsedIn().removeAll( ee.getBioAssays() ); + if ( bm.getBioAssaysUsedIn().isEmpty() && bm.getFactorValues().isEmpty() ) { + samplesToRemove.add( bm ); } else { - log.warn( ba.getSampleUsed() + " is attached to more than one ExpressionExperiment (via one or more BioAssay or FactorValue), the sample will not be deleted." ); + log.warn( bm + " is attached to more than one ExpressionExperiment (via one or more BioAssay or FactorValue), the sample will not be deleted." ); } } From c8356e09aa1cb3844b1e5113f077f57adf83e661 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 16:56:13 -0400 Subject: [PATCH 51/99] Avoid reloading the PCA when removing it --- .../pca/PrincipalComponentAnalysisDaoImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java index 94ce33af70..7ee44f27e4 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/pca/PrincipalComponentAnalysisDaoImpl.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.HashSet; import java.util.List; /** @@ -71,21 +72,20 @@ public void remove( PrincipalComponentAnalysis entity ) { .createSQLQuery( "delete ev from EIGENVALUE ev where ev.PRINCIPAL_COMPONENT_ANALYSIS_FK = :id" ) .setParameter( "id", entity.getId() ) .executeUpdate(); + entity.setEigenValues( new HashSet<>() ); getSessionFactory().getCurrentSession() .createSQLQuery( "delete ev from EIGENVECTOR ev where ev.PRINCIPAL_COMPONENT_ANALYSIS_FK = :id" ) .setParameter( "id", entity.getId() ) .executeUpdate(); + entity.setEigenVectors( new HashSet<>() ); getSessionFactory().getCurrentSession() .createSQLQuery( "delete pl from PROBE_LOADING pl where pl.PRINCIPAL_COMPONENT_ANALYSIS_FK = :id" ) .setParameter( "id", entity.getId() ) .executeUpdate(); + entity.setProbeLoadings( new HashSet<>() ); - // re-retrieve the PCA from the database - entity = load( entity.getId() ); - if ( entity != null ) { - super.remove( entity ); - } + super.remove( entity ); } } From 21ac5b9fe7e53c4022db3cdcef72282f9d05dd52 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 17:40:07 -0400 Subject: [PATCH 52/99] Fix 400 error when no FVs need attention RandomUtils.nextInt() cannot handle zeroes after 4bfa2b2e8850afd923e93c9967b4f32c157f579b. --- .../expression/experiment/ExperimentalDesignDaoImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java index f246a9d51f..c18c5a38d7 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExperimentalDesignDaoImpl.java @@ -75,6 +75,8 @@ public ExperimentalDesign getRandomExperimentalDesignThatNeedsAttention( Experim + "join ef.factorValues fv where ed.id != :edId and fv.needsAttention = true" ) .setParameter( "edId", excludedDesign.getId() ) .uniqueResult(); + if (numThatNeedsAttention == 0) + return null; return ( ExperimentalDesign ) getSessionFactory().getCurrentSession() .createQuery( "select distinct ed from ExperimentalDesign ed join ed.experimentalFactors ef " + "join ef.factorValues fv where ed.id != :edId and fv.needsAttention = true" ) From bafb8e49db2469cd7a9f1ea8072eef136cac48a9 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 29 Jul 2024 17:51:14 -0400 Subject: [PATCH 53/99] Add a log category for 'handled' exceptions This makes it easier to debug Web-related exceptions by logging all handled exceptions to 'ubic.gemma.web.loggers.HandledException'. --- .../web/util/ClientAbortExceptionResolver.java | 6 +++--- .../web/util/UnhandledExceptionResolver.java | 2 +- .../src/main/webapp/WEB-INF/gemma-servlet.xml | 9 +++++++-- .../java/ubic/gemma/web/util/BaseWebTest.java | 15 +++++++++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/gemma-web/src/main/java/ubic/gemma/web/util/ClientAbortExceptionResolver.java b/gemma-web/src/main/java/ubic/gemma/web/util/ClientAbortExceptionResolver.java index 43de07debf..b3b5d643aa 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/util/ClientAbortExceptionResolver.java +++ b/gemma-web/src/main/java/ubic/gemma/web/util/ClientAbortExceptionResolver.java @@ -1,7 +1,7 @@ package ubic.gemma.web.util; -import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -12,10 +12,10 @@ * This is only applicable to Tomcat. * @author poirigui */ -public class ClientAbortExceptionResolver implements HandlerExceptionResolver { +public class ClientAbortExceptionResolver extends AbstractHandlerExceptionResolver { @Override - public ModelAndView resolveException( HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex ) { + protected ModelAndView doResolveException( HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex ) { if ( "org.apache.catalina.connector.ClientAbortException".equals( ex.getClass().getName() ) ) { return new ModelAndView(); } diff --git a/gemma-web/src/main/java/ubic/gemma/web/util/UnhandledExceptionResolver.java b/gemma-web/src/main/java/ubic/gemma/web/util/UnhandledExceptionResolver.java index 90d6b3b242..be968e6e86 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/util/UnhandledExceptionResolver.java +++ b/gemma-web/src/main/java/ubic/gemma/web/util/UnhandledExceptionResolver.java @@ -30,7 +30,7 @@ public class UnhandledExceptionResolver implements HandlerExceptionResolver { @Override public ModelAndView resolveException( HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex ) { - if ( this.errorLogger != null ) { + if ( this.errorLogger != null && this.errorLogger.isErrorEnabled() ) { this.errorLogger.error( "An unhandled exception was intercepted: " + ExceptionUtils.getRootCauseMessage( ex ), ex ); } return delegate.resolveException( request, response, handler, ex ); diff --git a/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml b/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml index f09884b6f0..982ab6e51f 100644 --- a/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml +++ b/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml @@ -105,7 +105,9 @@ - + + + @@ -124,9 +126,12 @@ error/400 + - + + + diff --git a/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java b/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java index 4483dd65ba..8e3be6e090 100644 --- a/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java +++ b/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java @@ -35,13 +35,21 @@ public abstract class BaseWebTest extends AbstractJUnit4SpringContextTests { public abstract static class BaseWebTestContextConfiguration { + private static final String HANDLED_EXCEPTION_LOGGER_NAME = "ubic.gemma.web.loggers.HandledException"; + @Bean public HandlerExceptionResolver exceptionResolver() { HandlerExceptionResolverComposite compositeResolver = new HandlerExceptionResolverComposite(); - compositeResolver.setExceptionResolvers( Arrays.asList( new DefaultHandlerExceptionResolver(), simpleMappingExceptionResolver(), clientAbortExceptionResolver(), unhandledExceptionResolver() ) ); + compositeResolver.setExceptionResolvers( Arrays.asList( springExceptionResolver(), simpleMappingExceptionResolver(), clientAbortExceptionResolver(), unhandledExceptionResolver() ) ); return compositeResolver; } + private DefaultHandlerExceptionResolver springExceptionResolver() { + DefaultHandlerExceptionResolver resolver = new DefaultHandlerExceptionResolver(); + resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); + return resolver; + } + private SimpleMappingExceptionResolver simpleMappingExceptionResolver() { SimpleMappingExceptionResolver resolver = new SimpleMappingExceptionResolver(); resolver.setDefaultErrorView( "error/500" ); @@ -56,11 +64,14 @@ private SimpleMappingExceptionResolver simpleMappingExceptionResolver() { mappings.setProperty( ServiceUnavailableException.class.getName(), "error/503" ); mappings.setProperty( IllegalArgumentException.class.getName(), "error/400" ); resolver.setExceptionMappings( mappings ); + resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); return resolver; } private ClientAbortExceptionResolver clientAbortExceptionResolver() { - return new ClientAbortExceptionResolver(); + ClientAbortExceptionResolver resolver = new ClientAbortExceptionResolver(); + resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); + return resolver; } private UnhandledExceptionResolver unhandledExceptionResolver() { From ff95d9ebb7ef04a938abd7de89f794936427cfb0 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 10:34:34 -0400 Subject: [PATCH 54/99] Unify XML and Java configurations for error handling --- .../util/DefaultHandlerExceptionResolver.java | 77 +++++++++++++++++++ .../web/util/ServiceUnavailableException.java | 6 ++ .../src/main/webapp/WEB-INF/gemma-servlet.xml | 41 +--------- .../java/ubic/gemma/web/util/BaseWebTest.java | 50 +----------- 4 files changed, 85 insertions(+), 89 deletions(-) create mode 100644 gemma-web/src/main/java/ubic/gemma/web/util/DefaultHandlerExceptionResolver.java diff --git a/gemma-web/src/main/java/ubic/gemma/web/util/DefaultHandlerExceptionResolver.java b/gemma-web/src/main/java/ubic/gemma/web/util/DefaultHandlerExceptionResolver.java new file mode 100644 index 0000000000..1b4eca8468 --- /dev/null +++ b/gemma-web/src/main/java/ubic/gemma/web/util/DefaultHandlerExceptionResolver.java @@ -0,0 +1,77 @@ +package ubic.gemma.web.util; + +import org.springframework.security.access.AccessDeniedException; +import org.springframework.web.servlet.HandlerExceptionResolver; +import org.springframework.web.servlet.handler.HandlerExceptionResolverComposite; +import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver; + +import java.util.Arrays; +import java.util.Properties; + +/** + * Custom exception resolver for Gemma. + *

+ * This extends {@link org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver} with additional + * handling of exceptions. + */ +public class DefaultHandlerExceptionResolver extends HandlerExceptionResolverComposite implements HandlerExceptionResolver { + + private static final String HANDLED_EXCEPTION_LOGGER_NAME = "ubic.gemma.web.loggers.HandledException"; + private static final String UNHANDLED_EXCEPTION_LOGGER_NAME = "ubic.gemma.web.loggers.UnhandledException"; + + public DefaultHandlerExceptionResolver() { + setExceptionResolvers( Arrays.asList( + springExceptionResolver(), + simpleMappingExceptionResolver(), + clientAbortExceptionResolver(), + unhandledExceptionResolver() ) ); + } + + /** + * For all Spring-specific exceptions. + */ + private org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver springExceptionResolver() { + org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver resolver = new org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver(); + resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); + return resolver; + } + + /** + * Handle common exceptions used in Gemma Web. + */ + private SimpleMappingExceptionResolver simpleMappingExceptionResolver() { + SimpleMappingExceptionResolver resolver = new SimpleMappingExceptionResolver(); + resolver.addStatusCode( "error/400", 400 ); + resolver.addStatusCode( "error/403", 403 ); + resolver.addStatusCode( "error/404", 404 ); + resolver.addStatusCode( "error/503", 503 ); + Properties mappings = new Properties(); + mappings.setProperty( AccessDeniedException.class.getName(), "error/403" ); + mappings.setProperty( EntityNotFoundException.class.getName(), "error/404" ); + mappings.setProperty( ServiceUnavailableException.class.getName(), "error/503" ); + mappings.setProperty( IllegalArgumentException.class.getName(), "error/400" ); + resolver.setExceptionMappings( mappings ); + resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); + return resolver; + } + + /** + * This is specific to Tomcat, it produces an empty view when a client aborts the HTTP connection. + */ + private ClientAbortExceptionResolver clientAbortExceptionResolver() { + ClientAbortExceptionResolver resolver = new ClientAbortExceptionResolver(); + resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); + return resolver; + } + + /** + * Covers all unhandled exception by logging them and producing a 500 error. + */ + private UnhandledExceptionResolver unhandledExceptionResolver() { + UnhandledExceptionResolver resolver = new UnhandledExceptionResolver(); + resolver.setErrorCategory( UNHANDLED_EXCEPTION_LOGGER_NAME ); + resolver.setStatusCode( 500 ); + resolver.setErrorView( "error/500" ); + return resolver; + } +} diff --git a/gemma-web/src/main/java/ubic/gemma/web/util/ServiceUnavailableException.java b/gemma-web/src/main/java/ubic/gemma/web/util/ServiceUnavailableException.java index dd9a61fe7d..aa0120d27a 100644 --- a/gemma-web/src/main/java/ubic/gemma/web/util/ServiceUnavailableException.java +++ b/gemma-web/src/main/java/ubic/gemma/web/util/ServiceUnavailableException.java @@ -1,5 +1,11 @@ package ubic.gemma.web.util; +/** + * Exception raised when a service is unavailable. + *

+ * This is translated to a 503 error by the exception resolver. + * @author poirigui + */ public class ServiceUnavailableException extends RuntimeException { public ServiceUnavailableException( String message ) { diff --git a/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml b/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml index 982ab6e51f..bcff268865 100644 --- a/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml +++ b/gemma-web/src/main/webapp/WEB-INF/gemma-servlet.xml @@ -101,46 +101,7 @@ - - - - - - - - - - - - 400 - 403 - 404 - 503 - - - - - error/403 - error/404 - error/503 - error/400 - - - - - - - - - - - - - - - - - + diff --git a/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java b/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java index 8e3be6e090..30b92f5728 100644 --- a/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java +++ b/gemma-web/src/test/java/ubic/gemma/web/util/BaseWebTest.java @@ -2,7 +2,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; -import org.springframework.security.access.AccessDeniedException; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import org.springframework.test.context.web.WebAppConfiguration; @@ -12,15 +11,9 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.HandlerExceptionResolver; -import org.springframework.web.servlet.handler.HandlerExceptionResolverComposite; -import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver; -import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver; import ubic.gemma.core.context.EnvironmentProfiles; import ubic.gemma.core.util.MailEngine; -import java.util.Arrays; -import java.util.Properties; - import static org.mockito.Mockito.mock; /** @@ -35,52 +28,11 @@ public abstract class BaseWebTest extends AbstractJUnit4SpringContextTests { public abstract static class BaseWebTestContextConfiguration { - private static final String HANDLED_EXCEPTION_LOGGER_NAME = "ubic.gemma.web.loggers.HandledException"; - @Bean public HandlerExceptionResolver exceptionResolver() { - HandlerExceptionResolverComposite compositeResolver = new HandlerExceptionResolverComposite(); - compositeResolver.setExceptionResolvers( Arrays.asList( springExceptionResolver(), simpleMappingExceptionResolver(), clientAbortExceptionResolver(), unhandledExceptionResolver() ) ); - return compositeResolver; + return new DefaultHandlerExceptionResolver(); } - private DefaultHandlerExceptionResolver springExceptionResolver() { - DefaultHandlerExceptionResolver resolver = new DefaultHandlerExceptionResolver(); - resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); - return resolver; - } - - private SimpleMappingExceptionResolver simpleMappingExceptionResolver() { - SimpleMappingExceptionResolver resolver = new SimpleMappingExceptionResolver(); - resolver.setDefaultErrorView( "error/500" ); - resolver.addStatusCode( "error/400", 400 ); - resolver.addStatusCode( "error/403", 403 ); - resolver.addStatusCode( "error/404", 404 ); - resolver.addStatusCode( "error/500", 500 ); - resolver.addStatusCode( "error/503", 503 ); - Properties mappings = new Properties(); - mappings.setProperty( AccessDeniedException.class.getName(), "error/403" ); - mappings.setProperty( EntityNotFoundException.class.getName(), "error/404" ); - mappings.setProperty( ServiceUnavailableException.class.getName(), "error/503" ); - mappings.setProperty( IllegalArgumentException.class.getName(), "error/400" ); - resolver.setExceptionMappings( mappings ); - resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); - return resolver; - } - - private ClientAbortExceptionResolver clientAbortExceptionResolver() { - ClientAbortExceptionResolver resolver = new ClientAbortExceptionResolver(); - resolver.setWarnLogCategory( HANDLED_EXCEPTION_LOGGER_NAME ); - return resolver; - } - - private UnhandledExceptionResolver unhandledExceptionResolver() { - UnhandledExceptionResolver resolver = new UnhandledExceptionResolver(); - resolver.setErrorCategory( "ubic.gemma.web.loggers.UnhandledException" ); - resolver.setStatusCode( 500 ); - resolver.setErrorView( "error/500" ); - return resolver; - } @Bean public MessageUtil messageUtil() { From c93f0cc1d925ebe528d1e692c2f87ff452bd6c28 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 11:01:45 -0400 Subject: [PATCH 55/99] Align lazy-initialization behaviour with Spring Boot Exclude infrastructure beans and mark the post-processor as high-precedence. --- .../context/LazyInitByDefaultPostProcessor.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/context/LazyInitByDefaultPostProcessor.java b/gemma-core/src/main/java/ubic/gemma/core/context/LazyInitByDefaultPostProcessor.java index e087405623..528ec5c57f 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/context/LazyInitByDefaultPostProcessor.java +++ b/gemma-core/src/main/java/ubic/gemma/core/context/LazyInitByDefaultPostProcessor.java @@ -7,6 +7,7 @@ import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.annotation.Lazy; +import org.springframework.core.Ordered; import org.springframework.core.type.MethodMetadata; import java.util.Set; @@ -18,11 +19,15 @@ * Beans annotated with {@link Lazy} or annotated with the {@code ubic.gemma.core.context.LazyInitByDefaultPostProcessor.ignore} * attribute are excluded. *

+ * Beans part of the infrastructure role are excluded. + *

* This is a necessary workaround because Spring 3 does not support lazy-by-default for annotated components. + *

+ * Spring Boot provides a similar functionality with LazyInitializationBeanFactoryPostProcessor. * @author poirigui */ @CommonsLog -public class LazyInitByDefaultPostProcessor implements BeanFactoryPostProcessor { +public class LazyInitByDefaultPostProcessor implements BeanFactoryPostProcessor, Ordered { private static final String IGNORE_ATTRIBUTE = "ubic.gemma.core.context.LazyInitByDefaultPostProcessor.ignore"; @@ -38,6 +43,10 @@ public void postProcessBeanFactory( ConfigurableListableBeanFactory beanFactory log.debug( "Ignoring " + formatBeanDefinition( beanName, def ) + " marked as ignored with " + IGNORE_ATTRIBUTE + "." ); continue; } + if ( def.getRole() == BeanDefinition.ROLE_INFRASTRUCTURE ) { + log.debug( "Ignoring infrastructure bean " + formatBeanDefinition( beanName, def ) ); + continue; + } if ( def.isLazyInit() ) { log.debug( "Ignoring " + formatBeanDefinition( beanName, def ) + " already lazy-init." ); continue; @@ -66,6 +75,11 @@ public void postProcessBeanFactory( ConfigurableListableBeanFactory beanFactory log.debug( "Marked the following beans as lazy-init: " + String.join( ", ", markedAsLazyInitBeans ) ); } + @Override + public int getOrder() { + return HIGHEST_PRECEDENCE; + } + private String formatBeanDefinition( String beanName, BeanDefinition def ) { return beanName + ( def.getBeanClassName() != null ? " [" + def.getBeanClassName() + ( def.getFactoryMethodName() != null ? "#" + def.getFactoryMethodName() + "()" : "" ) + "]" : "" ); } From 721827ba18c6d9f848694b6f85e279c24cd99ad3 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 11:42:27 -0400 Subject: [PATCH 56/99] Downgrade sitemesh to 2.5.0 2.6+ requires Java 17 and Jakarta. --- gemma-web/pom.xml | 3 ++- pom.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gemma-web/pom.xml b/gemma-web/pom.xml index d9c4824468..5afb3db1fe 100644 --- a/gemma-web/pom.xml +++ b/gemma-web/pom.xml @@ -206,7 +206,8 @@ opensymphony sitemesh - 2.6.0 + + 2.5.0 runtime diff --git a/pom.xml b/pom.xml index 46b9e63729..503e1e9bf7 100644 --- a/pom.xml +++ b/pom.xml @@ -638,6 +638,7 @@ javax.ws.rs:javax.ws.rs-api:* org.antlr:antlr4-runtime:* com.jayway.jsonpath:json-path:* + opensymphony:sitemesh:* org.antlr:antlr4-maven-plugin:* From 70393b740530c0948a7b289dcc18c4aad2897ea2 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 15:34:02 -0400 Subject: [PATCH 57/99] Make factors lazy-loaded in ContrastResult and optimize querying results for the TSV output Prefer IDs and proxies as much as possible when populating baselines. Add an index on DEA results's corrected P-values which are commonly ordered by. Add an index on AnalysisResultSet's class. --- .../analysis/expression/diff/Baseline.java | 18 +-- .../diff/ContrastResultValueObject.java | 20 ++- .../diff/DifferentialExpressionResultDao.java | 4 +- .../DifferentialExpressionResultDaoImpl.java | 58 +++++++-- .../DifferentialExpressionResultService.java | 4 +- ...fferentialExpressionResultServiceImpl.java | 4 +- .../diff/ExpressionAnalysisResultSetDao.java | 9 +- .../ExpressionAnalysisResultSetDaoImpl.java | 116 ++++++++++++------ .../ExpressionAnalysisResultSetService.java | 4 +- ...xpressionAnalysisResultSetServiceImpl.java | 8 +- .../src/main/resources/sql/init-entities.sql | 6 + .../expression/diff/ContrastResult.hbm.xml | 4 +- .../DifferentialExpressionResultDaoTest.java | 12 +- .../ubic/gemma/rest/DatasetsWebService.java | 8 +- .../gemma/rest/DatasetsWebServiceTest.java | 4 +- 15 files changed, 195 insertions(+), 84 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java index de0c9455d0..2e3b336703 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java @@ -18,7 +18,7 @@ public class Baseline { * Create a baseline for a single categorical factor. */ public static Baseline categorical( FactorValue fv ) { - if ( Hibernate.isInitialized( fv.getExperimentalFactor() ) ) { + if ( Hibernate.isInitialized( fv ) && Hibernate.isInitialized( fv.getExperimentalFactor() ) ) { Assert.isTrue( fv.getExperimentalFactor().getType().equals( FactorType.CATEGORICAL ), "A categorical baseline must belong to a categorical factor." ); } @@ -29,14 +29,16 @@ public static Baseline categorical( FactorValue fv ) { * Create a baseline for an interaction of factors. */ public static Baseline interaction( FactorValue fv1, FactorValue fv2 ) { - // IDs can be safely retrieved for proxies - Assert.isTrue( !Objects.equals( fv1.getExperimentalFactor().getId(), fv2.getExperimentalFactor().getId() ), - "An interaction must be of two different experimental factors." ); - if ( Hibernate.isInitialized( fv1.getExperimentalFactor() ) ) { + if ( Hibernate.isInitialized( fv1 ) && Hibernate.isInitialized( fv2 ) ) { + // IDs can be safely retrieved for proxies + Assert.isTrue( !Objects.equals( fv1.getExperimentalFactor().getId(), fv2.getExperimentalFactor().getId() ), + "An interaction must be of two different experimental factors." ); + } + if ( Hibernate.isInitialized( fv1 ) && Hibernate.isInitialized( fv1.getExperimentalFactor() ) ) { Assert.isTrue( fv1.getExperimentalFactor().getType().equals( FactorType.CATEGORICAL ), "A categorical baseline must belong to a categorical factor." ); } - if ( Hibernate.isInitialized( fv2.getExperimentalFactor() ) ) { + if ( Hibernate.isInitialized( fv2 ) && Hibernate.isInitialized( fv2.getExperimentalFactor() ) ) { Assert.isTrue( fv2.getExperimentalFactor().getType().equals( FactorType.CATEGORICAL ), "A categorical baseline must belong to a categorical factor." ); } @@ -52,7 +54,7 @@ private Baseline( FactorValue fv ) { this.secondFactorValue = null; } - private Baseline( FactorValue fv1, FactorValue fv2 ) { + private Baseline( FactorValue fv1, @Nullable FactorValue fv2 ) { this.factorValue = fv1; this.secondFactorValue = fv2; } @@ -90,6 +92,6 @@ public int hashCode() { @Override public String toString() { - return "Baseline for " + factorValue + ( secondFactorValue != null ? ":" + secondFactorValue : "" ); + return "Baseline for " + factorValue.getId() + ( secondFactorValue != null ? ":" + secondFactorValue.getId() : "" ); } } diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java index 750c99046d..819fe10d11 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java @@ -1,8 +1,10 @@ package ubic.gemma.model.analysis.expression.diff; +import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Getter; import lombok.Setter; import lombok.ToString; +import org.hibernate.Hibernate; import ubic.gemma.model.common.IdentifiableValueObject; import ubic.gemma.model.expression.experiment.FactorValueBasicValueObject; @@ -19,7 +21,13 @@ public class ContrastResultValueObject extends IdentifiableValueObject findByGeneAndExperimentAnalyzed( @@ -59,7 +60,8 @@ List findByGeneAndExperimentAnalyzed( @Nullable Map experimentAnalyzedIdMap, @Nullable Map baselineMap, double threshold, - boolean keepNonSpecificProbes ); + boolean keepNonSpecificProbes, + boolean initializeFactorValues ); /** * Find differential expression for a gene in given data sets, exceeding a given significance level (using the diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java index 0df33e3bbf..2d02e4f49d 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java @@ -93,13 +93,15 @@ public List findByGeneAndExperimentAnalyze @Nullable Map experimentAnalyzedIdMap, @Nullable Map baselineMap, double threshold, - boolean keepNonSpecificProbes ) { + boolean keepNonSpecificProbes, + boolean initializeFactorValues ) { Assert.notNull( gene.getId(), "The gene must have a non-null ID." ); Assert.isTrue( threshold >= 0.0 && threshold <= 1.0, "Threshold must be in the [0, 1] interval." ); if ( experimentAnalyzedIds.isEmpty() ) { return Collections.emptyList(); } StopWatch timer = StopWatch.createStarted(); + StopWatch retrieveProbesTimer = StopWatch.createStarted(); //noinspection unchecked List probeIds = getSessionFactory().getCurrentSession() .createSQLQuery( "select CS from GENE2CS where GENE = :geneId" @@ -108,10 +110,12 @@ public List findByGeneAndExperimentAnalyze .addScalar( "CS", StandardBasicTypes.LONG ) .setParameter( "geneId", gene.getId() ) .list(); + retrieveProbesTimer.stop(); if ( probeIds.isEmpty() ) { log.warn( String.format( "%s has no associated probes in the GENE2CS table, no differential expression results will be returned.", gene ) ); return Collections.emptyList(); } + StopWatch retrieveBioAssayIdsTimer = StopWatch.createStarted(); Set bioAssaySetIds = new HashSet<>( experimentAnalyzedIds ); Map subsetIdToExperimentId = null; // create a mapping of subset ID to source experiment ID @@ -129,8 +133,10 @@ public List findByGeneAndExperimentAnalyze + " where eess.sourceExperiment.id in :eeIds or eess.id in :eeIds" ), "eeIds", experimentAnalyzedIds, 2048 ); bioAssaySetIds.addAll( subsetIds ); } + retrieveBioAssayIdsTimer.stop(); + StopWatch retrieveResultsTimer = StopWatch.createStarted(); Query query = getSessionFactory().getCurrentSession() - .createQuery( "select dear, dea.experimentAnalyzed.id" + ( baselineMap != null ? ", b, be.type" : "" ) + " from DifferentialExpressionAnalysisResult dear " + .createQuery( "select dear, dea.experimentAnalyzed.id" + ( baselineMap != null ? ", b.id, be.type" : "" ) + " from DifferentialExpressionAnalysisResult dear " + "join dear.resultSet dears " + "join dears.analysis dea " + ( baselineMap != null ? "left join dears.baselineGroup b left join b.experimentalFactor be " : "" ) @@ -142,12 +148,36 @@ public List findByGeneAndExperimentAnalyze .setParameterList( "probeIds", optimizeParameterList( probeIds ) ) .setParameter( "threshold", threshold ); List result = QueryUtils.listByBatch( query, "bioAssaySetIds", bioAssaySetIds, 2048 ); + retrieveResultsTimer.stop(); List rs = new ArrayList<>( result.size() ); int warns = 0; + // using separate loops ensure that hibernate can batch-initialize without interleaving queries + StopWatch probeInitializationTimer = StopWatch.createStarted(); for ( Object[] row : result ) { DifferentialExpressionAnalysisResult r = ( DifferentialExpressionAnalysisResult ) row[0]; Hibernate.initialize( r.getProbe() ); + } + probeInitializationTimer.stop(); + + StopWatch contrastInitializationTimer = StopWatch.createStarted(); + for ( Object[] row : result ) { + DifferentialExpressionAnalysisResult r = ( DifferentialExpressionAnalysisResult ) row[0]; Hibernate.initialize( r.getContrasts() ); + } + contrastInitializationTimer.stop(); + + if ( initializeFactorValues ) { + for ( Object[] row : result ) { + DifferentialExpressionAnalysisResult r = ( DifferentialExpressionAnalysisResult ) row[0]; + for ( ContrastResult c : r.getContrasts() ) { + Hibernate.initialize( c.getFactorValue() ); + Hibernate.initialize( c.getSecondFactorValue() ); + } + } + } + + for ( Object[] row : result ) { + DifferentialExpressionAnalysisResult r = ( DifferentialExpressionAnalysisResult ) row[0]; Long bioAssaySetId = ( Long ) row[1]; rs.add( r ); if ( sourceExperimentIdMap != null ) { @@ -158,16 +188,18 @@ public List findByGeneAndExperimentAnalyze } if ( baselineMap != null ) { // TODO: add support for interaction of factors, requires https://github.com/PavlidisLab/Gemma/issues/1122 - FactorValue baseline = ( FactorValue ) row[2]; + Long baselineId = ( Long ) row[2]; FactorType baselineType = ( FactorType ) row[3]; - if ( baseline != null ) { + if ( baselineId != null ) { + // create a proxy, cheap if ( baselineType.equals( FactorType.CATEGORICAL ) ) { + FactorValue baseline = ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, baselineId ); baselineMap.put( r, Baseline.categorical( baseline ) ); } else { // we have a few experiments with continuous factors with a baseline set in the result set, this // is incorrect and is being tracked in https://github.com/PavlidisLab/GemmaCuration/issues/530 - String msg = String.format( "Unexpected factor type for baseline %s of %s: %s, it should be categorical.", - baseline, r, baselineType ); + String msg = String.format( "Unexpected factor type for baseline FactorValue Id=%d of %s: %s, it should be categorical.", + baselineId, r, baselineType ); if ( warns < 5 ) { log.warn( msg ); warns++; @@ -182,11 +214,21 @@ public List findByGeneAndExperimentAnalyze } } } + if ( baselineMap != null && initializeFactorValues ) { + for ( Baseline baseline : baselineMap.values() ) { + Hibernate.initialize( baseline.getFactorValue() ); + Hibernate.initialize( baseline.getSecondFactorValue() ); + } + } // because of batching, results must be resorted rs.sort( Comparator.comparing( DifferentialExpressionAnalysisResult::getCorrectedPvalue, Comparator.nullsLast( Comparator.naturalOrder() ) ) ); if ( timer.getTime() > 1000 ) { - log.warn( String.format( "Retrieving %d diffex results for %s took %d ms", - rs.size(), gene, timer.getTime() ) ); + log.warn( String.format( "Retrieving %d diffex results for %s took %d ms (retrieving probes from genes: %d ms, retrieving subsets: %d ms, retrieving results: %d ms, initializing contrasts: %d ms, initializing probes: %d ms)", + rs.size(), gene, timer.getTime(), + retrieveProbesTimer.getTime(), + retrieveBioAssayIdsTimer.getTime(), + retrieveResultsTimer.getTime(), + contrastInitializationTimer.getTime(), probeInitializationTimer.getTime() ) ); } return rs; } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultService.java index 5593c13f28..7962b3defc 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultService.java @@ -39,10 +39,10 @@ public interface DifferentialExpressionResultService extends BaseReadOnlyService { /** - * @see DifferentialExpressionResultDao#findByGeneAndExperimentAnalyzed(Gene, Collection, boolean, Map, Map, Map, double, boolean) + * @see DifferentialExpressionResultDao#findByGeneAndExperimentAnalyzed(Gene, Collection, boolean, Map, Map, Map, double, boolean, boolean) */ @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY" }) - List findByGeneAndExperimentAnalyzed( Gene gene, Collection experimentAnalyzedIds, Map sourceExperimentIdMap, Map experimentAnalyzedIdMap, Map baselineMap, double threshold, boolean keepNonSpecific ); + List findByGeneAndExperimentAnalyzed( Gene gene, Collection experimentAnalyzedIds, Map sourceExperimentIdMap, Map experimentAnalyzedIdMap, Map baselineMap, double threshold, boolean keepNonSpecific, boolean initializeFactorValues ); /** * Given a list of experiments and a threshold value finds all the probes that met the cut off in the given diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultServiceImpl.java index 872baf84cf..32a543bed7 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultServiceImpl.java @@ -49,8 +49,8 @@ public DifferentialExpressionResultServiceImpl( DifferentialExpressionResultDao @Override @Transactional(readOnly = true) - public List findByGeneAndExperimentAnalyzed( Gene gene, Collection experimentAnalyzedIds, Map sourceExperimentIdMap, Map experimentAnalyzedIdMap, Map baselineMap, double threshold, boolean keepNonSpecific ) { - return DERDao.findByGeneAndExperimentAnalyzed( gene, experimentAnalyzedIds, true, sourceExperimentIdMap, experimentAnalyzedIdMap, baselineMap, threshold, keepNonSpecific ); + public List findByGeneAndExperimentAnalyzed( Gene gene, Collection experimentAnalyzedIds, Map sourceExperimentIdMap, Map experimentAnalyzedIdMap, Map baselineMap, double threshold, boolean keepNonSpecific, boolean initializeFactorValues ) { + return DERDao.findByGeneAndExperimentAnalyzed( gene, experimentAnalyzedIds, true, sourceExperimentIdMap, experimentAnalyzedIdMap, baselineMap, threshold, keepNonSpecific, initializeFactorValues ); } @Override diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java index 71512f6443..cf08e74dd8 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java @@ -34,7 +34,6 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Set; /** * @see ExpressionAnalysisResultSet @@ -126,12 +125,12 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao getBaselines( Collection resultSets ); + Map getBaselinesForInteractions( Collection resultSets ); /** - * Retrieve baselines using result set IDs. + * Retrieve baselines using result set IDs representing factor interactions. */ - Map getBaselinesByIds( Collection ids ); + Map getBaselinesForInteractionsByIds( Collection ids ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index da89710b21..efbdb6740d 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -18,6 +18,7 @@ */ package ubic.gemma.persistence.service.analysis.expression.diff; +import lombok.Value; import lombok.extern.apachecommons.CommonsLog; import org.apache.commons.lang3.time.StopWatch; import org.hibernate.*; @@ -46,6 +47,7 @@ import java.util.stream.Collectors; import static ubic.gemma.persistence.service.maintenance.TableMaintenanceUtil.GENE2CS_QUERY_SPACE; +import static ubic.gemma.persistence.util.QueryUtils.listByBatch; import static ubic.gemma.persistence.util.QueryUtils.optimizeParameterList; /** @@ -95,10 +97,19 @@ public ExpressionAnalysisResultSet loadWithResultsAndContrasts( Long id ) { + "order by -res.correctedPvalue desc" ) .setParameter( "ears", ears ) .list(); + // using separate loops ensure that hibernate can batch-initialize without interleaving queries for ( DifferentialExpressionAnalysisResult r : results ) { Hibernate.initialize( r.getProbe() ); + } + for ( DifferentialExpressionAnalysisResult r : results ) { Hibernate.initialize( r.getContrasts() ); } + for ( DifferentialExpressionAnalysisResult r : results ) { + for ( ContrastResult cr : r.getContrasts() ) { + Hibernate.initialize( cr.getFactorValue() ); + Hibernate.initialize( cr.getSecondFactorValue() ); + } + } // preserve order of results ears.setResults( new LinkedHashSet<>( results ) ); } @@ -127,10 +138,19 @@ public ExpressionAnalysisResultSet loadWithResultsAndContrasts( Long id, int off .setFirstResult( offset ) .setMaxResults( limit ) .list(); + // using separate loops ensure that hibernate can batch-initialize without interleaving queries for ( DifferentialExpressionAnalysisResult r : results ) { Hibernate.initialize( r.getProbe() ); + } + for ( DifferentialExpressionAnalysisResult r : results ) { Hibernate.initialize( r.getContrasts() ); } + for ( DifferentialExpressionAnalysisResult r : results ) { + for ( ContrastResult cr : r.getContrasts() ) { + Hibernate.initialize( cr.getFactorValue() ); + Hibernate.initialize( cr.getSecondFactorValue() ); + } + } // preserve order of results ears.setResults( new LinkedHashSet<>( results ) ); } @@ -161,10 +181,19 @@ public ExpressionAnalysisResultSet loadWithResultsAndContrasts( Long id, double .setFirstResult( offset ) .setMaxResults( limit ) .list(); + // using separate loops ensure that hibernate can batch-initialize without interleaving queries for ( DifferentialExpressionAnalysisResult r : results ) { Hibernate.initialize( r.getProbe() ); + } + for ( DifferentialExpressionAnalysisResult r : results ) { Hibernate.initialize( r.getContrasts() ); } + for ( DifferentialExpressionAnalysisResult r : results ) { + for ( ContrastResult cr : r.getContrasts() ) { + Hibernate.initialize( cr.getFactorValue() ); + Hibernate.initialize( cr.getSecondFactorValue() ); + } + } // preserve order of results ears.setResults( new LinkedHashSet<>( results ) ); } @@ -274,20 +303,20 @@ public Baseline getBaseline( ExpressionAnalysisResultSet ears ) { return null; } } else { - return getBaselinesInternal( Collections.singleton( ears.getId() ) ).get( ears.getId() ); + return getBaselinesForInteractionsInternal( Collections.singleton( ears.getId() ) ).get( ears.getId() ); } } @Override - public Map getBaselines( Collection resultSets ) { + public Map getBaselinesForInteractions( Collection resultSets ) { Map idMap = EntityUtils.getIdMap( resultSets ); - return getBaselinesInternal( EntityUtils.getIds( resultSets ) ).entrySet().stream() + return getBaselinesForInteractionsInternal( EntityUtils.getIds( resultSets ) ).entrySet().stream() .collect( IdentifiableUtils.toIdentifiableMap( e -> idMap.get( e.getKey() ), Map.Entry::getValue ) ); } @Override - public Map getBaselinesByIds( Collection ids ) { - return getBaselinesInternal( ids ); + public Map getBaselinesForInteractionsByIds( Collection ids ) { + return getBaselinesForInteractionsInternal( ids ); } @Override @@ -421,7 +450,7 @@ private void populateBaselines( List baselines = getBaselinesInternal( EntityUtils.getIds( vosWithMissingBaselines ) ); + Map baselines = getBaselinesForInteractionsInternal( EntityUtils.getIds( vosWithMissingBaselines ) ); for ( DifferentialExpressionAnalysisResultSetValueObject vo : vos ) { Baseline b = baselines.get( vo.getId() ); if ( b != null ) { @@ -434,72 +463,87 @@ private void populateBaselines( List getBaselinesInternal( Collection rsIds ) { + private Map getBaselinesForInteractionsInternal( Collection rsIds ) { if ( rsIds.isEmpty() ) { return Collections.emptyMap(); } // pick baseline groups from other result sets from the same analysis //noinspection unchecked List otherBaselineGroups = getSessionFactory().getCurrentSession() - .createQuery( "select rs.id, otherBg from ExpressionAnalysisResultSet rs " + .createQuery( "select rs.id, otherBg.id, otherBg.experimentalFactor.id from ExpressionAnalysisResultSet rs " + "join rs.analysis a " + "join a.resultSets otherRs " + "join otherRs.baselineGroup otherBg " + "where rs.id in :rsIds and otherRs.id not in :rsIds" ) .setParameterList( "rsIds", optimizeParameterList( rsIds ) ) .list(); + // maps rs ID to [fv ID, ef ID] + Map> baselineMapping = otherBaselineGroups.stream() + .collect( Collectors.groupingBy( row -> ( Long ) row[0], Collectors.mapping( row -> new FactorValueIdAndExperimentalFactorId( ( Long ) row[1], ( Long ) row[2] ), Collectors.toSet() ) ) ); // pick one representative contrasts to order the first and second baseline group consistently - //noinspection unchecked - List representativeContrasts = getSessionFactory().getCurrentSession() - .createQuery( "select rs.id, c from ExpressionAnalysisResultSet rs " - + "join rs.results r join r.contrasts c " + List representativeContrasts = listByBatch( getSessionFactory().getCurrentSession() + .createQuery( "select rs.id, fv.experimentalFactor.id, fv2.experimentalFactor.id from ExpressionAnalysisResultSet rs " + + "join rs.results r " + + "join r.contrasts c " + // A left join is critical for performance, because otherwise the database will scan every + // single contrast results until it finds a non-null one. We know however that they are all + // identical for a given result set. + // This is a problem with continuous factors that do not have FVs set in the CR + + "left join c.factorValue fv " + + "left join c.secondFactorValue fv2 " + "where rs.id in :rsIds " - + "group by rs" ) - .setParameterList( "rsIds", optimizeParameterList( rsIds ) ) - .list(); - Map> baselineMapping = otherBaselineGroups.stream() - .collect( Collectors.groupingBy( row -> ( Long ) row[0], Collectors.mapping( row -> ( FactorValue ) row[1], Collectors.toSet() ) ) ); - Map contrastsMapping = representativeContrasts.stream() - .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( ContrastResult ) row[1] ) ); + + "group by rs" ), "rsIds", rsIds, 128 ); + Map ef1Mapping = representativeContrasts.stream() + .filter( row -> row[1] != null ) + .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[1] ) ); + Map ef2Mapping = representativeContrasts.stream() + .filter( row -> row[2] != null ) + .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[2] ) ); Map results = new HashMap<>(); for ( Long rsId : rsIds ) { - ContrastResult contrast = contrastsMapping.get( rsId ); - if ( contrast == null ) { - log.warn( "Could ont find a representative contrast for ResultSet Id=" + rsId + " to populate its baseline groups." ); - continue; - } - if ( contrast.getFactorValue() == null || contrast.getSecondFactorValue() == null ) { + Long ef1 = ef1Mapping.get( rsId ); + Long ef2 = ef2Mapping.get( rsId ); + if ( ef1 == null || ef2 == null ) { log.warn( "Could not populate baselines for " + rsId + " as its contrasts lack factor values. This is likely a continuous factor." ); // very likely a continuous factor, it does not have a baseline continue; } // I don't think this is allowed - if ( contrast.getFactorValue().getExperimentalFactor().equals( contrast.getSecondFactorValue().getExperimentalFactor() ) ) { + if ( ef1.equals( ef2 ) ) { log.warn( "Could not populate baselines for " + rsId + ", its representative contrast uses the same experimental factor for its first and second factor value." ); continue; } - Set baselines = baselineMapping.get( rsId ); + Set baselines = baselineMapping.get( rsId ); if ( baselines == null || baselines.size() != 2 ) { log.warn( "Could not find two other result sets with baseline for " + rsId + " to populate its baseline groups." ); continue; } - FactorValue firstBaseline = null, secondBaseline = null; - for ( FactorValue fv : baselines ) { - if ( fv.getExperimentalFactor().equals( contrast.getFactorValue().getExperimentalFactor() ) ) { - firstBaseline = fv; + Long firstBaselineId = null, secondBaselineId = null; + for ( FactorValueIdAndExperimentalFactorId fv : baselines ) { + if ( fv.getExperimentalFactorId().equals( ef1 ) ) { + firstBaselineId = fv.getFactorValueId(); } - if ( fv.getExperimentalFactor().equals( contrast.getSecondFactorValue().getExperimentalFactor() ) ) { - secondBaseline = fv; + if ( fv.getExperimentalFactorId().equals( ef2 ) ) { + secondBaselineId = fv.getFactorValueId(); } } - if ( firstBaseline != null && secondBaseline != null ) { - results.put( rsId, Baseline.interaction( firstBaseline, secondBaseline ) ); + if ( firstBaselineId != null && secondBaselineId != null ) { + results.put( rsId, Baseline.interaction( + ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, firstBaselineId ), + ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, secondBaselineId ) ) + ); } else { log.warn( "Could not fill the baseline groups for " + rsId + ": one or more baselines were not found in other result sets from the same analysis." ); } } return results; } + + @Value + private static class FactorValueIdAndExperimentalFactorId { + Long factorValueId; + Long experimentalFactorId; + } } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java index 0c1f425d75..3ffb5aa11c 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java @@ -45,7 +45,7 @@ public interface ExpressionAnalysisResultSetService extends AnalysisResultSetSer Baseline getBaseline( ExpressionAnalysisResultSet ears ); - Map getBaselines( Set resultSets ); + Map getBaselinesForInteractions( Set resultSets ); - Map getBaselinesByIds( Collection rsIds ); + Map getBaselinesForInteractionsByIds( Collection rsIds ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java index 7f8839997d..be318d5794 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java @@ -112,13 +112,13 @@ public Baseline getBaseline( ExpressionAnalysisResultSet ears ) { @Override @Transactional(readOnly = true) - public Map getBaselines( Set resultSets ) { - return voDao.getBaselines( resultSets ); + public Map getBaselinesForInteractions( Set resultSets ) { + return voDao.getBaselinesForInteractions( resultSets ); } @Override @Transactional(readOnly = true) - public Map getBaselinesByIds( Collection rsIds ) { - return voDao.getBaselinesByIds( rsIds ); + public Map getBaselinesForInteractionsByIds( Collection rsIds ) { + return voDao.getBaselinesForInteractionsByIds( rsIds ); } } diff --git a/gemma-core/src/main/resources/sql/init-entities.sql b/gemma-core/src/main/resources/sql/init-entities.sql index 6a23844a3b..49c2726f0a 100644 --- a/gemma-core/src/main/resources/sql/init-entities.sql +++ b/gemma-core/src/main/resources/sql/init-entities.sql @@ -15,6 +15,8 @@ alter table AUDIT_EVENT_TYPE add index AUDIT_EVENT_TYPE_CLASS (class); alter table ANALYSIS add index ANALYSIS_CLASS (class); +alter table ANALYSIS_RESULT_SET + add index ANALYSIS_RESULT_CLASS (class); alter table CHARACTERISTIC add index CHARACTERISTIC_CLASS (class); @@ -26,6 +28,10 @@ alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT add index resultSetProbes (RESULT_SET_FK, PROBE_FK); alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT add index probeResultSets (PROBE_FK, RESULT_SET_FK); +alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT + add index corrpvalbin (CORRECTED_P_VALUE_BIN); +alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT + add index DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_CORRECTED_PVALUE (CORRECTED_PVALUE); alter table CONTACT add index fullname (NAME, LAST_NAME); diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml index d7bfc0439b..984cb6d636 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml @@ -23,11 +23,11 @@ - - diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoTest.java index 9fc69e1202..b4e9ed3d51 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoTest.java @@ -52,13 +52,13 @@ public void testFindByGeneAndExperimentAnalyzedGroupingBySourceExperiment() { .setParameter( 1, cs.getId() ) .setParameter( 2, ad.getId() ) .executeUpdate(); - differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, 1.0, false ); - differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, 1.0, false ); - differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), false, null, null, null, 1.0, false ); - differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), false, null, null, null, 1.0, false ); - assertThatThrownBy( () -> differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, 1.2, false ) ) + differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, 1.0, false, true ); + differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, 1.0, false, true ); + differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), false, null, null, null, 1.0, false, true ); + differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), false, null, null, null, 1.0, false, true ); + assertThatThrownBy( () -> differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, 1.2, false, true ) ) .isInstanceOf( IllegalArgumentException.class ); - assertThatThrownBy( () -> differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, -1, false ) ) + assertThatThrownBy( () -> differentialExpressionResultDao.findByGeneAndExperimentAnalyzed( gene, Collections.singleton( 1L ), true, null, null, null, -1, false, true ) ) .isInstanceOf( IllegalArgumentException.class ); } diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java b/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java index 9148957fc7..8f80c7cd96 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java @@ -838,7 +838,7 @@ private QueriedAndFilteredAndInferredAndPaginatedResponseDataObject experimentAnalyzedIdMap = new HashMap<>(); Map baselineMap = new HashMap<>(); List payload = differentialExpressionResultService - .findByGeneAndExperimentAnalyzed( gene, sliceIds( ids, offset, limit ), sourceExperimentIdMap, experimentAnalyzedIdMap, baselineMap, threshold, false ).stream() + .findByGeneAndExperimentAnalyzed( gene, sliceIds( ids, offset, limit ), sourceExperimentIdMap, experimentAnalyzedIdMap, baselineMap, threshold, false, true ).stream() .map( r -> new DifferentialExpressionAnalysisResultByGeneValueObject( r, sourceExperimentIdMap.get( r ), experimentAnalyzedIdMap.get( r ), baselineMap.get( r ) ) ) .sorted( Comparator.comparing( DifferentialExpressionAnalysisResultByGeneValueObject::getSourceExperimentId ) .thenComparing( DifferentialExpressionAnalysisResultByGeneValueObject::getExperimentAnalyzedId ) @@ -849,7 +849,7 @@ private QueriedAndFilteredAndInferredAndPaginatedResponseDataObject missingBaselines = payload.stream() .filter( vo -> vo.getBaseline() == null ) .map( DifferentialExpressionAnalysisResultByGeneValueObject::getResultSetId ).collect( Collectors.toSet() ); - Map b = expressionAnalysisResultSetService.getBaselinesByIds( missingBaselines ); + Map b = expressionAnalysisResultSetService.getBaselinesForInteractionsByIds( missingBaselines ); for ( DifferentialExpressionAnalysisResultByGeneValueObject r : payload ) { Baseline b2 = b.get( r.getResultSetId() ); if ( b2 == null ) { @@ -928,7 +928,7 @@ private StreamingOutput getDatasetsDifferentialExpressionAnalysisResultsForGeneI Map experimentAnalyzedIdMap = new HashMap<>(); Map baselineMap = new HashMap<>(); //noinspection Convert2MethodRef - List payload = differentialExpressionResultService.findByGeneAndExperimentAnalyzed( gene, ids, sourceExperimentIdMap, experimentAnalyzedIdMap, baselineMap, threshold, false ).stream() + List payload = differentialExpressionResultService.findByGeneAndExperimentAnalyzed( gene, ids, sourceExperimentIdMap, experimentAnalyzedIdMap, baselineMap, threshold, false, false ).stream() .sorted( Comparator.comparing( ( DifferentialExpressionAnalysisResult r ) -> sourceExperimentIdMap.get( r ) ) .thenComparing( ( DifferentialExpressionAnalysisResult r ) -> experimentAnalyzedIdMap.get( r ) ) .thenComparing( ( DifferentialExpressionAnalysisResult r ) -> r.getResultSet().getId() ) ) @@ -938,7 +938,7 @@ private StreamingOutput getDatasetsDifferentialExpressionAnalysisResultsForGeneI .filter( vo -> baselineMap.get( vo ) == null ) .map( DifferentialExpressionAnalysisResult::getResultSet ) .collect( toIdentifiableSet() ); - Map b = expressionAnalysisResultSetService.getBaselines( missingBaselines ); + Map b = expressionAnalysisResultSetService.getBaselinesForInteractions( missingBaselines ); for ( DifferentialExpressionAnalysisResult r : payload ) { Baseline b2 = b.get( r.getResultSet() ); if ( b2 == null ) { diff --git a/gemma-rest/src/test/java/ubic/gemma/rest/DatasetsWebServiceTest.java b/gemma-rest/src/test/java/ubic/gemma/rest/DatasetsWebServiceTest.java index d944c97188..b1ba1cb6ba 100644 --- a/gemma-rest/src/test/java/ubic/gemma/rest/DatasetsWebServiceTest.java +++ b/gemma-rest/src/test/java/ubic/gemma/rest/DatasetsWebServiceTest.java @@ -580,7 +580,7 @@ public void testGetDatasetsDifferentialAnalysisResultsExpressionForGene() { .hasFieldOrPropertyWithValue( "sort.orderBy", "sourceExperimentId" ) .extracting( "groupBy", list( String.class ) ) .containsExactly( "sourceExperimentId", "experimentAnalyzedId", "resultSetId" ); - verify( differentialExpressionResultService ).findByGeneAndExperimentAnalyzed( eq( brca1 ), any(), any(), any(), any(), anyDouble(), eq( false ) ); + verify( differentialExpressionResultService ).findByGeneAndExperimentAnalyzed( eq( brca1 ), any(), any(), any(), any(), anyDouble(), eq( false ), eq( true ) ); } @Test @@ -599,7 +599,7 @@ public void testGetDatasetsDifferentialAnalysisResultsExpressionForGeneInTaxa() .hasFieldOrPropertyWithValue( "sort.orderBy", "sourceExperimentId" ) .extracting( "groupBy", list( String.class ) ) .containsExactly( "sourceExperimentId", "experimentAnalyzedId", "resultSetId" ); - verify( differentialExpressionResultService ).findByGeneAndExperimentAnalyzed( eq( brca1 ), any(), any(), any(), any(), anyDouble(), eq( false ) ); + verify( differentialExpressionResultService ).findByGeneAndExperimentAnalyzed( eq( brca1 ), any(), any(), any(), any(), anyDouble(), eq( false ), eq( true ) ); } @Autowired From 7f1b8e69c348f95022e916667b0d0948af5c7e5c Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 17:15:27 -0400 Subject: [PATCH 58/99] Remove duplicated corrpvalbin and relocate pvalue index in .hbm.xml file --- gemma-core/src/main/resources/sql/init-entities.sql | 4 ---- .../diff/DifferentialExpressionAnalysisResult.hbm.xml | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/gemma-core/src/main/resources/sql/init-entities.sql b/gemma-core/src/main/resources/sql/init-entities.sql index 49c2726f0a..b0956767e4 100644 --- a/gemma-core/src/main/resources/sql/init-entities.sql +++ b/gemma-core/src/main/resources/sql/init-entities.sql @@ -28,10 +28,6 @@ alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT add index resultSetProbes (RESULT_SET_FK, PROBE_FK); alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT add index probeResultSets (PROBE_FK, RESULT_SET_FK); -alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT - add index corrpvalbin (CORRECTED_P_VALUE_BIN); -alter table DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT - add index DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_CORRECTED_PVALUE (CORRECTED_PVALUE); alter table CONTACT add index fullname (NAME, LAST_NAME); diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml index eda53c8b9a..5a18511548 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml @@ -14,7 +14,8 @@ - + From 1c767f705a49fcd1b29cdd6ea803582a35562c22 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 17:40:17 -0400 Subject: [PATCH 59/99] Fix toString() for proxies in Baseline --- .../model/analysis/expression/diff/Baseline.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java index 2e3b336703..fc1ae9c79b 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/Baseline.java @@ -10,6 +10,8 @@ /** * Represents a baseline for a single factor or an interaction of factors. + *

+ * This class is proxy-safe as long as {@link #hashCode()} isn't being used. * @author poirigui */ public class Baseline { @@ -92,6 +94,16 @@ public int hashCode() { @Override public String toString() { - return "Baseline for " + factorValue.getId() + ( secondFactorValue != null ? ":" + secondFactorValue.getId() : "" ); + return "Baseline for " + formatFactorValue( factorValue ) + ( secondFactorValue != null ? ":" + formatFactorValue( secondFactorValue ) : "" ); + } + + private String formatFactorValue( FactorValue fv ) { + if ( Hibernate.isInitialized( fv ) ) { + return String.valueOf( fv.toString() ); + } else if ( fv.getId() != null ) { + return "FactorValue Id=" + fv.getId(); + } else { + return "FactorValue"; + } } } From d2b00b40639e9a89b959733cbda6d56eab7692d9 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 18:01:21 -0400 Subject: [PATCH 60/99] Use batching for finding other result sets --- .../diff/ExpressionAnalysisResultSetDaoImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index efbdb6740d..5cb3eba210 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -48,7 +48,6 @@ import static ubic.gemma.persistence.service.maintenance.TableMaintenanceUtil.GENE2CS_QUERY_SPACE; import static ubic.gemma.persistence.util.QueryUtils.listByBatch; -import static ubic.gemma.persistence.util.QueryUtils.optimizeParameterList; /** * @author Paul @@ -471,14 +470,13 @@ private Map getBaselinesForInteractionsInternal( Collection otherBaselineGroups = getSessionFactory().getCurrentSession() + List otherBaselineGroups = listByBatch( getSessionFactory().getCurrentSession() .createQuery( "select rs.id, otherBg.id, otherBg.experimentalFactor.id from ExpressionAnalysisResultSet rs " + "join rs.analysis a " + "join a.resultSets otherRs " + "join otherRs.baselineGroup otherBg " - + "where rs.id in :rsIds and otherRs.id not in :rsIds" ) - .setParameterList( "rsIds", optimizeParameterList( rsIds ) ) - .list(); + + "where rs.id in :rsIds and otherRs.id not in :rsIds" ), + "rsIds", rsIds, 2048 ); // maps rs ID to [fv ID, ef ID] Map> baselineMapping = otherBaselineGroups.stream() .collect( Collectors.groupingBy( row -> ( Long ) row[0], Collectors.mapping( row -> new FactorValueIdAndExperimentalFactorId( ( Long ) row[1], ( Long ) row[2] ), Collectors.toSet() ) ) ); @@ -494,7 +492,7 @@ private Map getBaselinesForInteractionsInternal( Collection ef1Mapping = representativeContrasts.stream() .filter( row -> row[1] != null ) .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[1] ) ); From a573852edeb1aecd346c524268585293e1d56833 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 19:38:02 -0400 Subject: [PATCH 61/99] Optimize further the retrieval of interaction baselines Perform two native SQL queries to retrieve representative contrasts. --- .../ExpressionAnalysisResultSetDaoImpl.java | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index 5cb3eba210..7dc0827af5 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -48,6 +48,7 @@ import static ubic.gemma.persistence.service.maintenance.TableMaintenanceUtil.GENE2CS_QUERY_SPACE; import static ubic.gemma.persistence.util.QueryUtils.listByBatch; +import static ubic.gemma.persistence.util.QueryUtils.streamByBatch; /** * @author Paul @@ -469,7 +470,6 @@ private Map getBaselinesForInteractionsInternal( Collection otherBaselineGroups = listByBatch( getSessionFactory().getCurrentSession() .createQuery( "select rs.id, otherBg.id, otherBg.experimentalFactor.id from ExpressionAnalysisResultSet rs " + "join rs.analysis a " @@ -480,25 +480,42 @@ private Map getBaselinesForInteractionsInternal( Collection> baselineMapping = otherBaselineGroups.stream() .collect( Collectors.groupingBy( row -> ( Long ) row[0], Collectors.mapping( row -> new FactorValueIdAndExperimentalFactorId( ( Long ) row[1], ( Long ) row[2] ), Collectors.toSet() ) ) ); + // pick one representative contrasts to order the first and second baseline group consistently - List representativeContrasts = listByBatch( getSessionFactory().getCurrentSession() - .createQuery( "select rs.id, fv.experimentalFactor.id, fv2.experimentalFactor.id from ExpressionAnalysisResultSet rs " - + "join rs.results r " - + "join r.contrasts c " + // NOTE: I tried to do this in a single query, but it's just too slow + + // result ID -> result set ID + Map representativeResults = streamByBatch( getSessionFactory().getCurrentSession() + .createSQLQuery( "select dear.ID as RESULT_ID, dear.RESULT_SET_FK as RESULT_SET_ID " + + "from DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT dear " + + "where dear.RESULT_SET_FK in :rsIds " + + "group by dear.RESULT_SET_FK" ) + .addScalar( "RESULT_ID", StandardBasicTypes.LONG ) + .addScalar( "RESULT_SET_ID", StandardBasicTypes.LONG ), "rsIds", rsIds, 2048, Object[].class ) + .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[1] ) ); + + // result ID -> [ef1 ID, ef2 ID] + List representativeContrasts = listByBatch( getSessionFactory().getCurrentSession().createSQLQuery( + "select cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK as RESULT_ID, fv1.EXPERIMENTAL_FACTOR_FK as EF1_ID, fv2.EXPERIMENTAL_FACTOR_FK as EF2_ID " + + "from CONTRAST_RESULT cr " + // A left join is critical for performance, because otherwise the database will scan every // single contrast results until it finds a non-null one. We know however that they are all // identical for a given result set. // This is a problem with continuous factors that do not have FVs set in the CR - + "left join c.factorValue fv " - + "left join c.secondFactorValue fv2 " - + "where rs.id in :rsIds " - + "group by rs" ), "rsIds", rsIds, 2048 ); + "left join FACTOR_VALUE fv1 on cr.FACTOR_VALUE_FK = fv1.ID " + + "left join FACTOR_VALUE fv2 on cr.SECOND_FACTOR_VALUE_FK = fv2.ID " + + "where cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK in :resultIds " + + "group by cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK" ) + .addScalar("RESULT_ID", StandardBasicTypes.LONG) + .addScalar("EF1_ID", StandardBasicTypes.LONG) + .addScalar("EF2_ID", StandardBasicTypes.LONG), "resultIds", representativeResults.keySet(), 2048 ); + Map ef1Mapping = representativeContrasts.stream() .filter( row -> row[1] != null ) - .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[1] ) ); + .collect( Collectors.toMap( row -> representativeResults.get( ( Long ) row[0] ), row -> ( Long ) row[1] ) ); Map ef2Mapping = representativeContrasts.stream() .filter( row -> row[2] != null ) - .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[2] ) ); + .collect( Collectors.toMap( row -> representativeResults.get( ( Long ) row[0] ), row -> ( Long ) row[2] ) ); Map results = new HashMap<>(); for ( Long rsId : rsIds ) { Long ef1 = ef1Mapping.get( rsId ); From 2ebfe6d6c2976a6c4638a84ceba03868ca36d057 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 30 Jul 2024 20:23:01 -0400 Subject: [PATCH 62/99] Initialize baseline factor values if necessary --- .../diff/ExpressionAnalysisResultSetDao.java | 6 ++++-- .../ExpressionAnalysisResultSetDaoImpl.java | 21 ++++++++++++------- .../ExpressionAnalysisResultSetService.java | 4 ++-- ...xpressionAnalysisResultSetServiceImpl.java | 8 +++---- .../ubic/gemma/rest/DatasetsWebService.java | 4 ++-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java index cf08e74dd8..0785b2b282 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java @@ -119,6 +119,8 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao + * Factor values are always initialized. * @return a baseline, or null if none could be determined for the given result set */ @Nullable @@ -127,10 +129,10 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao getBaselinesForInteractions( Collection resultSets ); + Map getBaselinesForInteractions( Collection resultSets, boolean initializeFactorValues ); /** * Retrieve baselines using result set IDs representing factor interactions. */ - Map getBaselinesForInteractionsByIds( Collection ids ); + Map getBaselinesForInteractionsByIds( Collection ids, boolean initializeFactorValues ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index 7dc0827af5..bbd78eca0b 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -303,20 +303,20 @@ public Baseline getBaseline( ExpressionAnalysisResultSet ears ) { return null; } } else { - return getBaselinesForInteractionsInternal( Collections.singleton( ears.getId() ) ).get( ears.getId() ); + return getBaselinesForInteractionsInternal( Collections.singleton( ears.getId() ), true ).get( ears.getId() ); } } @Override - public Map getBaselinesForInteractions( Collection resultSets ) { + public Map getBaselinesForInteractions( Collection resultSets, boolean initializeFactorValues ) { Map idMap = EntityUtils.getIdMap( resultSets ); - return getBaselinesForInteractionsInternal( EntityUtils.getIds( resultSets ) ).entrySet().stream() + return getBaselinesForInteractionsInternal( EntityUtils.getIds( resultSets ), initializeFactorValues ).entrySet().stream() .collect( IdentifiableUtils.toIdentifiableMap( e -> idMap.get( e.getKey() ), Map.Entry::getValue ) ); } @Override - public Map getBaselinesForInteractionsByIds( Collection ids ) { - return getBaselinesForInteractionsInternal( ids ); + public Map getBaselinesForInteractionsByIds( Collection ids, boolean initializeFactorValues ) { + return getBaselinesForInteractionsInternal( ids, initializeFactorValues ); } @Override @@ -450,7 +450,7 @@ private void populateBaselines( List baselines = getBaselinesForInteractionsInternal( EntityUtils.getIds( vosWithMissingBaselines ) ); + Map baselines = getBaselinesForInteractionsInternal( EntityUtils.getIds( vosWithMissingBaselines ), true ); for ( DifferentialExpressionAnalysisResultSetValueObject vo : vos ) { Baseline b = baselines.get( vo.getId() ); if ( b != null ) { @@ -464,8 +464,9 @@ private void populateBaselines( List getBaselinesForInteractionsInternal( Collection rsIds ) { + private Map getBaselinesForInteractionsInternal( Collection rsIds, boolean initializeFactorValues ) { if ( rsIds.isEmpty() ) { return Collections.emptyMap(); } @@ -553,6 +554,12 @@ private Map getBaselinesForInteractionsInternal( Collection getBaselinesForInteractions( Set resultSets ); + Map getBaselinesForInteractions( Set resultSets, boolean initializeFactorValues ); - Map getBaselinesForInteractionsByIds( Collection rsIds ); + Map getBaselinesForInteractionsByIds( Collection rsIds, boolean initializeFactorValues ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java index be318d5794..1ddf56ac31 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java @@ -112,13 +112,13 @@ public Baseline getBaseline( ExpressionAnalysisResultSet ears ) { @Override @Transactional(readOnly = true) - public Map getBaselinesForInteractions( Set resultSets ) { - return voDao.getBaselinesForInteractions( resultSets ); + public Map getBaselinesForInteractions( Set resultSets, boolean initializeFactorValues ) { + return voDao.getBaselinesForInteractions( resultSets, initializeFactorValues ); } @Override @Transactional(readOnly = true) - public Map getBaselinesForInteractionsByIds( Collection rsIds ) { - return voDao.getBaselinesForInteractionsByIds( rsIds ); + public Map getBaselinesForInteractionsByIds( Collection rsIds, boolean initializeFactorValues ) { + return voDao.getBaselinesForInteractionsByIds( rsIds, initializeFactorValues ); } } diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java b/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java index 8f80c7cd96..4efba7b094 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/DatasetsWebService.java @@ -849,7 +849,7 @@ private QueriedAndFilteredAndInferredAndPaginatedResponseDataObject missingBaselines = payload.stream() .filter( vo -> vo.getBaseline() == null ) .map( DifferentialExpressionAnalysisResultByGeneValueObject::getResultSetId ).collect( Collectors.toSet() ); - Map b = expressionAnalysisResultSetService.getBaselinesForInteractionsByIds( missingBaselines ); + Map b = expressionAnalysisResultSetService.getBaselinesForInteractionsByIds( missingBaselines, true ); for ( DifferentialExpressionAnalysisResultByGeneValueObject r : payload ) { Baseline b2 = b.get( r.getResultSetId() ); if ( b2 == null ) { @@ -938,7 +938,7 @@ private StreamingOutput getDatasetsDifferentialExpressionAnalysisResultsForGeneI .filter( vo -> baselineMap.get( vo ) == null ) .map( DifferentialExpressionAnalysisResult::getResultSet ) .collect( toIdentifiableSet() ); - Map b = expressionAnalysisResultSetService.getBaselinesForInteractions( missingBaselines ); + Map b = expressionAnalysisResultSetService.getBaselinesForInteractions( missingBaselines, false ); for ( DifferentialExpressionAnalysisResult r : payload ) { Baseline b2 = b.get( r.getResultSet() ); if ( b2 == null ) { From fc21042aba46f26704b11f463d43ae1dac3098ce Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 12:10:45 -0400 Subject: [PATCH 63/99] Improve serialization of factor and factor values Ensure that all factors are properly initialized when serializing analyses. Never include an experimental factor inside a factor value if the latter is serialized as part of the former. --- .../diff/ContrastResultValueObject.java | 6 +- ...xpressionAnalysisResultSetValueObject.java | 2 +- ...alExpressionAnalysisResultValueObject.java | 8 +- .../diff/ExpressionAnalysisResultSet.java | 3 + .../AbstractFactorValueValueObject.java | 99 +++++++++++++++ .../ExperimentalFactorValueObject.java | 11 +- .../FactorValueBasicValueObject.java | 78 +----------- .../experiment/FactorValueValueObject.java | 113 +++++++----------- .../diff/DifferentialExpressionResultDao.java | 3 +- .../DifferentialExpressionResultDaoImpl.java | 24 +++- .../ExpressionAnalysisResultSetDaoImpl.java | 86 ++++++------- .../ubic/gemma/rest/DatasetsWebService.java | 2 +- ...tractFactorValueValueObjectSerializer.java | 36 +++++- ...FactorValueBasicValueObjectSerializer.java | 16 +-- .../FactorValueValueObjectSerializer.java | 24 ++-- 15 files changed, 258 insertions(+), 253 deletions(-) create mode 100644 gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java index 819fe10d11..a46580bb56 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java @@ -37,14 +37,14 @@ public ContrastResultValueObject() { /** * Create a contrast value object from a given {@link ContrastResult}. */ - public ContrastResultValueObject( ContrastResult contrastResult ) { + public ContrastResultValueObject( ContrastResult contrastResult, boolean includeFactorValue ) { super( contrastResult ); this.pvalue = contrastResult.getPvalue(); this.tStat = contrastResult.getTstat(); this.coefficient = contrastResult.getCoefficient(); this.logFoldChange = contrastResult.getLogFoldChange(); if ( contrastResult.getFactorValue() != null ) { - if ( Hibernate.isInitialized( contrastResult.getFactorValue() ) ) { + if ( includeFactorValue && Hibernate.isInitialized( contrastResult.getFactorValue() ) ) { this.factorValue = new FactorValueBasicValueObject( contrastResult.getFactorValue() ); } else { this.factorValueId = contrastResult.getFactorValue().getId(); @@ -54,7 +54,7 @@ public ContrastResultValueObject( ContrastResult contrastResult ) { } // not all contrast results have a second factor value if ( contrastResult.getSecondFactorValue() != null ) { - if ( Hibernate.isInitialized( contrastResult.getSecondFactorValue() ) ) { + if ( includeFactorValue && Hibernate.isInitialized( contrastResult.getSecondFactorValue() ) ) { this.secondFactorValue = new FactorValueBasicValueObject( contrastResult.getSecondFactorValue() ); } else { this.secondFactorValueId = contrastResult.getSecondFactorValue().getId(); diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java index 9865a3f7de..cde6d8f2b5 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java @@ -57,7 +57,7 @@ public DifferentialExpressionAnalysisResultSetValueObject( ExpressionAnalysisRes this( analysisResultSet ); this.results = analysisResultSet.getResults() .stream() - .map( result -> new DifferentialExpressionAnalysisResultValueObject( result, result2Genes.getOrDefault( result.getId(), Collections.emptyList() ) ) ) + .map( result -> new DifferentialExpressionAnalysisResultValueObject( result, false, result2Genes.getOrDefault( result.getId(), Collections.emptyList() ) ) ) .collect( Collectors.toList() ); } diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java index a151288086..fb37dc421b 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java @@ -48,7 +48,7 @@ public DifferentialExpressionAnalysisResultValueObject() { super(); } - public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result ) { + public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result, boolean includeFactorValues ) { super( result ); // getId() does not initialize proxies this.probeId = result.getProbe().getId(); @@ -60,15 +60,15 @@ public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAn this.rank = result.getRank(); if ( Hibernate.isInitialized( result.getContrasts() ) ) { this.contrasts = result.getContrasts().stream() - .map( ContrastResultValueObject::new ) + .map( c -> new ContrastResultValueObject( c, includeFactorValues ) ) .collect( Collectors.toList() ); } else { this.contrasts = null; } } - public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result, List genes ) { - this( result ); + public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result, boolean includeFactorValues, List genes ) { + this( result, includeFactorValues ); this.genes = genes.stream().map( GeneValueObject::new ).collect( Collectors.toList() ); } } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java index 6a6b0558d8..4d70f8f84a 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ExpressionAnalysisResultSet.java @@ -28,6 +28,7 @@ import ubic.gemma.model.expression.experiment.FactorValue; import ubic.gemma.model.genome.Gene; +import javax.annotation.Nullable; import javax.persistence.Transient; import java.util.HashSet; import java.util.Set; @@ -40,6 +41,7 @@ public class ExpressionAnalysisResultSet extends FactorAssociatedAnalysisResultS private static final long serialVersionUID = 7226901182513177574L; private Integer numberOfProbesTested; private Integer numberOfGenesTested; + @Nullable private FactorValue baselineGroup; private Set results = new HashSet<>(); private DifferentialExpressionAnalysis analysis; @@ -95,6 +97,7 @@ public void setAnalysis( DifferentialExpressionAnalysis analysis ) { * be recognized. For continuous factors, this would be null. For interaction terms we do not compute this so it * will also be null. */ + @Nullable public FactorValue getBaselineGroup() { return this.baselineGroup; } diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java new file mode 100644 index 0000000000..5437c63705 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java @@ -0,0 +1,99 @@ +package ubic.gemma.model.expression.experiment; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Getter; +import lombok.Setter; +import org.hibernate.Hibernate; +import ubic.gemma.model.common.IdentifiableValueObject; +import ubic.gemma.model.common.description.CharacteristicValueObject; +import ubic.gemma.model.common.measurement.MeasurementValueObject; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * The bare minimum to represent a factor value. + *

+ * This class solely exist to get consistent behavior between the deprecated {@link FactorValueValueObject} and its + * replacement {@link FactorValueBasicValueObject}. + * @author poirigui + */ +@Getter +@Setter +public abstract class AbstractFactorValueValueObject extends IdentifiableValueObject { + + /** + * A unique ontology identifier (i.e. IRI) for this factor value. + */ + private String ontologyId; + + /** + * The ID of the experimental factor this factor value belongs to. + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + private Long experimentalFactorId; + + /** + * The experiment factor category. + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + private CharacteristicValueObject experimentalFactorCategory; + + /** + * The measurement associated with this factor value. + */ + @JsonInclude(JsonInclude.Include.NON_NULL) + private MeasurementValueObject measurement; + + /** + * The characteristics associated with this factor value. + */ + private List characteristics; + + /** + * The statements associated with this factor value. + */ + private List statements; + + /** + * Human-readable summary of the factor value. + */ + private String summary; + + protected AbstractFactorValueValueObject() { + super(); + } + + protected AbstractFactorValueValueObject( Long id ) { + super( id ); + } + + protected AbstractFactorValueValueObject( FactorValue fv, boolean includeExperimentalFactor ) { + super( fv ); + + if ( includeExperimentalFactor ) { + this.experimentalFactorId = fv.getExperimentalFactor().getId(); + if ( Hibernate.isInitialized( fv.getExperimentalFactor() ) ) { + if ( fv.getExperimentalFactor().getCategory() != null ) { + this.experimentalFactorCategory = new CharacteristicValueObject( fv.getExperimentalFactor().getCategory() ); + } + } + } + + if ( fv.getMeasurement() != null ) { + this.measurement = new MeasurementValueObject( fv.getMeasurement() ); + } + + this.characteristics = fv.getCharacteristics().stream() + .sorted() + .map( CharacteristicValueObject::new ) + .collect( Collectors.toList() ); + + this.statements = fv.getCharacteristics().stream() + .sorted() + .map( StatementValueObject::new ) + .collect( Collectors.toList() ); + + this.summary = FactorValueUtils.getSummaryString( fv ); + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactorValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactorValueObject.java index 95c58d5d5a..c93c4cd53d 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactorValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/ExperimentalFactorValueObject.java @@ -29,7 +29,7 @@ import javax.annotation.Nullable; import java.util.Collection; -import java.util.HashSet; +import java.util.stream.Collectors; /** * @author luke @@ -132,11 +132,10 @@ public ExperimentalFactorValueObject( ExperimentalFactor factor, boolean include * NOTE this replaces code that previously made no sense. PP * TODO: replace with FactorValueBasicValueObject */ - Collection vals = new HashSet<>(); - for ( FactorValue value : factor.getFactorValues() ) { - vals.add( new FactorValueValueObject( value ) ); - } - this.values = vals; + this.values = factor.getFactorValues().stream() + // never include the experimental factor in the FV serialization since those would be redundant + .map( value -> new FactorValueValueObject( value, false ) ) + .collect( Collectors.toSet() ); } /** diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueBasicValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueBasicValueObject.java index 5772f7d01a..f655c3f71a 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueBasicValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueBasicValueObject.java @@ -8,18 +8,9 @@ */ package ubic.gemma.model.expression.experiment; -import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; -import org.hibernate.Hibernate; -import ubic.gemma.model.common.IdentifiableValueObject; -import ubic.gemma.model.annotations.GemmaRestOnly; -import ubic.gemma.model.common.description.CharacteristicValueObject; -import ubic.gemma.model.common.measurement.MeasurementValueObject; - -import java.util.List; -import java.util.stream.Collectors; /** * Each factorvalue can be associated with multiple characteristics (or with a measurement). @@ -29,55 +20,17 @@ @SuppressWarnings("unused") // Used in json serialization @Data @EqualsAndHashCode(of = { "characteristics" }, callSuper = true) -public class FactorValueBasicValueObject extends IdentifiableValueObject { +public class FactorValueBasicValueObject extends AbstractFactorValueValueObject { private static final long serialVersionUID = 3378801249808036785L; /** - * A unique ontology identifier (i.e. IRI) for this factor value. - */ - @GemmaRestOnly - private String ontologyId; - - /** - * The ID of the experimental factor this factor value belongs to. - */ - private Long experimentalFactorId; - - /** - * The experiment factor category. - */ - @JsonInclude(JsonInclude.Include.NON_NULL) - private CharacteristicValueObject experimentalFactorCategory; - - /** - * The measurement associated with this factor value. - */ - @JsonInclude(JsonInclude.Include.NON_NULL) - private MeasurementValueObject measurement; - - /** - * The characteristics associated with this factor value. - */ - private List characteristics; - - /** - * The statements associated with this factor value. - */ - private List statements; - - /** - * @deprecated use either {@link #characteristics} or {@link #measurement} + * @deprecated use either {@link #getCharacteristics()} or {@link #getMeasurement()} */ @Deprecated @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) private String value; - /** - * Human-readable summary of the factor value. - */ - private String summary; - /** * Required when using the class as a spring bean. */ @@ -90,35 +43,12 @@ public FactorValueBasicValueObject( Long id ) { } public FactorValueBasicValueObject( FactorValue fv ) { - super( fv ); - this.experimentalFactorId = fv.getExperimentalFactor().getId(); - - if ( Hibernate.isInitialized( fv.getExperimentalFactor() ) ) { - if ( fv.getExperimentalFactor().getCategory() != null ) { - this.experimentalFactorCategory = new CharacteristicValueObject( fv.getExperimentalFactor().getCategory() ); - } - } - - if ( fv.getMeasurement() != null ) { - this.measurement = new MeasurementValueObject( fv.getMeasurement() ); - } - - this.characteristics = fv.getCharacteristics().stream() - .sorted() - .map( CharacteristicValueObject::new ) - .collect( Collectors.toList() ); - - this.statements = fv.getCharacteristics().stream() - .sorted() - .map( StatementValueObject::new ) - .collect( Collectors.toList() ); - + super( fv, true ); this.value = fv.getValue(); - this.summary = FactorValueUtils.getSummaryString( fv ); } @Override public String toString() { - return "FactorValueValueObject [factor=" + summary + ", value=" + value + "]"; + return "FactorValueValueObject [factor=" + getSummary() + ", value=" + value + "]"; } } diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java index b75654cbf9..8c76f5f5f8 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java @@ -14,16 +14,10 @@ import lombok.Data; import lombok.EqualsAndHashCode; import org.hibernate.Hibernate; -import ubic.gemma.model.common.IdentifiableValueObject; -import ubic.gemma.model.annotations.GemmaRestOnly; import ubic.gemma.model.annotations.GemmaWebOnly; import ubic.gemma.model.common.description.Characteristic; -import ubic.gemma.model.common.description.CharacteristicValueObject; import ubic.gemma.model.common.measurement.MeasurementValueObject; -import java.util.List; -import java.util.stream.Collectors; - /** * Each {@link FactorValue} can be associated with multiple characteristics (or with a measurement). However, for * flattening out the objects for client display, there is only one characteristic associated here. @@ -37,60 +31,31 @@ @Deprecated @Data @EqualsAndHashCode(of = { "charId", "value" }, callSuper = true) -public class FactorValueValueObject extends IdentifiableValueObject { +public class FactorValueValueObject extends AbstractFactorValueValueObject { private static final long serialVersionUID = 3378801249808036785L; - /** - * A unique ontology identifier (i.e. IRI) for this factor value. - */ - @GemmaRestOnly - private String ontologyId; - - @GemmaRestOnly - private Long experimentalFactorId; - - @GemmaRestOnly - private CharacteristicValueObject experimentalFactorCategory; - - /** - * Measurement object if this FactorValue is a measurement. - */ - @Schema(description = "This property exists only if a measurement") - @JsonProperty("measurement") - @JsonInclude(JsonInclude.Include.NON_NULL) - private MeasurementValueObject measurementObject; - - private List characteristics; - - private List statements; - - /** - * Human-readable summary of the factor value. - */ - private String summary; - // fields of the characteristic being focused on // this is used by the FV editor to model each individual characteristic with its FV /** * ID of the experimental factor this FV belongs to. */ + @JsonInclude(JsonInclude.Include.NON_NULL) @Schema(description = "Use `experimentalFactorId` instead.", deprecated = true) private Long factorId; + // category and categoryUri can be omitted if factorId is null, this is done in FactorValueValueObjectSerializer + @Schema(description = "Use experimentalFactorCategory.category instead.", deprecated = true) + private String category; + @Schema(description = "Use experimentalFactorCategory.categoryUri instead.", deprecated = true) + private String categoryUri; /** * It could be the id of the measurement if there is no characteristic. */ @Schema(description = "Use `measurement.id` or `characteristics.id` instead.", deprecated = true) private Long charId; - @Schema(description = "Use experimentalFactorCategory.category instead.", deprecated = true) - private String category; - @Schema(description = "Use experimentalFactorCategory.categoryUri instead.", deprecated = true) - private String categoryUri; - @Deprecated - @Schema(description = "This property is never filled nor used; use `summary` if you need a human-readable representation of this factor value.", deprecated = true) - private String description; @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) private String factorValue; + @GemmaWebOnly private String value; @GemmaWebOnly @@ -125,45 +90,42 @@ public FactorValueValueObject( Long id ) { super( id ); } + public FactorValueValueObject( FactorValue value ) { + this( value, true ); + } + /** * Create a FactorValue VO. + * @param includeExperimentalFactor whether to include the experimental factor in the serialization, this might be + * unnecessary if the FV is rendered in the context of its factor */ - public FactorValueValueObject( FactorValue value ) { - super( value ); - - this.experimentalFactorId = value.getExperimentalFactor().getId(); - this.factorId = value.getExperimentalFactor().getId(); - - // make sure we fill in the category for this if no characteristic is being *focused* on - if ( Hibernate.isInitialized( value.getExperimentalFactor() ) ) { - Characteristic factorCategory = value.getExperimentalFactor().getCategory(); - if ( factorCategory != null ) { - this.experimentalFactorCategory = new CharacteristicValueObject( factorCategory ); - this.category = factorCategory.getCategory(); - this.categoryUri = factorCategory.getCategoryUri(); + public FactorValueValueObject( FactorValue value, boolean includeExperimentalFactor ) { + super( value, includeExperimentalFactor ); + + if ( includeExperimentalFactor ) { + this.factorId = value.getExperimentalFactor().getId(); + + // make sure we fill in the category for this if no characteristic is being *focused* on + if ( Hibernate.isInitialized( value.getExperimentalFactor() ) ) { + Characteristic factorCategory = value.getExperimentalFactor().getCategory(); + if ( factorCategory != null ) { + this.category = factorCategory.getCategory(); + this.categoryUri = factorCategory.getCategoryUri(); + } } } if ( value.getMeasurement() != null ) { this.charId = value.getMeasurement().getId(); this.factorValue = value.getMeasurement().getValue(); - this.measurementObject = new MeasurementValueObject( value.getMeasurement() ); + } else if ( value.getCharacteristics().size() == 1 ) { + this.charId = value.getCharacteristics().iterator().next().getId(); + this.factorValue = FactorValueUtils.getSummaryString( value ); } else { + // TODO: pick an arbitrary characteristic? this.factorValue = FactorValueUtils.getSummaryString( value ); } - this.characteristics = value.getCharacteristics().stream() - .sorted() - .map( CharacteristicValueObject::new ) - .collect( Collectors.toList() ); - - this.statements = value.getCharacteristics().stream() - .sorted() - .map( StatementValueObject::new ) - .collect( Collectors.toList() ); - - this.summary = FactorValueUtils.getSummaryString( value ); - this.needsAttention = value.getNeedsAttention(); } @@ -200,13 +162,24 @@ public FactorValueValueObject( FactorValue fv, Statement c ) { this.secondObjectUri = c.getSecondObjectUri(); } + @GemmaWebOnly + public MeasurementValueObject getMeasurementObject() { + return getMeasurement(); + } + /** * Indicate if this FactorValue is a measurement. */ @Schema(description = "Check if a `measurement` key exists instead.", deprecated = true) @JsonProperty("isMeasurement") public boolean isMeasurement() { - return this.measurementObject != null; + return getMeasurement() != null; + } + + @Deprecated + @Schema(description = "This property is never filled nor used; use `summary` if you need a human-readable representation of this factor value.", deprecated = true) + public String getDescription() { + return getSummary(); } @Override diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDao.java index eabdcd7cab..c5da9c38c2 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDao.java @@ -49,7 +49,8 @@ public interface DifferentialExpressionResultDao extends BaseDao findByGeneAndExperimentAnalyzed( diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java index 2d02e4f49d..d6b63a01a2 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionResultDaoImpl.java @@ -166,15 +166,21 @@ public List findByGeneAndExperimentAnalyze } contrastInitializationTimer.stop(); + StopWatch factorInitializationTimer = StopWatch.createStarted(); if ( initializeFactorValues ) { for ( Object[] row : result ) { DifferentialExpressionAnalysisResult r = ( DifferentialExpressionAnalysisResult ) row[0]; for ( ContrastResult c : r.getContrasts() ) { - Hibernate.initialize( c.getFactorValue() ); - Hibernate.initialize( c.getSecondFactorValue() ); + if ( c.getFactorValue() != null ) { + Hibernate.initialize( c.getFactorValue() ); + } + if ( c.getSecondFactorValue() != null ) { + Hibernate.initialize( c.getSecondFactorValue() ); + } } } } + factorInitializationTimer.stop(); for ( Object[] row : result ) { DifferentialExpressionAnalysisResult r = ( DifferentialExpressionAnalysisResult ) row[0]; @@ -216,19 +222,25 @@ public List findByGeneAndExperimentAnalyze } if ( baselineMap != null && initializeFactorValues ) { for ( Baseline baseline : baselineMap.values() ) { - Hibernate.initialize( baseline.getFactorValue() ); - Hibernate.initialize( baseline.getSecondFactorValue() ); + if ( baseline.getFactorValue() != null ) { + Hibernate.initialize( baseline.getFactorValue() ); + } + if ( baseline.getSecondFactorValue() != null ) { + Hibernate.initialize( baseline.getSecondFactorValue() ); + } } } // because of batching, results must be resorted rs.sort( Comparator.comparing( DifferentialExpressionAnalysisResult::getCorrectedPvalue, Comparator.nullsLast( Comparator.naturalOrder() ) ) ); if ( timer.getTime() > 1000 ) { - log.warn( String.format( "Retrieving %d diffex results for %s took %d ms (retrieving probes from genes: %d ms, retrieving subsets: %d ms, retrieving results: %d ms, initializing contrasts: %d ms, initializing probes: %d ms)", + log.warn( String.format( "Retrieving %d diffex results for %s took %d ms (retrieving probes from genes: %d ms, retrieving subsets: %d ms, retrieving results: %d ms, initializing contrasts: %d ms, initializing probes: %d ms, initializing factors: %d ms)", rs.size(), gene, timer.getTime(), retrieveProbesTimer.getTime(), retrieveBioAssayIdsTimer.getTime(), retrieveResultsTimer.getTime(), - contrastInitializationTimer.getTime(), probeInitializationTimer.getTime() ) ); + contrastInitializationTimer.getTime(), + probeInitializationTimer.getTime(), + factorInitializationTimer.getTime() ) ); } return rs; } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index bbd78eca0b..d4c8592e3c 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -97,21 +97,9 @@ public ExpressionAnalysisResultSet loadWithResultsAndContrasts( Long id ) { + "order by -res.correctedPvalue desc" ) .setParameter( "ears", ears ) .list(); - // using separate loops ensure that hibernate can batch-initialize without interleaving queries - for ( DifferentialExpressionAnalysisResult r : results ) { - Hibernate.initialize( r.getProbe() ); - } - for ( DifferentialExpressionAnalysisResult r : results ) { - Hibernate.initialize( r.getContrasts() ); - } - for ( DifferentialExpressionAnalysisResult r : results ) { - for ( ContrastResult cr : r.getContrasts() ) { - Hibernate.initialize( cr.getFactorValue() ); - Hibernate.initialize( cr.getSecondFactorValue() ); - } - } // preserve order of results ears.setResults( new LinkedHashSet<>( results ) ); + thawResultsAndContrasts( ears ); } if ( timer.getTime() > 5000 ) { log.info( String.format( "Loaded [%s id=%d] with results, probes and contrasts in %d ms.", @@ -138,21 +126,9 @@ public ExpressionAnalysisResultSet loadWithResultsAndContrasts( Long id, int off .setFirstResult( offset ) .setMaxResults( limit ) .list(); - // using separate loops ensure that hibernate can batch-initialize without interleaving queries - for ( DifferentialExpressionAnalysisResult r : results ) { - Hibernate.initialize( r.getProbe() ); - } - for ( DifferentialExpressionAnalysisResult r : results ) { - Hibernate.initialize( r.getContrasts() ); - } - for ( DifferentialExpressionAnalysisResult r : results ) { - for ( ContrastResult cr : r.getContrasts() ) { - Hibernate.initialize( cr.getFactorValue() ); - Hibernate.initialize( cr.getSecondFactorValue() ); - } - } // preserve order of results ears.setResults( new LinkedHashSet<>( results ) ); + thawResultsAndContrasts( ears ); } if ( timer.getTime() > 100 ) { log.info( String.format( "Loaded [%s id=%d] with results, probes and contrasts in %d ms.", @@ -181,21 +157,9 @@ public ExpressionAnalysisResultSet loadWithResultsAndContrasts( Long id, double .setFirstResult( offset ) .setMaxResults( limit ) .list(); - // using separate loops ensure that hibernate can batch-initialize without interleaving queries - for ( DifferentialExpressionAnalysisResult r : results ) { - Hibernate.initialize( r.getProbe() ); - } - for ( DifferentialExpressionAnalysisResult r : results ) { - Hibernate.initialize( r.getContrasts() ); - } - for ( DifferentialExpressionAnalysisResult r : results ) { - for ( ContrastResult cr : r.getContrasts() ) { - Hibernate.initialize( cr.getFactorValue() ); - Hibernate.initialize( cr.getSecondFactorValue() ); - } - } // preserve order of results ears.setResults( new LinkedHashSet<>( results ) ); + thawResultsAndContrasts( ears ); } if ( timer.getTime() > 100 ) { log.info( String.format( "Loaded [%s id=%d] with results, probes and contrasts in %d ms.", @@ -237,12 +201,11 @@ public Slice findByBioAssayS .setProjection( Projections.countDistinct( "id" ) ) .uniqueResult(); - // initialize subset factor values for ( ExpressionAnalysisResultSet d : data ) { - Hibernate.initialize( d.getAnalysis().getSubsetFactorValue() ); + thaw( d ); } - return new Slice<>( super.loadValueObjects( data ), sort, offset, limit, totalElements ); + return new Slice<>( loadValueObjects( data ), sort, offset, limit, totalElements ); } @Override @@ -250,25 +213,49 @@ protected void postProcessValueObjects( List getBaselinesForInteractionsInternal( Collection * See {@link FactorValueOntologyServiceImpl} for the logic related to how URIs are generated. */ -public abstract class AbstractFactorValueValueObjectSerializer extends StdSerializer { +public abstract class AbstractFactorValueValueObjectSerializer extends StdSerializer { protected AbstractFactorValueValueObjectSerializer( Class t ) { super( t ); } - protected void writeCharacteristics( Long factorValueId, Collection cvos, JsonGenerator jsonGenerator ) throws IOException { + @Override + public void serialize( T factorValueValueObject, JsonGenerator jsonGenerator, SerializerProvider serializerProvider ) throws IOException { + jsonGenerator.writeStartObject(); + jsonGenerator.writeObjectField( "id", factorValueValueObject.getId() ); + jsonGenerator.writeStringField( "ontologyId", FactorValueOntologyUtils.getUri( factorValueValueObject.getId() ) ); + if ( factorValueValueObject.getExperimentalFactorId() != null ) { + jsonGenerator.writeObjectField( "experimentalFactorId", factorValueValueObject.getExperimentalFactorId() ); + } + if ( factorValueValueObject.getExperimentalFactorCategory() != null ) { + jsonGenerator.writeObjectField( "experimentalFactorCategory", factorValueValueObject.getExperimentalFactorCategory() ); + } + serializeInternal( factorValueValueObject, jsonGenerator, serializerProvider ); + if ( factorValueValueObject.getMeasurement() != null ) { + jsonGenerator.writeObjectField( "measurement", factorValueValueObject.getMeasurement() ); + } + writeCharacteristics( factorValueValueObject.getId(), factorValueValueObject.getStatements(), jsonGenerator ); + writeStatements( factorValueValueObject.getId(), factorValueValueObject.getStatements(), jsonGenerator ); + jsonGenerator.writeStringField( "summary", factorValueValueObject.getSummary() ); + jsonGenerator.writeEndObject(); + } + + protected abstract void serializeInternal( T t, JsonGenerator jsonGenerator, SerializerProvider serializerProvider ) throws IOException; + + private void writeCharacteristics( Long factorValueId, Collection cvos, JsonGenerator jsonGenerator ) throws IOException { jsonGenerator.writeArrayFieldStart( "characteristics" ); visitCharacteristics( factorValueId, cvos, ( cvo, valueId ) -> { writeCharacteristic( cvo.getId(), cvo.getCategory(), cvo.getCategoryUri(), valueId, cvo.getSubject(), cvo.getSubjectUri(), jsonGenerator ); @@ -30,7 +55,7 @@ protected void writeCharacteristics( Long factorValueId, Collection svos, JsonGenerator jsonGenerator ) throws IOException { + private void writeStatements( Long factorValueId, Collection svos, JsonGenerator jsonGenerator ) throws IOException { jsonGenerator.writeArrayFieldStart( "statements" ); visitStatements( factorValueId, svos, ( svo, assignedIds ) -> { if ( assignedIds.getObjectId() != null ) { @@ -43,8 +68,7 @@ protected void writeStatements( Long factorValueId, Collection { public FactorValueValueObjectSerializer() { @@ -14,25 +14,15 @@ public FactorValueValueObjectSerializer() { } @Override - public void serialize( FactorValueValueObject factorValueValueObject, JsonGenerator jsonGenerator, SerializerProvider serializerProvider ) throws IOException { - jsonGenerator.writeStartObject(); - jsonGenerator.writeObjectField( "id", factorValueValueObject.getId() ); - jsonGenerator.writeStringField( "ontologyId", FactorValueOntologyUtils.getUri( factorValueValueObject.getId() ) ); - jsonGenerator.writeObjectField( "experimentalFactorId", factorValueValueObject.getExperimentalFactorId() ); - jsonGenerator.writeObjectField( "experimentalFactorCategory", factorValueValueObject.getExperimentalFactorCategory() ); - jsonGenerator.writeObjectField( "factorId", factorValueValueObject.getFactorId() ); + protected void serializeInternal( FactorValueValueObject factorValueValueObject, JsonGenerator jsonGenerator, SerializerProvider serializerProvider ) throws IOException { + if ( factorValueValueObject.getFactorId() != null ) { + jsonGenerator.writeObjectField( "factorId", factorValueValueObject.getFactorId() ); + jsonGenerator.writeStringField( "category", factorValueValueObject.getCategory() ); + jsonGenerator.writeStringField( "categoryUri", factorValueValueObject.getCategoryUri() ); + } jsonGenerator.writeObjectField( "charId", factorValueValueObject.getCharId() ); - jsonGenerator.writeStringField( "category", factorValueValueObject.getCategory() ); - jsonGenerator.writeStringField( "categoryUri", factorValueValueObject.getCategoryUri() ); jsonGenerator.writeStringField( "description", factorValueValueObject.getDescription() ); jsonGenerator.writeObjectField( "factorValue", factorValueValueObject.getFactorValue() ); jsonGenerator.writeBooleanField( "isMeasurement", factorValueValueObject.getMeasurementObject() != null ); - if ( factorValueValueObject.getMeasurementObject() != null ) { - jsonGenerator.writeObjectField( "measurement", factorValueValueObject.getMeasurementObject() ); - } - writeCharacteristics( factorValueValueObject.getId(), factorValueValueObject.getStatements(), jsonGenerator ); - writeStatements( factorValueValueObject.getId(), factorValueValueObject.getStatements(), jsonGenerator ); - jsonGenerator.writeStringField( "summary", factorValueValueObject.getSummary() ); - jsonGenerator.writeEndObject(); } } From 3f5e74c47de785534ea18be72f514ea7650194b9 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 13:43:27 -0400 Subject: [PATCH 64/99] Refactor getBaselinesForInteractionByIds() --- .../diff/ExpressionAnalysisResultSetDao.java | 2 + .../ExpressionAnalysisResultSetDaoImpl.java | 204 +++++++++--------- 2 files changed, 100 insertions(+), 106 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java index 0785b2b282..2dcb635114 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java @@ -128,11 +128,13 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao getBaselinesForInteractions( Collection resultSets, boolean initializeFactorValues ); /** * Retrieve baselines using result set IDs representing factor interactions. + * @param initializeFactorValues whether to initialize factor values */ Map getBaselinesForInteractionsByIds( Collection ids, boolean initializeFactorValues ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index d4c8592e3c..9f74efb990 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -290,20 +290,114 @@ public Baseline getBaseline( ExpressionAnalysisResultSet ears ) { return null; } } else { - return getBaselinesForInteractionsInternal( Collections.singleton( ears.getId() ), true ).get( ears.getId() ); + return getBaselinesForInteractionsByIds( Collections.singleton( ears.getId() ), true ).get( ears.getId() ); } } @Override public Map getBaselinesForInteractions( Collection resultSets, boolean initializeFactorValues ) { Map idMap = EntityUtils.getIdMap( resultSets ); - return getBaselinesForInteractionsInternal( EntityUtils.getIds( resultSets ), initializeFactorValues ).entrySet().stream() + return getBaselinesForInteractionsByIds( EntityUtils.getIds( resultSets ), initializeFactorValues ).entrySet().stream() .collect( IdentifiableUtils.toIdentifiableMap( e -> idMap.get( e.getKey() ), Map.Entry::getValue ) ); } @Override public Map getBaselinesForInteractionsByIds( Collection ids, boolean initializeFactorValues ) { - return getBaselinesForInteractionsInternal( ids, initializeFactorValues ); + if ( ids.isEmpty() ) { + return Collections.emptyMap(); + } + // pick baseline groups from other result sets from the same analysis + List otherBaselineGroups = listByBatch( getSessionFactory().getCurrentSession() + .createQuery( "select rs.id, otherBg.id, otherBg.experimentalFactor.id from ExpressionAnalysisResultSet rs " + + "join rs.analysis a " + + "join a.resultSets otherRs " + + "join otherRs.baselineGroup otherBg " + + "where rs.id in :rsIds and otherRs.id not in :rsIds" ), + "rsIds", ids, 2048 ); + // maps rs ID to [fv ID, ef ID] + Map> baselineMapping = otherBaselineGroups.stream() + .collect( Collectors.groupingBy( row -> ( Long ) row[0], Collectors.mapping( row -> new FactorValueIdAndExperimentalFactorId( ( Long ) row[1], ( Long ) row[2] ), Collectors.toSet() ) ) ); + + // pick one representative contrasts to order the first and second baseline group consistently + // NOTE: I tried to do this in a single query, but it's just too slow + + // result ID -> result set ID + Map representativeResults = streamByBatch( getSessionFactory().getCurrentSession() + .createSQLQuery( "select dear.ID as RESULT_ID, dear.RESULT_SET_FK as RESULT_SET_ID " + + "from DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT dear " + + "where dear.RESULT_SET_FK in :rsIds " + + "group by dear.RESULT_SET_FK" ) + .addScalar( "RESULT_ID", StandardBasicTypes.LONG ) + .addScalar( "RESULT_SET_ID", StandardBasicTypes.LONG ), "rsIds", ids, 2048, Object[].class ) + .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[1] ) ); + + // result ID -> [ef1 ID, ef2 ID] + List representativeContrasts = listByBatch( getSessionFactory().getCurrentSession().createSQLQuery( + "select cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK as RESULT_ID, fv1.EXPERIMENTAL_FACTOR_FK as EF1_ID, fv2.EXPERIMENTAL_FACTOR_FK as EF2_ID " + + "from CONTRAST_RESULT cr " + + // A left join is critical for performance, because otherwise the database will scan every + // single contrast results until it finds a non-null one. We know however that they are all + // identical for a given result set. + // This is a problem with continuous factors that do not have FVs set in the CR + "left join FACTOR_VALUE fv1 on cr.FACTOR_VALUE_FK = fv1.ID " + + "left join FACTOR_VALUE fv2 on cr.SECOND_FACTOR_VALUE_FK = fv2.ID " + + "where cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK in :resultIds " + + "group by cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK" ) + .addScalar( "RESULT_ID", StandardBasicTypes.LONG ) + .addScalar( "EF1_ID", StandardBasicTypes.LONG ) + .addScalar( "EF2_ID", StandardBasicTypes.LONG ), "resultIds", representativeResults.keySet(), 2048 ); + + Map ef1Mapping = representativeContrasts.stream() + .filter( row -> row[1] != null ) + .collect( Collectors.toMap( row -> representativeResults.get( ( Long ) row[0] ), row -> ( Long ) row[1] ) ); + Map ef2Mapping = representativeContrasts.stream() + .filter( row -> row[2] != null ) + .collect( Collectors.toMap( row -> representativeResults.get( ( Long ) row[0] ), row -> ( Long ) row[2] ) ); + Map results = new HashMap<>(); + for ( Long rsId : ids ) { + Long ef1 = ef1Mapping.get( rsId ); + Long ef2 = ef2Mapping.get( rsId ); + if ( ef1 == null || ef2 == null ) { + log.warn( "Could not populate baselines for " + rsId + " as its contrasts lack factor values. This is likely a continuous factor." ); + // very likely a continuous factor, it does not have a baseline + continue; + } + // I don't think this is allowed + if ( ef1.equals( ef2 ) ) { + log.warn( "Could not populate baselines for " + rsId + ", its representative contrast uses the same experimental factor for its first and second factor value." ); + continue; + } + Set baselines = baselineMapping.get( rsId ); + if ( baselines == null || baselines.size() != 2 ) { + log.warn( "Could not find two other result sets with baseline for " + rsId + " to populate its baseline groups." ); + continue; + } + Long firstBaselineId = null, secondBaselineId = null; + for ( FactorValueIdAndExperimentalFactorId fv : baselines ) { + if ( fv.getExperimentalFactorId().equals( ef1 ) ) { + firstBaselineId = fv.getFactorValueId(); + } + if ( fv.getExperimentalFactorId().equals( ef2 ) ) { + secondBaselineId = fv.getFactorValueId(); + } + } + if ( firstBaselineId != null && secondBaselineId != null ) { + results.put( rsId, Baseline.interaction( + ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, firstBaselineId ), + ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, secondBaselineId ) ) + ); + } else { + log.warn( "Could not fill the baseline groups for " + rsId + ": one or more baselines were not found in other result sets from the same analysis." ); + } + } + if ( initializeFactorValues ) { + for ( Baseline b : results.values() ) { + // those are interaction baselines, so both are non-null + Hibernate.initialize( b.getFactorValue() ); + Hibernate.initialize( b.getSecondFactorValue() ); + } + } + return results; } @Override @@ -437,7 +531,7 @@ private void populateBaselines( List baselines = getBaselinesForInteractionsInternal( EntityUtils.getIds( vosWithMissingBaselines ), true ); + Map baselines = getBaselinesForInteractionsByIds( EntityUtils.getIds( vosWithMissingBaselines ), true ); for ( DifferentialExpressionAnalysisResultSetValueObject vo : vos ) { Baseline b = baselines.get( vo.getId() ); if ( b != null ) { @@ -449,108 +543,6 @@ private void populateBaselines( List getBaselinesForInteractionsInternal( Collection rsIds, boolean initializeFactorValues ) { - if ( rsIds.isEmpty() ) { - return Collections.emptyMap(); - } - // pick baseline groups from other result sets from the same analysis - List otherBaselineGroups = listByBatch( getSessionFactory().getCurrentSession() - .createQuery( "select rs.id, otherBg.id, otherBg.experimentalFactor.id from ExpressionAnalysisResultSet rs " - + "join rs.analysis a " - + "join a.resultSets otherRs " - + "join otherRs.baselineGroup otherBg " - + "where rs.id in :rsIds and otherRs.id not in :rsIds" ), - "rsIds", rsIds, 2048 ); - // maps rs ID to [fv ID, ef ID] - Map> baselineMapping = otherBaselineGroups.stream() - .collect( Collectors.groupingBy( row -> ( Long ) row[0], Collectors.mapping( row -> new FactorValueIdAndExperimentalFactorId( ( Long ) row[1], ( Long ) row[2] ), Collectors.toSet() ) ) ); - - // pick one representative contrasts to order the first and second baseline group consistently - // NOTE: I tried to do this in a single query, but it's just too slow - - // result ID -> result set ID - Map representativeResults = streamByBatch( getSessionFactory().getCurrentSession() - .createSQLQuery( "select dear.ID as RESULT_ID, dear.RESULT_SET_FK as RESULT_SET_ID " + - "from DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT dear " + - "where dear.RESULT_SET_FK in :rsIds " + - "group by dear.RESULT_SET_FK" ) - .addScalar( "RESULT_ID", StandardBasicTypes.LONG ) - .addScalar( "RESULT_SET_ID", StandardBasicTypes.LONG ), "rsIds", rsIds, 2048, Object[].class ) - .collect( Collectors.toMap( row -> ( Long ) row[0], row -> ( Long ) row[1] ) ); - - // result ID -> [ef1 ID, ef2 ID] - List representativeContrasts = listByBatch( getSessionFactory().getCurrentSession().createSQLQuery( - "select cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK as RESULT_ID, fv1.EXPERIMENTAL_FACTOR_FK as EF1_ID, fv2.EXPERIMENTAL_FACTOR_FK as EF2_ID " + - "from CONTRAST_RESULT cr " + - // A left join is critical for performance, because otherwise the database will scan every - // single contrast results until it finds a non-null one. We know however that they are all - // identical for a given result set. - // This is a problem with continuous factors that do not have FVs set in the CR - "left join FACTOR_VALUE fv1 on cr.FACTOR_VALUE_FK = fv1.ID " + - "left join FACTOR_VALUE fv2 on cr.SECOND_FACTOR_VALUE_FK = fv2.ID " + - "where cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK in :resultIds " + - "group by cr.DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT_FK" ) - .addScalar("RESULT_ID", StandardBasicTypes.LONG) - .addScalar("EF1_ID", StandardBasicTypes.LONG) - .addScalar("EF2_ID", StandardBasicTypes.LONG), "resultIds", representativeResults.keySet(), 2048 ); - - Map ef1Mapping = representativeContrasts.stream() - .filter( row -> row[1] != null ) - .collect( Collectors.toMap( row -> representativeResults.get( ( Long ) row[0] ), row -> ( Long ) row[1] ) ); - Map ef2Mapping = representativeContrasts.stream() - .filter( row -> row[2] != null ) - .collect( Collectors.toMap( row -> representativeResults.get( ( Long ) row[0] ), row -> ( Long ) row[2] ) ); - Map results = new HashMap<>(); - for ( Long rsId : rsIds ) { - Long ef1 = ef1Mapping.get( rsId ); - Long ef2 = ef2Mapping.get( rsId ); - if ( ef1 == null || ef2 == null ) { - log.warn( "Could not populate baselines for " + rsId + " as its contrasts lack factor values. This is likely a continuous factor." ); - // very likely a continuous factor, it does not have a baseline - continue; - } - // I don't think this is allowed - if ( ef1.equals( ef2 ) ) { - log.warn( "Could not populate baselines for " + rsId + ", its representative contrast uses the same experimental factor for its first and second factor value." ); - continue; - } - Set baselines = baselineMapping.get( rsId ); - if ( baselines == null || baselines.size() != 2 ) { - log.warn( "Could not find two other result sets with baseline for " + rsId + " to populate its baseline groups." ); - continue; - } - Long firstBaselineId = null, secondBaselineId = null; - for ( FactorValueIdAndExperimentalFactorId fv : baselines ) { - if ( fv.getExperimentalFactorId().equals( ef1 ) ) { - firstBaselineId = fv.getFactorValueId(); - } - if ( fv.getExperimentalFactorId().equals( ef2 ) ) { - secondBaselineId = fv.getFactorValueId(); - } - } - if ( firstBaselineId != null && secondBaselineId != null ) { - results.put( rsId, Baseline.interaction( - ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, firstBaselineId ), - ( FactorValue ) getSessionFactory().getCurrentSession().load( FactorValue.class, secondBaselineId ) ) - ); - } else { - log.warn( "Could not fill the baseline groups for " + rsId + ": one or more baselines were not found in other result sets from the same analysis." ); - } - } - if ( initializeFactorValues ) { - for ( Baseline b : results.values() ) { - // those are interaction baselines, so both are non-null - Hibernate.initialize( b.getFactorValue() ); - Hibernate.initialize( b.getSecondFactorValue() ); - } - } - return results; - } - @Value private static class FactorValueIdAndExperimentalFactorId { Long factorValueId; From 0e595fe79177a37c49acc3b5b697d8e729bb2263 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 13:43:42 -0400 Subject: [PATCH 65/99] Update spec to 2.8.1 and add changelogs --- gemma-rest/src/main/resources/openapi-configuration.yaml | 2 +- gemma-rest/src/main/resources/restapidocs/CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gemma-rest/src/main/resources/openapi-configuration.yaml b/gemma-rest/src/main/resources/openapi-configuration.yaml index 6a7ec1d9a1..5d28cc28a9 100644 --- a/gemma-rest/src/main/resources/openapi-configuration.yaml +++ b/gemma-rest/src/main/resources/openapi-configuration.yaml @@ -3,7 +3,7 @@ resourcePackages: openAPI: info: title: Gemma RESTful API - version: 2.8.0 + version: 2.8.1 description: | This website documents the usage of the [Gemma RESTful API](https://gemma.msl.ubc.ca/rest/v2/). Here you can find example script usage of the API, as well as graphical interface for each endpoint, with description of its diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index 6934ec4645..ccb3edaa0d 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -1,5 +1,12 @@ ## Updates +### Update 2.8.1 + +- add `factorValueId` and `secondFactorValueId` in `ContrastResultValueObject`. Those are populated in `getResultSet` to + make the payload slimmer since the factors can be looked up by ID in `experimentalFactors` +- don't render the details of the experimental factor in `FactorValueValueObject` when it is rendered in the context of + an `ExperimentalFactorValueObject` + ### Update 2.8.0 - add `getAnnotationsParents` and `getAnnotationsChildren` endpoint to perform the exact same ontology inference we use From 05a8baefffd94a049dfff4cd36c9b3e4d7f1e141 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 14:13:34 -0400 Subject: [PATCH 66/99] rest: Rename bioAssaySetId and experimentAnalyzed, deprecate older names --- .../DifferentialExpressionSearchTaskImpl.java | 6 +- .../DiffExResultSetSummaryValueObject.java | 2 +- ...erentialExpressionAnalysisValueObject.java | 56 +++++++++++++++---- ...DifferentialExpressionAnalysisDaoImpl.java | 14 ++--- .../main/resources/restapidocs/CHANGELOG.md | 6 ++ 5 files changed, 61 insertions(+), 23 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/tasks/visualization/DifferentialExpressionSearchTaskImpl.java b/gemma-core/src/main/java/ubic/gemma/core/tasks/visualization/DifferentialExpressionSearchTaskImpl.java index c96c683e40..7323cc80d9 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/tasks/visualization/DifferentialExpressionSearchTaskImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/tasks/visualization/DifferentialExpressionSearchTaskImpl.java @@ -349,7 +349,7 @@ private Collection filterAnalyses( */ if ( !filtered.isEmpty() ) { DifferentialExpressionSearchTaskImpl.log - .info( "Using subsetted analyses for " + analyses.iterator().next().getBioAssaySetId() + "(" + .info( "Using subsetted analyses for " + analyses.iterator().next().getExperimentAnalyzedId() + "(" + analyses.size() + " analyses)" ); return filtered; } @@ -358,7 +358,7 @@ private Collection filterAnalyses( //noinspection ConstantConditions // Defensiveness for future changes assert filtered.isEmpty(); DifferentialExpressionSearchTaskImpl.log - .info( "No analyses were usable for " + analyses.iterator().next().getBioAssaySetId() ); + .info( "No analyses were usable for " + analyses.iterator().next().getExperimentAnalyzedId() ); return filtered; } @@ -551,7 +551,7 @@ private Collection maybeGetSubSetFactorValuesToKeep( Collection keepForSubSet = null; if ( analysis.isSubset() ) { - Long eeid = analysis.getBioAssaySetId(); + Long eeid = analysis.getExperimentAnalyzedId(); keepForSubSet = this.experimentSubSetService.getFactorValuesUsed( eeid, experimentalFactor ); // could this be empty? if ( keepForSubSet.isEmpty() ) { diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DiffExResultSetSummaryValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DiffExResultSetSummaryValueObject.java index 47b20a8e28..a833e1cdcc 100755 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DiffExResultSetSummaryValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DiffExResultSetSummaryValueObject.java @@ -61,7 +61,7 @@ public class DiffExResultSetSummaryValueObject implements Serializable { /** * Analyzed {@link ubic.gemma.model.expression.experiment.BioAssaySet} ID. *

- * This is redundant because of {@link DifferentialExpressionAnalysisValueObject#getBioAssaySetId()}, and always + * This is redundant because of {@link DifferentialExpressionAnalysisValueObject#getExperimentAnalyzedId()}, and always * displayed in that context in the RESTful API. */ @JsonIgnore diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java index b070dc1be1..f5d928acd1 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; import org.hibernate.Hibernate; @@ -50,11 +51,18 @@ public class DifferentialExpressionAnalysisValueObject extends AnalysisValueObje private Collection resultSets = new HashSet<>(); @JsonInclude(JsonInclude.Include.NON_NULL) private Collection arrayDesignsUsed; - private Long bioAssaySetId; - private Long sourceExperiment; + private Long experimentAnalyzedId; + private Long sourceExperimentId; + + @JsonInclude(JsonInclude.Include.NON_NULL) private ExperimentalFactorValueObject subsetFactor; + @JsonInclude(JsonInclude.Include.NON_NULL) private Long subsetFactorId; + + @JsonInclude(JsonInclude.Include.NON_NULL) private FactorValueValueObject subsetFactorValue; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Long subsetFactorValueId; public DifferentialExpressionAnalysisValueObject() { super(); @@ -67,23 +75,46 @@ public DifferentialExpressionAnalysisValueObject() { */ public DifferentialExpressionAnalysisValueObject( DifferentialExpressionAnalysis analysis ) { super( analysis ); - this.bioAssaySetId = analysis.getExperimentAnalyzed().getId(); + this.experimentAnalyzedId = analysis.getExperimentAnalyzed().getId(); // experimentAnalyzed is eagerly fetched if ( analysis.getExperimentAnalyzed() instanceof ExpressionExperimentSubSet ) { // sourceExperiment is eagerly fetched too - this.sourceExperiment = ( ( ExpressionExperimentSubSet ) analysis.getExperimentAnalyzed() ).getSourceExperiment().getId(); + this.sourceExperimentId = ( ( ExpressionExperimentSubSet ) analysis.getExperimentAnalyzed() ).getSourceExperiment().getId(); } - if ( analysis.getSubsetFactorValue() != null && Hibernate.isInitialized( ( analysis.getSubsetFactorValue() ) ) ) { - this.subsetFactorValue = new FactorValueValueObject( analysis.getSubsetFactorValue() ); - this.subsetFactorId = analysis.getSubsetFactorValue().getExperimentalFactor().getId(); - if ( Hibernate.isInitialized( analysis.getSubsetFactorValue().getExperimentalFactor() ) ) { - this.subsetFactor = new ExperimentalFactorValueObject( - analysis.getSubsetFactorValue().getExperimentalFactor() ); + if ( analysis.getSubsetFactorValue() != null ) { + if ( Hibernate.isInitialized( analysis.getSubsetFactorValue() ) ) { + this.subsetFactorValue = new FactorValueValueObject( analysis.getSubsetFactorValue(), false ); + if ( Hibernate.isInitialized( analysis.getSubsetFactorValue().getExperimentalFactor() ) ) { + this.subsetFactor = new ExperimentalFactorValueObject( + analysis.getSubsetFactorValue().getExperimentalFactor() ); + } else { + this.subsetFactorId = analysis.getSubsetFactorValue().getExperimentalFactor().getId(); + } + } else { + this.subsetFactorValueId = analysis.getSubsetFactorValue().getId(); } // fill in the factorValuesUsed separately, needs access to details of the subset. } } + /** + * @deprecated use {@link #getExperimentAnalyzedId()} instead + */ + @Deprecated + @Schema(description = "This is deprecated, use experimentAnalyzedId instead.", deprecated = true) + public Long getBioAssaySetId() { + return experimentAnalyzedId; + } + + /** + * @deprecated use {@link #getSourceExperimentId()} instead + */ + @Deprecated + @Schema(description = "This is deprecated, use sourceExperimentId instead.", deprecated = true) + public Long getSourceExperiment() { + return sourceExperimentId; + } + /** * @deprecated This was renamed for clarity. * @see #getFactorValuesUsedByExperimentalFactorId() @@ -103,17 +134,18 @@ public Map> getFactorValuesUsed() { * This can be null in certain cases if set to NULL via {@link #setFactorValuesUsed(Map)} so that it does not appear * in the JSON serialization, but you can assume it is non-null. */ + @JsonInclude(JsonInclude.Include.NON_NULL) public Map> getFactorValuesUsedByExperimentalFactorId() { return factorValuesUsed; } @JsonProperty("isSubset") public boolean isSubset() { - return this.subsetFactor != null; + return this.sourceExperimentId != null || this.subsetFactorValue != null || this.subsetFactorValueId != null; } @Override public String toString() { - return "DiffExAnalysisVO [id=" + id + ", bioAssaySetId=" + bioAssaySetId + "]"; + return "DiffExAnalysisVO [id=" + id + ", experimentAnalyzedId=" + experimentAnalyzedId + "]"; } } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionAnalysisDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionAnalysisDaoImpl.java index 9c8463ce65..c253d1b5e7 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionAnalysisDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/DifferentialExpressionAnalysisDaoImpl.java @@ -647,10 +647,10 @@ public Map> getAnalysesByE for ( DifferentialExpressionAnalysisValueObject an : summaries ) { Long bioAssaySetId; - if ( an.getSourceExperiment() != null ) { - bioAssaySetId = an.getSourceExperiment(); + if ( an.getSourceExperimentId() != null ) { + bioAssaySetId = an.getSourceExperimentId(); } else { - bioAssaySetId = an.getBioAssaySetId(); + bioAssaySetId = an.getExperimentAnalyzedId(); } if ( !r.containsKey( bioAssaySetId ) ) { r.put( bioAssaySetId, new ArrayList() ); @@ -751,19 +751,19 @@ private Collection convertToValueObje BioAssaySet bioAssaySet = analysis.getExperimentAnalyzed(); - avo.setBioAssaySetId( bioAssaySet.getId() ); // might be a subset. + avo.setExperimentAnalyzedId( bioAssaySet.getId() ); // might be a subset. if ( analysis.getSubsetFactorValue() != null ) { avo.setSubsetFactorValue( new FactorValueValueObject( analysis.getSubsetFactorValue() ) ); avo.setSubsetFactor( new ExperimentalFactorValueObject( analysis.getSubsetFactorValue().getExperimentalFactor() ) ); assert bioAssaySet instanceof ExpressionExperimentSubSet; - avo.setSourceExperiment( ( ( ExpressionExperimentSubSet ) bioAssaySet ).getSourceExperiment().getId() ); + avo.setSourceExperimentId( ( ( ExpressionExperimentSubSet ) bioAssaySet ).getSourceExperiment().getId() ); if ( arrayDesignsUsed.containsKey( bioAssaySet.getId() ) ) { avo.setArrayDesignsUsed( arrayDesignsUsed.get( bioAssaySet.getId() ) ); } else { - assert arrayDesignsUsed.containsKey( avo.getSourceExperiment() ); - avo.setArrayDesignsUsed( arrayDesignsUsed.get( avo.getSourceExperiment() ) ); + assert arrayDesignsUsed.containsKey( avo.getSourceExperimentId() ); + avo.setArrayDesignsUsed( arrayDesignsUsed.get( avo.getSourceExperimentId() ) ); } } else { Collection adids = arrayDesignsUsed.get( bioAssaySet.getId() ); diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index ccb3edaa0d..a548b65ef5 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -6,6 +6,12 @@ make the payload slimmer since the factors can be looked up by ID in `experimentalFactors` - don't render the details of the experimental factor in `FactorValueValueObject` when it is rendered in the context of an `ExperimentalFactorValueObject` +- rename `bioAssaySetId` to `experimentAnalyzedId` and `sourceExperiment` to `sourceExperimentId` in + `DifferentialExpressionAnalysisValueObject`, previous names are deprecated +- add `subsetFactorValueId` in `DifferentialExpressionAnalysisValueObject` and populate it when`subsetFactorValue` + is not initialized +- omit `subsetFactorId` if `subsetFactor` is rendered +- omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set ### Update 2.8.0 From cac166ec92c69fead0a32338a9865da4342428f5 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 14:14:05 -0400 Subject: [PATCH 67/99] rest: Hide charId in FactorValueValueObject --- .../expression/experiment/FactorValueValueObject.java | 8 ++++---- gemma-rest/src/main/resources/restapidocs/CHANGELOG.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java index 8c76f5f5f8..c07ed1e5eb 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java @@ -48,14 +48,14 @@ public class FactorValueValueObject extends AbstractFactorValueValueObject { private String category; @Schema(description = "Use experimentalFactorCategory.categoryUri instead.", deprecated = true) private String categoryUri; + @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) + private String factorValue; + /** * It could be the id of the measurement if there is no characteristic. */ - @Schema(description = "Use `measurement.id` or `characteristics.id` instead.", deprecated = true) + @GemmaWebOnly private Long charId; - @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) - private String factorValue; - @GemmaWebOnly private String value; @GemmaWebOnly diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index a548b65ef5..179692e0d6 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -12,6 +12,7 @@ is not initialized - omit `subsetFactorId` if `subsetFactor` is rendered - omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set + omit `charId` in `FactorValueValueObject` ### Update 2.8.0 From 0ce90c5507bb241cfd5e34b7f026944980f9eb71 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 14:34:26 -0400 Subject: [PATCH 68/99] Fix regression with measurementObject in FactorValueValueObject --- .../expression/experiment/FactorValueValueObject.java | 8 +++++++- .../serializers/FactorValueValueObjectSerializer.java | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java index c07ed1e5eb..716cb899e8 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java @@ -162,7 +162,13 @@ public FactorValueValueObject( FactorValue fv, Statement c ) { this.secondObjectUri = c.getSecondObjectUri(); } - @GemmaWebOnly + /** + * @deprecated use {@link #getMeasurement()} instead, this is only named like this for the Gemma Web frontend. + */ + @Deprecated + @Schema(description = "This property exists only if this factor value is a measurement") + @JsonProperty("measurement") + @JsonInclude(JsonInclude.Include.NON_NULL) public MeasurementValueObject getMeasurementObject() { return getMeasurement(); } diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java b/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java index ab66828a15..0f2c1ba52a 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java @@ -23,6 +23,6 @@ protected void serializeInternal( FactorValueValueObject factorValueValueObject, jsonGenerator.writeObjectField( "charId", factorValueValueObject.getCharId() ); jsonGenerator.writeStringField( "description", factorValueValueObject.getDescription() ); jsonGenerator.writeObjectField( "factorValue", factorValueValueObject.getFactorValue() ); - jsonGenerator.writeBooleanField( "isMeasurement", factorValueValueObject.getMeasurementObject() != null ); + jsonGenerator.writeBooleanField( "isMeasurement", factorValueValueObject.isMeasurement() ); } } From 4871b62534efa2a16eac864febf6cf3dc0ea8d62 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 14:49:19 -0400 Subject: [PATCH 69/99] Further cleanups for FactorValueValueObject --- .../experiment/FactorValueValueObject.java | 21 ++++++++++++------- .../main/resources/restapidocs/CHANGELOG.md | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java index 716cb899e8..8ca18f156e 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java @@ -37,6 +37,7 @@ public class FactorValueValueObject extends AbstractFactorValueValueObject { // fields of the characteristic being focused on // this is used by the FV editor to model each individual characteristic with its FV + /** * ID of the experimental factor this FV belongs to. */ @@ -48,8 +49,6 @@ public class FactorValueValueObject extends AbstractFactorValueValueObject { private String category; @Schema(description = "Use experimentalFactorCategory.categoryUri instead.", deprecated = true) private String categoryUri; - @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) - private String factorValue; /** * It could be the id of the measurement if there is no characteristic. @@ -117,19 +116,15 @@ public FactorValueValueObject( FactorValue value, boolean includeExperimentalFac if ( value.getMeasurement() != null ) { this.charId = value.getMeasurement().getId(); - this.factorValue = value.getMeasurement().getValue(); } else if ( value.getCharacteristics().size() == 1 ) { this.charId = value.getCharacteristics().iterator().next().getId(); - this.factorValue = FactorValueUtils.getSummaryString( value ); } else { // TODO: pick an arbitrary characteristic? - this.factorValue = FactorValueUtils.getSummaryString( value ); } this.needsAttention = value.getNeedsAttention(); } - /** * Create a FactorValue VO focusing on a specific statement. * @@ -183,13 +178,23 @@ public boolean isMeasurement() { } @Deprecated - @Schema(description = "This property is never filled nor used; use `summary` if you need a human-readable representation of this factor value.", deprecated = true) + @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) public String getDescription() { return getSummary(); } + @Deprecated + @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) + public String getFactorValue() { + if ( getMeasurement() != null ) { + // for backward-compatibility + return getMeasurement().getValue(); + } + return getSummary(); + } + @Override public String toString() { - return "FactorValueValueObject [factor=" + factorValue + ", value=" + value + "]"; + return "FactorValueValueObject [factor=" + getSummary() + ", value=" + value + "]"; } } \ No newline at end of file diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index 179692e0d6..31eac50bcb 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -12,7 +12,7 @@ is not initialized - omit `subsetFactorId` if `subsetFactor` is rendered - omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set - omit `charId` in `FactorValueValueObject` +- omit `charId` in `FactorValueValueObject` ### Update 2.8.0 From 6e58df0cf87f67f8186788ccfd1c538276dcf73c Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 14:53:42 -0400 Subject: [PATCH 70/99] Undeprecate isMeasurement and make it available for all FV VOs --- .../experiment/AbstractFactorValueValueObject.java | 11 +++++++++++ .../expression/experiment/FactorValueValueObject.java | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java index 5437c63705..632b3db6b7 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/AbstractFactorValueValueObject.java @@ -1,6 +1,8 @@ package ubic.gemma.model.expression.experiment; import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; import org.hibernate.Hibernate; @@ -96,4 +98,13 @@ protected AbstractFactorValueValueObject( FactorValue fv, boolean includeExperim this.summary = FactorValueUtils.getSummaryString( fv ); } + + /** + * Indicate if this FactorValue is a measurement. + */ + @Schema(description = "Indicate if this factor value represents a measurement. When this is true, the `measurement` field will be populated.") + @JsonProperty("isMeasurement") + public boolean isMeasurement() { + return getMeasurement() != null; + } } diff --git a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java index 8ca18f156e..d231ab129f 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/expression/experiment/FactorValueValueObject.java @@ -168,15 +168,6 @@ public MeasurementValueObject getMeasurementObject() { return getMeasurement(); } - /** - * Indicate if this FactorValue is a measurement. - */ - @Schema(description = "Check if a `measurement` key exists instead.", deprecated = true) - @JsonProperty("isMeasurement") - public boolean isMeasurement() { - return getMeasurement() != null; - } - @Deprecated @Schema(description = "Use `summary` if you need a human-readable representation of this factor value or lookup the `characteristics` bag.", deprecated = true) public String getDescription() { From 47b138d8ab585a073200fa6a098dbe6fc271dfcc Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 15:10:19 -0400 Subject: [PATCH 71/99] Adjust FV serializers to include isMeasurement and omit charId --- .../serializers/AbstractFactorValueValueObjectSerializer.java | 1 + .../rest/serializers/FactorValueValueObjectSerializer.java | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/serializers/AbstractFactorValueValueObjectSerializer.java b/gemma-rest/src/main/java/ubic/gemma/rest/serializers/AbstractFactorValueValueObjectSerializer.java index 4bfe17e4e2..93898e4195 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/serializers/AbstractFactorValueValueObjectSerializer.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/serializers/AbstractFactorValueValueObjectSerializer.java @@ -36,6 +36,7 @@ public void serialize( T factorValueValueObject, JsonGenerator jsonGenerator, Se jsonGenerator.writeObjectField( "experimentalFactorCategory", factorValueValueObject.getExperimentalFactorCategory() ); } serializeInternal( factorValueValueObject, jsonGenerator, serializerProvider ); + jsonGenerator.writeBooleanField( "isMeasurement", factorValueValueObject.isMeasurement() ); if ( factorValueValueObject.getMeasurement() != null ) { jsonGenerator.writeObjectField( "measurement", factorValueValueObject.getMeasurement() ); } diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java b/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java index 0f2c1ba52a..6b406debb6 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/serializers/FactorValueValueObjectSerializer.java @@ -20,9 +20,7 @@ protected void serializeInternal( FactorValueValueObject factorValueValueObject, jsonGenerator.writeStringField( "category", factorValueValueObject.getCategory() ); jsonGenerator.writeStringField( "categoryUri", factorValueValueObject.getCategoryUri() ); } - jsonGenerator.writeObjectField( "charId", factorValueValueObject.getCharId() ); jsonGenerator.writeStringField( "description", factorValueValueObject.getDescription() ); jsonGenerator.writeObjectField( "factorValue", factorValueValueObject.getFactorValue() ); - jsonGenerator.writeBooleanField( "isMeasurement", factorValueValueObject.isMeasurement() ); } } From 667b981ae7d0c6cf8baee484c456453354f77016 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 15:10:47 -0400 Subject: [PATCH 72/99] Few more cleanups for subset analysis serialization --- .../diff/DifferentialExpressionAnalysis.java | 25 ++++++++++++------- ...erentialExpressionAnalysisValueObject.java | 12 ++++++--- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysis.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysis.java index 842787d64e..73aa8fc745 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysis.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysis.java @@ -19,9 +19,10 @@ package ubic.gemma.model.analysis.expression.diff; import ubic.gemma.model.analysis.SingleExperimentAnalysis; +import ubic.gemma.model.expression.experiment.ExpressionExperimentSubSet; import ubic.gemma.model.expression.experiment.FactorValue; -import java.util.Collection; +import javax.annotation.Nullable; import java.util.HashSet; import java.util.Set; @@ -31,16 +32,18 @@ public class DifferentialExpressionAnalysis extends SingleExperimentAnalysis { private static final long serialVersionUID = -7855180617739271699L; - private FactorValue subsetFactorValue; + private Set resultSets = new HashSet<>(); + @Nullable + private FactorValue subsetFactorValue; + /** - * Groups of results produced by this ExpressionAnalysis. For example, in a two-way ANOVA, the model has 2 or 3 - * parameters. The statistical significance tests for each of the effects in the model are stored as separate - * ResultSet objects. Thus a two-way ANOVA with interactions will have three result sets: the two main effects and - * the interaction effect. - * - * @return the result sets + * Groups of results produced by this differential expression analysis. + *

+ * For example, in a two-way ANOVA, the model has 2 or 3 parameters. The statistical significance tests for each of + * the effects in the model are stored as separate {@link ExpressionAnalysisResultSet} objects. Thus, a two-way ANOVA + * with interactions will have three result sets: the two main effects and the interaction effect. */ public Set getResultSets() { return this.resultSets; @@ -50,11 +53,15 @@ public void setResultSets( Set resultSets ) { this.resultSets = resultSets; } + /** + * If non-null, a factor value applicable to the {@link ExpressionExperimentSubSet} being analyzed. + */ + @Nullable public FactorValue getSubsetFactorValue() { return this.subsetFactorValue; } - public void setSubsetFactorValue( FactorValue subsetFactorValue ) { + public void setSubsetFactorValue( @Nullable FactorValue subsetFactorValue ) { this.subsetFactorValue = subsetFactorValue; } diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java index f5d928acd1..5e98c52589 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java @@ -52,13 +52,14 @@ public class DifferentialExpressionAnalysisValueObject extends AnalysisValueObje @JsonInclude(JsonInclude.Include.NON_NULL) private Collection arrayDesignsUsed; private Long experimentAnalyzedId; - private Long sourceExperimentId; + // for subsets + @JsonInclude(JsonInclude.Include.NON_NULL) + private Long sourceExperimentId; @JsonInclude(JsonInclude.Include.NON_NULL) private ExperimentalFactorValueObject subsetFactor; @JsonInclude(JsonInclude.Include.NON_NULL) private Long subsetFactorId; - @JsonInclude(JsonInclude.Include.NON_NULL) private FactorValueValueObject subsetFactorValue; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -81,6 +82,7 @@ public DifferentialExpressionAnalysisValueObject( DifferentialExpressionAnalysis // sourceExperiment is eagerly fetched too this.sourceExperimentId = ( ( ExpressionExperimentSubSet ) analysis.getExperimentAnalyzed() ).getSourceExperiment().getId(); } + // this is only populated for subsets, but it's safer to always check if ( analysis.getSubsetFactorValue() != null ) { if ( Hibernate.isInitialized( analysis.getSubsetFactorValue() ) ) { this.subsetFactorValue = new FactorValueValueObject( analysis.getSubsetFactorValue(), false ); @@ -93,8 +95,8 @@ public DifferentialExpressionAnalysisValueObject( DifferentialExpressionAnalysis } else { this.subsetFactorValueId = analysis.getSubsetFactorValue().getId(); } - // fill in the factorValuesUsed separately, needs access to details of the subset. } + // fill in the factorValuesUsed separately, needs access to details of the subset. } /** @@ -110,6 +112,7 @@ public Long getBioAssaySetId() { * @deprecated use {@link #getSourceExperimentId()} instead */ @Deprecated + @JsonInclude(JsonInclude.Include.NON_NULL) @Schema(description = "This is deprecated, use sourceExperimentId instead.", deprecated = true) public Long getSourceExperiment() { return sourceExperimentId; @@ -140,8 +143,9 @@ public Map> getFactorValuesUsedByExperi } @JsonProperty("isSubset") + @Schema(description = "Indicate if this analysis is a subset of another experiment. if this is set, additional fields relevant to the subset will be populated.") public boolean isSubset() { - return this.sourceExperimentId != null || this.subsetFactorValue != null || this.subsetFactorValueId != null; + return this.sourceExperimentId != null; } @Override From 3ccd0024946a9801b23517319c28cd3f5311e6c5 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 15:31:37 -0400 Subject: [PATCH 73/99] rest: Omit aliases, accessions and multifunctionalityRank when not initialized --- .../java/ubic/gemma/model/genome/gene/GeneValueObject.java | 4 ++++ gemma-rest/src/main/resources/restapidocs/CHANGELOG.md | 1 + 2 files changed, 5 insertions(+) diff --git a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java index 0f1b7d12ab..838dc0f8a0 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java @@ -20,6 +20,7 @@ package ubic.gemma.model.genome.gene; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; import lombok.EqualsAndHashCode; import org.hibernate.Hibernate; @@ -49,6 +50,7 @@ public class GeneValueObject extends IdentifiableValueObject implements Se /** * Gene aliases, sorted alphabetically. */ + @JsonInclude(JsonInclude.Include.NON_NULL) private SortedSet aliases; /** * How many experiments "involve" (manipulate, etc.) this gene @@ -69,11 +71,13 @@ public class GeneValueObject extends IdentifiableValueObject implements Se */ @JsonIgnore private Boolean isQuery = true; + @JsonInclude(JsonInclude.Include.NON_NULL) private Double multifunctionalityRank; @JsonIgnore private String name; private Integer ncbiId; private String ensemblId; + @JsonInclude(JsonInclude.Include.NON_NULL) private Set accessions; @JsonIgnore private double[] nodeDegreeNegRanks; diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index 31eac50bcb..d8f77f79e0 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -13,6 +13,7 @@ - omit `subsetFactorId` if `subsetFactor` is rendered - omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set - omit `charId` in `FactorValueValueObject` +- omit `accessions`, `aliases` and `multifunctionalityRank` in `GeneValueObject` when not set ### Update 2.8.0 From 1642709519019d9fe5bc82546d5f1b350d5c6a90 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 18:22:47 -0400 Subject: [PATCH 74/99] Popuate baselines in getResultSet() --- .../expression/diff/ExpressionAnalysisResultSetDaoImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index 9f74efb990..027840e2a1 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -483,7 +483,9 @@ protected DifferentialExpressionAnalysisResultSetValueObject doLoadValueObject( @Override public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet entity ) { - return new DifferentialExpressionAnalysisResultSetValueObject( entity, loadResultToGenesMap( entity ) ); + DifferentialExpressionAnalysisResultSetValueObject r = new DifferentialExpressionAnalysisResultSetValueObject( entity, loadResultToGenesMap( entity ) ); + postProcessValueObjects( Collections.singletonList( r ) ); + return r; } @Override From 68df0e5e51cf235464f7efe6b2f39f15947b9d4f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 18:50:46 -0400 Subject: [PATCH 75/99] Add extra initialization for factors for safety and clarity --- .../diff/ExpressionAnalysisResultSetDaoImpl.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index 027840e2a1..084795738a 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -219,22 +219,24 @@ public void thaw( ExpressionAnalysisResultSet ears ) { Hibernate.initialize( ears.getAnalysis() ); Hibernate.initialize( ears.getAnalysis().getExperimentAnalyzed() ); + // this is important to thaw because it does not appear in the experimental factors if ( ears.getAnalysis().getSubsetFactorValue() != null ) { Hibernate.initialize( ears.getAnalysis().getSubsetFactorValue() ); Hibernate.initialize( ears.getAnalysis().getSubsetFactorValue().getExperimentalFactor() ); } - if ( ears.getBaselineGroup() != null ) { - Hibernate.initialize( ears.getBaselineGroup() ); - Hibernate.initialize( ears.getBaselineGroup().getExperimentalFactor() ); - } - // it is faster to query those separately because there's a large number of rows fetched via the results & // contrasts and only a handful of factors // factor values are always eagerly fetched (see ExperimentalFactor.hbm.xml), so we don't need to initialize. // I still think it's neat to use stream API for that though in case we ever make them lazy: // resultSet.getExperimentalFactors().stream().forEach( Hibernate::initialize ); Hibernate.initialize( ears.getExperimentalFactors() ); + + // this should already be covered by initializing the experimental factors, but we're being extra careful + if ( ears.getBaselineGroup() != null ) { + Hibernate.initialize( ears.getBaselineGroup() ); + Hibernate.initialize( ears.getBaselineGroup().getExperimentalFactor() ); + } } private void thawResultsAndContrasts( ExpressionAnalysisResultSet ears ) { @@ -246,14 +248,18 @@ private void thawResultsAndContrasts( ExpressionAnalysisResultSet ears ) { for ( DifferentialExpressionAnalysisResult r : ears.getResults() ) { Hibernate.initialize( r.getContrasts() ); } + // this should already be covered by initializing the experimental factors, but to be extra-safe, we should make + // sure it's thawed as well for ( DifferentialExpressionAnalysisResult r : ears.getResults() ) { for ( ContrastResult cr : r.getContrasts() ) { Hibernate.initialize( cr ); if ( cr.getFactorValue() != null ) { Hibernate.initialize( cr.getFactorValue() ); + Hibernate.initialize( cr.getFactorValue().getExperimentalFactor() ); } if ( cr.getSecondFactorValue() != null ) { Hibernate.initialize( cr.getSecondFactorValue() ); + Hibernate.initialize( cr.getSecondFactorValue().getExperimentalFactor() ); } } } From 9daeb8769ff5fdbe22db2aedb944aa181cf48049 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 18:51:42 -0400 Subject: [PATCH 76/99] rest: Exclude unfilled baselineGroup and secondBaselineGroup --- ...rentialExpressionAnalysisResultSetValueObject.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java index cde6d8f2b5..cf042d06ce 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java @@ -6,6 +6,7 @@ import ubic.gemma.model.expression.experiment.FactorValueBasicValueObject; import ubic.gemma.model.genome.Gene; +import javax.annotation.Nullable; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -19,7 +20,10 @@ public class DifferentialExpressionAnalysisResultSetValueObject extends Analysis private DifferentialExpressionAnalysisValueObject analysis; private Collection experimentalFactors; + @Nullable + @JsonInclude(JsonInclude.Include.NON_NULL) private FactorValueBasicValueObject baselineGroup; + @Nullable @JsonInclude(JsonInclude.Include.NON_NULL) private FactorValueBasicValueObject secondBaselineGroup; @@ -77,19 +81,22 @@ public void setExperimentalFactors( Collection ex this.experimentalFactors = experimentalFactors; } + @Nullable public FactorValueBasicValueObject getBaselineGroup() { return baselineGroup; } - public void setBaselineGroup( FactorValueBasicValueObject baselineGroup ) { + public void setBaselineGroup( @Nullable FactorValueBasicValueObject baselineGroup ) { this.baselineGroup = baselineGroup; } + @Nullable + @SuppressWarnings("unused") public FactorValueBasicValueObject getSecondBaselineGroup() { return secondBaselineGroup; } - public void setSecondBaselineGroup( FactorValueBasicValueObject secondBaselineGroup ) { + public void setSecondBaselineGroup( @Nullable FactorValueBasicValueObject secondBaselineGroup ) { this.secondBaselineGroup = secondBaselineGroup; } From 8a3a5a632ddaf800959f2fd08f4e83a6048008ba Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Wed, 31 Jul 2024 18:52:07 -0400 Subject: [PATCH 77/99] rest: Mention fix for baselines population in changelogs --- gemma-rest/src/main/resources/restapidocs/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index d8f77f79e0..81556c3232 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -14,6 +14,7 @@ - omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set - omit `charId` in `FactorValueValueObject` - omit `accessions`, `aliases` and `multifunctionalityRank` in `GeneValueObject` when not set +- populate `baselineGroup` and `secondBaselineGroup` in `getResultSet()` for interaction and continuous factors ### Update 2.8.0 From 667b06f2a3002b51b051ccc19afcc36a9bb398d6 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 1 Aug 2024 11:11:26 -0400 Subject: [PATCH 78/99] Use a faster path when retrieving genes for a slice of results --- .../diff/ExpressionAnalysisResultSetDao.java | 10 +++++-- .../ExpressionAnalysisResultSetDaoImpl.java | 28 +++++++++++-------- .../ExpressionAnalysisResultSetService.java | 2 +- ...xpressionAnalysisResultSetServiceImpl.java | 6 ++-- .../gemma/persistence/util/QueryUtils.java | 5 ++++ .../rest/AnalysisResultSetsWebService.java | 6 ++-- 6 files changed, 35 insertions(+), 22 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java index 2dcb635114..c0cf1c9833 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java @@ -75,10 +75,12 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao * Note: Not all probes have associated genes, so you should use {@link Map#getOrDefault(Object, Object)} with an * empty collection to handle this case. + * @param queryByResult query by results instead of result set, this is considerably faster if the results are + * sliced (i.e. from {@link #loadWithResultsAndContrasts(Long, int, int)}) */ - Map> loadResultToGenesMap( ExpressionAnalysisResultSet resultSet ); + Map> loadResultToGenesMap( ExpressionAnalysisResultSet resultSet, boolean queryByResult ); /** * Retrieve result sets associated to a set of {@link BioAssaySet} and external database entries. diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index 084795738a..3f258562c4 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -488,30 +488,37 @@ protected DifferentialExpressionAnalysisResultSetValueObject doLoadValueObject( } @Override - public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet entity ) { - DifferentialExpressionAnalysisResultSetValueObject r = new DifferentialExpressionAnalysisResultSetValueObject( entity, loadResultToGenesMap( entity ) ); + public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet entity, boolean queryGenesByResult ) { + DifferentialExpressionAnalysisResultSetValueObject r = new DifferentialExpressionAnalysisResultSetValueObject( entity, loadResultToGenesMap( entity, queryGenesByResult ) ); postProcessValueObjects( Collections.singletonList( r ) ); return r; } @Override - public Map> loadResultToGenesMap( ExpressionAnalysisResultSet resultSet ) { + public Map> loadResultToGenesMap( ExpressionAnalysisResultSet resultSet, boolean queryByResult ) { + String q = "select result.ID as RESULT_ID, {gene.*} from DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT result " + + "join GENE2CS on GENE2CS.CS = result.PROBE_FK " + + "join CHROMOSOME_FEATURE as {gene} on {gene}.ID = GENE2CS.GENE " + + "where " + ( queryByResult ? "result.ID in :rids" : "result.RESULT_SET_FK = :rsid" ); + Query query = getSessionFactory().getCurrentSession() - .createSQLQuery( "select result.ID as RESULT_ID, {gene.*} from DIFFERENTIAL_EXPRESSION_ANALYSIS_RESULT result " - + "join GENE2CS on GENE2CS.CS = result.PROBE_FK " - + "join CHROMOSOME_FEATURE as {gene} on {gene}.ID = GENE2CS.GENE " - + "where result.RESULT_SET_FK = :rsid" ) + .createSQLQuery( q ) .addSynchronizedQuerySpace( GENE2CS_QUERY_SPACE ) .addSynchronizedEntityClass( ArrayDesign.class ) .addSynchronizedEntityClass( CompositeSequence.class ) .addSynchronizedEntityClass( Gene.class ) .addScalar( "RESULT_ID", StandardBasicTypes.LONG ) .addEntity( "gene", Gene.class ) - .setParameter( "rsid", resultSet.getId() ) // analysis results are immutable and the GENE2CS is generated, so flushing is pointless .setFlushMode( FlushMode.MANUAL ) .setCacheable( true ); + if ( queryByResult ) { + query.setParameterList( "rids", EntityUtils.getIds( resultSet.getResults() ) ); + } else { + query.setParameter( "rsid", resultSet.getId() ); + } + //noinspection unchecked List list = query.list(); @@ -519,10 +526,7 @@ public Map> loadResultToGenesMap( ExpressionAnalysisResultSet r return list.stream() .collect( Collectors.groupingBy( l -> ( Long ) l[0], - Collectors.collectingAndThen( Collectors.toList(), - elem -> elem.stream() - .map( l -> ( Gene ) l[1] ) - .collect( Collectors.toList() ) ) ) ); + Collectors.mapping( l -> ( Gene ) l[1], Collectors.toList() ) ) ); } /** diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java index d81002dd20..1c15227ad0 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetService.java @@ -37,7 +37,7 @@ public interface ExpressionAnalysisResultSetService extends AnalysisResultSetSer ExpressionAnalysisResultSet loadWithExperimentAnalyzed( Long id ); - DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears ); + DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears, boolean queryByResult ); Map> loadResultIdToGenesMap( ExpressionAnalysisResultSet ears ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java index 1ddf56ac31..ddaf67c0e4 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java @@ -84,14 +84,14 @@ public ExpressionAnalysisResultSet loadWithExperimentAnalyzed( Long id ) { @Override @Transactional(readOnly = true) - public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears ) { - return voDao.loadValueObjectWithResults( ears ); + public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears, boolean queryByResult ) { + return voDao.loadValueObjectWithResults( ears, queryByResult ); } @Override @Transactional(readOnly = true) public Map> loadResultIdToGenesMap( ExpressionAnalysisResultSet resultSet ) { - return voDao.loadResultToGenesMap( resultSet ); + return voDao.loadResultToGenesMap( resultSet, false ); } @Override diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/util/QueryUtils.java b/gemma-core/src/main/java/ubic/gemma/persistence/util/QueryUtils.java index fac1c339ee..beab593e52 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/util/QueryUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/util/QueryUtils.java @@ -194,6 +194,11 @@ public static > int executeUpdateByBatch( Query query, S return updated; } + public static Stream stream( Query query, Class clazz ) { + //noinspection unchecked + return query.list().stream(); + } + public static String escapeLike( String s ) { return s.replaceAll( "[%_\\\\]", "\\\\$0" ); } diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java b/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java index 1a60e22c89..480acbfbae 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java @@ -222,7 +222,7 @@ private ResponseDataObject g if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } - return respond( expressionAnalysisResultSetService.loadValueObjectWithResults( ears ) ); + return respond( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, false ) ); } } @@ -232,7 +232,7 @@ private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSe throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } long totalElements = expressionAnalysisResultSetService.countResults( ears ); - return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears ), null, offset, limit, totalElements ); + return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, true ), null, offset, limit, totalElements ); } private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, double threshold, int offset, int limit ) { @@ -241,7 +241,7 @@ private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSe throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } long totalElements = expressionAnalysisResultSetService.countResults( ears, threshold ); - return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears ), threshold, offset, limit, totalElements ); + return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, true ), threshold, offset, limit, totalElements ); } private StreamingOutput getResultSetAsTsv( ExpressionAnalysisResultSetArg analysisResultSet ) { From 1b0362033855796f03859ec3e2958922ded01129 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 1 Aug 2024 11:22:48 -0400 Subject: [PATCH 79/99] Cache queries that count the number of results in a result set --- .../expression/diff/ExpressionAnalysisResultSetDaoImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java index 3f258562c4..99a7352c0d 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDaoImpl.java @@ -270,6 +270,7 @@ public long countResults( ExpressionAnalysisResultSet ears ) { return ( Long ) getSessionFactory().getCurrentSession() .createQuery( "select count(*) from ExpressionAnalysisResultSet ears join ears.results where ears = :ears" ) .setParameter( "ears", ears ) + .setCacheable( true ) .uniqueResult(); } @@ -279,6 +280,7 @@ public long countResults( ExpressionAnalysisResultSet ears, double threshold ) { .createQuery( "select count(*) from ExpressionAnalysisResultSet ears join ears.results r where ears = :ears and r.correctedPvalue <= :threshold" ) .setParameter( "ears", ears ) .setParameter( "threshold", threshold ) + .setCacheable( true ) .uniqueResult(); } From e73b022ec02cd08de2d19801b2387e3af82abbe6 Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Thu, 1 Aug 2024 12:53:05 -0700 Subject: [PATCH 80/99] Deal with case of multi-species data sets that we pre-split A little clumsy but works --- .../geo/service/GeoServiceImpl.java | 135 ++++++++++-------- 1 file changed, 76 insertions(+), 59 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java index f850812789..40efd38a89 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoServiceImpl.java @@ -296,6 +296,8 @@ public void updateFromGEO( String geoAccession ) { if ( ees.isEmpty() ) { throw new IllegalArgumentException( "No experiment with accession " + geoAccession + " found in Gemma" ); + } else { + log.info( "Updating " + ees.size() + " experiments from accession " + geoAccession ); } // other complications arise if this is a multiplatform data set that was switched/merged etc, but we will take the data for the corresponding GSMs. @@ -313,90 +315,105 @@ public void updateFromGEO( String geoAccession ) { Object obj = parseResult.iterator().next(); GeoSeries series = ( GeoSeries ) obj; Collection result = ( Collection ) geoConverter.convert( series, true ); - this.getPubMedInfo( result ); /* * We're never splitting by platform, so we should have only one result. */ if ( result.isEmpty() ) { throw new IllegalStateException( "No result from fetching and coversion of " + geoAccession ); - } else if ( result.size() > 1 ) { - throw new IllegalStateException( "Got more than one result from fetching and coversion of " + geoAccession ); + } else { + log.info( "Got " + result.size() + " experiments from GEO for " + geoAccession ); } - ExpressionExperiment freshFromGEO = result.iterator().next(); + this.getPubMedInfo( result ); - // make map of characteristics by GSM ID for biassays - Map freshBAsByGSM = new HashMap<>(); - for ( BioAssay ba : freshFromGEO.getBioAssays() ) { - String acc = ba.getAccession().getAccession(); - freshBAsByGSM - .put( acc, ba ); - } + // multi-species automatically split by Gemma at conversion stage so we may have >1 + for ( ExpressionExperiment freshFromGEO : result ) { - BibliographicReference primaryPublication = freshFromGEO.getPrimaryPublication(); + // make map of characteristics by GSM ID for biassays + Map freshBAsByGSM = new HashMap<>(); + for ( BioAssay ba : freshFromGEO.getBioAssays() ) { + String acc = ba.getAccession().getAccession(); + freshBAsByGSM + .put( acc, ba ); + } - // update the experiment in Gemma: - // 1) publication - // 2) BioMaterial Characteristics (mostly for backporting) - // 3) Original platform (this is for backporting, and may be removed in the future) - for ( ExpressionExperiment ee : ees ) { // because it could be a split - int numNewCharacteristics = 0; - boolean pubUpdate = false; + BibliographicReference primaryPublication = freshFromGEO.getPrimaryPublication(); - ee = expressionExperimentService.thawLite( ee ); + // update the experiment in Gemma: + // 1) publication + // 2) BioMaterial Characteristics (mostly for backporting) + // 3) Original platform (this is for backporting, and may be removed in the future) + for ( ExpressionExperiment ee : ees ) { // because it could be a split by us. - if ( ee.getPrimaryPublication() == null && primaryPublication != null ) { - log.info( "Found new primary publication for " + geoAccession + ": " + primaryPublication.getPubAccession() ); - primaryPublication = ( BibliographicReference ) persisterHelper.persist( primaryPublication ); - ee.setPrimaryPublication( primaryPublication ); // persist first? - pubUpdate = true; - } + /* + * If we have more than one result from GEO due to species-splitting, + * then we could try to match to the existing one instead of looping over all the ones in Gemma, + * but it doesn't really matter, the loop over bioassays won't do anything for the mismatched one. + */ - for ( BioAssay ba : ee.getBioAssays() ) { - BioMaterial bm = ba.getSampleUsed(); - String gsmID = ba.getAccession().getAccession(); + int numNewCharacteristics = 0; + boolean pubUpdate = false; - if ( !freshBAsByGSM.containsKey( gsmID ) ) { // sanity check ... - log.warn( "GEO didn't have " + gsmID + " associated with " + ee ); - continue; + ee = expressionExperimentService.thawLite( ee ); + + if ( ee.getPrimaryPublication() == null && primaryPublication != null ) { + log.info( "Found new primary publication for " + geoAccession + ": " + primaryPublication.getPubAccession() ); + primaryPublication = ( BibliographicReference ) persisterHelper.persist( primaryPublication ); + ee.setPrimaryPublication( primaryPublication ); // persist first? + pubUpdate = true; } - // fill in the original paltform, if we need to. - ArrayDesign arrayDesignUsed = freshBAsByGSM.get( gsmID ).getArrayDesignUsed(); - if ( ba.getOriginalPlatform() == null ) { - ArrayDesign ad = arrayDesignService.findByShortName( arrayDesignUsed.getShortName() ); - if ( ad != null ) { - log.info( "Updating original platform for " + gsmID + " in " + ee.getShortName() + " = " + arrayDesignUsed ); - ba.setOriginalPlatform( ad ); - bioAssayService.update( ba ); - } else { - log.warn( "Could not update original platform for " + gsmID + " in " + ee.getShortName() + ", it was not in the system: " + arrayDesignUsed ); + for ( BioAssay ba : ee.getBioAssays() ) { + BioMaterial bm = ba.getSampleUsed(); + String gsmID = ba.getAccession().getAccession(); + + if ( !freshBAsByGSM.containsKey( gsmID ) ) { // sanity check ... + // suppress this warning, because if we split up front, then this is expected. + //log.warn( "GEO didn't have " + gsmID + " associated with " + ee ); + continue; + } + + // fill in the original paltform, if we need to. + ArrayDesign arrayDesignUsed = freshBAsByGSM.get( gsmID ).getArrayDesignUsed(); + if ( ba.getOriginalPlatform() == null ) { + ArrayDesign ad = arrayDesignService.findByShortName( arrayDesignUsed.getShortName() ); + if ( ad != null ) { + log.info( "Updating original platform for " + gsmID + " in " + ee.getShortName() + " = " + arrayDesignUsed ); + ba.setOriginalPlatform( ad ); + bioAssayService.update( ba ); + } else { + log.warn( "Could not update original platform for " + gsmID + " in " + ee.getShortName() + ", it was not in the system: " + arrayDesignUsed ); + } } - } /* delete the old characteristics and start over. Trying to match them up will often fail, and adding them instead of deleting them just creats a mess. */ - Set bmchars = bm.getCharacteristics(); - int numOldChars = bmchars.size(); - bmchars.clear(); - characteristicService.remove( bmchars ); - Collection freshCharacteristics = freshBAsByGSM.get( gsmID ).getSampleUsed().getCharacteristics(); - if ( log.isDebugEnabled() ) - log.debug( "Found " + freshCharacteristics.size() + " characteristics for " + gsmID + " replacing " + numOldChars + " old ones ..." ); - bmchars.addAll( freshCharacteristics ); - numNewCharacteristics += freshCharacteristics.size(); - bioMaterialService.update( bm ); - } + Set bmchars = bm.getCharacteristics(); + int numOldChars = bmchars.size(); + bmchars.clear(); + characteristicService.remove( bmchars ); + Collection freshCharacteristics = freshBAsByGSM.get( gsmID ).getSampleUsed().getCharacteristics(); + if ( log.isDebugEnabled() ) + log.debug( "Found " + freshCharacteristics.size() + " characteristics for " + gsmID + " replacing " + numOldChars + " old ones ..." ); + bmchars.addAll( freshCharacteristics ); + numNewCharacteristics += freshCharacteristics.size(); + bioMaterialService.update( bm ); + } - expressionExperimentService.update( ee ); - String message = " Updated from GEO; " + numNewCharacteristics + " characteristics added/replaced" + ( pubUpdate ? "; Publication added" : "" ); - log.info( ee.getShortName() + message ); - auditTrailService.addUpdateEvent( ee, ExpressionExperimentUpdateFromGEOEvent.class, message ); - } + if (numNewCharacteristics == 0 ) { + // that's okay but probably shouldn't do anything + } else { + expressionExperimentService.update( ee ); + String message = " Updated from GEO; " + numNewCharacteristics + " characteristics added/replaced" + ( pubUpdate ? "; Publication added" : "" ); + log.info( ee.getShortName() + message ); + auditTrailService.addUpdateEvent( ee, ExpressionExperimentUpdateFromGEOEvent.class, message ); + } + } + } } From 384d586f05d64406a9af985a54d55943c99cacf0 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 1 Aug 2024 11:50:33 -0400 Subject: [PATCH 81/99] Migrate to Hibernate 4.0 XML schema Patch LocalSessionFactoryBean to use an entity resolver that can load Hibernate XSD schemas from the classpath. Due to the new schemas, we cannot use Hibernate hbm2ddm ant tasks because they cannot use the XSD entity resolver. Instead, the database initialization is reimplemented as a Spring DataSourceInitializer and a bunch of DataSourcePopulator. Remove all the build logic for generating DDL SQL files, those are now done at runtime in tests. Add a CLI for populating the test database manually. This CLI is only available when the testdb profile is active to prevent accidental usages. Fix the PersistentDummyObjectHelper which incorrectly retains entities in static properties. This is breaking the test context when the database is regenerated. --- .../core/apps/InitializeDatabaseCli.java | 87 ++++++++++++ gemma-core/pom.xml | 130 +----------------- .../hibernate/LocalSessionFactoryBean.java | 129 +++++++++++++++++ .../hibernate/XSDEntityResolver.java | 28 ++++ .../persistence/hibernate/package-info.java | 8 ++ .../BootstrappedDataSourceInitializer.java | 36 +++++ .../CreateDatabasePopulator.java | 39 ++++++ .../DatabaseSchemaPopulator.java | 73 ++++++++++ .../initialization/InitialDataPopulator.java | 47 +++++++ .../initialization/package-info.java | 7 + .../resources/sql/init-data-slim.sql | 0 .../gemma/applicationContext-hibernate.xml | 2 +- .../gemma/model/analysis/Analysis.hbm.xml | 8 +- .../model/analysis/AnalysisResultSet.hbm.xml | 8 +- .../model/analysis/BlacklistedEntity.hbm.xml | 7 +- .../model/analysis/Investigation.hbm.xml | 7 +- .../ExpressionExperimentSet.hbm.xml | 8 +- .../CoexpCorrelationDistribution.hbm.xml | 6 +- .../coexpression/GeneCoexpressedGenes.hbm.xml | 6 +- .../GeneCoexpressionTestedIn.hbm.xml | 6 +- .../coexpression/HumanSupportDetails.hbm.xml | 7 +- .../coexpression/MouseSupportDetails.hbm.xml | 7 +- .../coexpression/OtherSupportDetails.hbm.xml | 7 +- .../coexpression/RatSupportDetails.hbm.xml | 7 +- .../SampleCoexpressionMatrix.hbm.xml | 8 +- .../expression/diff/ContrastResult.hbm.xml | 8 +- ...fferentialExpressionAnalysisResult.hbm.xml | 6 +- ...entialExpressionMetaAnalysisResult.hbm.xml | 7 +- .../expression/diff/HitListSize.hbm.xml | 8 +- .../diff/PvalueDistribution.hbm.xml | 6 +- .../expression/pca/Eigenvalue.hbm.xml | 8 +- .../expression/pca/Eigenvector.hbm.xml | 8 +- .../expression/pca/ProbeLoading.hbm.xml | 8 +- .../BioSequence2GeneProduct.hbm.xml | 7 +- .../association/Gene2GOAssociation.hbm.xml | 7 +- .../GeneCoexpressionNodeDegree.hbm.xml | 7 +- .../HumanExperimentCoexpressionLink.hbm.xml | 8 +- .../HumanGeneCoExpression.hbm.xml | 8 +- .../MouseExperimentCoexpressionLink.hbm.xml | 8 +- .../MouseGeneCoExpression.hbm.xml | 8 +- .../OtherExperimentCoexpressionLink.hbm.xml | 8 +- .../OtherGeneCoExpression.hbm.xml | 8 +- .../RatExperimentCoexpressionLink.hbm.xml | 7 +- .../coexpression/RatGeneCoExpression.hbm.xml | 8 +- .../phenotype/PhenotypeAssociation.hbm.xml | 6 +- .../PhenotypeAssociationPublication.hbm.xml | 6 +- .../auditAndSecurity/AuditEvent.hbm.xml | 7 +- .../auditAndSecurity/AuditTrail.hbm.xml | 8 +- .../common/auditAndSecurity/Contact.hbm.xml | 6 +- .../auditAndSecurity/GroupAuthority.hbm.xml | 8 +- .../common/auditAndSecurity/JobInfo.hbm.xml | 8 +- .../common/auditAndSecurity/UserGroup.hbm.xml | 8 +- .../curation/CurationDetails.hbm.xml | 6 +- .../eventType/AuditEventType.hbm.xml | 7 +- .../description/BibRefAnnotation.hbm.xml | 8 +- .../BibliographicReference.hbm.xml | 8 +- .../common/description/Characteristic.hbm.xml | 6 +- .../common/description/DatabaseEntry.hbm.xml | 7 +- .../description/ExternalDatabase.hbm.xml | 8 +- .../common/measurement/Measurement.hbm.xml | 6 +- .../model/common/measurement/Unit.hbm.xml | 8 +- .../model/common/protocol/Protocol.hbm.xml | 8 +- .../quantitationtype/QuantitationType.hbm.xml | 8 +- .../arrayDesign/AlternateName.hbm.xml | 8 +- .../arrayDesign/ArrayDesign.hbm.xml | 6 +- .../expression/bioAssay/BioAssay.hbm.xml | 8 +- .../bioAssayData/BioAssayDimension.hbm.xml | 7 +- .../bioAssayData/MeanVarianceRelation.hbm.xml | 8 +- .../ProcessedExpressionDataVector.hbm.xml | 8 +- .../RawExpressionDataVector.hbm.xml | 8 +- .../biomaterial/BioMaterial.hbm.xml | 8 +- .../expression/biomaterial/Compound.hbm.xml | 8 +- .../expression/biomaterial/Treatment.hbm.xml | 8 +- .../designElement/CompositeSequence.hbm.xml | 8 +- .../experiment/ExperimentalDesign.hbm.xml | 8 +- .../experiment/ExperimentalFactor.hbm.xml | 8 +- .../expression/experiment/FactorValue.hbm.xml | 8 +- .../model/expression/experiment/Geeq.hbm.xml | 6 +- .../gemma/model/genome/Chromosome.hbm.xml | 8 +- .../model/genome/ChromosomeFeature.hbm.xml | 6 +- .../model/genome/PhysicalLocation.hbm.xml | 8 +- .../ubic/gemma/model/genome/Taxon.hbm.xml | 8 +- .../genome/biosequence/BioSequence.hbm.xml | 6 +- .../gemma/model/genome/gene/GeneAlias.hbm.xml | 8 +- .../gemma/model/genome/gene/GeneSet.hbm.xml | 6 +- .../model/genome/gene/GeneSetMember.hbm.xml | 8 +- .../genome/gene/Multifunctionality.hbm.xml | 8 +- .../SequenceSimilaritySearchResult.hbm.xml | 8 +- .../matrix/MatrixConversionTest.java | 2 +- .../expression/arrayDesign/MockBlat.java | 2 +- .../core/util/test/BaseDatabaseTest.java | 56 +++----- .../core/util/test/BaseIntegrationTest.java | 4 +- .../core/util/test/BaseSpringContextTest.java | 2 +- .../test/PersistentDummyObjectHelper.java | 104 +++++++------- .../hibernate/HibernateConfigTest.java | 11 +- ...BootstrappedDataSourceInitializerTest.java | 16 +++ .../AbstractFilteringVoEnabledDaoTest.java | 2 +- ...plicationContext-dataSourceInitializer.xml | 34 +++++ pom.xml | 2 +- 99 files changed, 835 insertions(+), 547 deletions(-) create mode 100644 gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/hibernate/LocalSessionFactoryBean.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/hibernate/XSDEntityResolver.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/hibernate/package-info.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/DatabaseSchemaPopulator.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/InitialDataPopulator.java create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/package-info.java rename gemma-core/src/{test => main}/resources/sql/init-data-slim.sql (100%) create mode 100644 gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java create mode 100644 gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java new file mode 100644 index 0000000000..a145941519 --- /dev/null +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java @@ -0,0 +1,87 @@ +package ubic.gemma.core.apps; + +import com.zaxxer.hikari.HikariDataSource; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Profile; +import org.springframework.jdbc.datasource.init.CompositeDatabasePopulator; +import org.springframework.jdbc.datasource.init.DataSourceInitializer; +import ubic.gemma.core.util.AbstractCLI; +import ubic.gemma.persistence.hibernate.LocalSessionFactoryBean; +import ubic.gemma.persistence.initialization.BootstrappedDataSourceInitializer; +import ubic.gemma.persistence.initialization.CreateDatabasePopulator; +import ubic.gemma.persistence.initialization.DatabaseSchemaPopulator; +import ubic.gemma.persistence.initialization.InitialDataPopulator; + +import javax.annotation.Nullable; +import javax.sql.DataSource; + +/** + * This is exclusively available for the test database. + */ +@Profile("testdb") +public class InitializeDatabaseCli extends AbstractCLI { + + @Autowired + private DataSource dataSource; + + @Autowired + private LocalSessionFactoryBean factory; + + @Value("${gemma.testdb.name}") + private String databaseName; + + @Nullable + @Override + public String getCommandName() { + return "initializeDatabase"; + } + + @Nullable + @Override + public String getShortDesc() { + return ""; + } + + @Override + public GemmaCLI.CommandGroup getCommandGroup() { + return GemmaCLI.CommandGroup.MISC; + } + + @Override + protected void buildOptions( Options options ) { + } + + @Override + protected void processOptions( CommandLine commandLine ) throws ParseException { + } + + @Override + protected void doWork() throws Exception { + String jdbcUrl; + if ( dataSource instanceof HikariDataSource ) { + jdbcUrl = ( ( HikariDataSource ) dataSource ).getJdbcUrl(); + } else { + jdbcUrl = dataSource.toString(); + } + promptConfirmationOrAbort( "The following data source will be initialized: " + jdbcUrl ); + BootstrappedDataSourceInitializer bdi = new BootstrappedDataSourceInitializer(); + bdi.setDataSource( dataSource ); + CreateDatabasePopulator cdb = new CreateDatabasePopulator( databaseName ); + cdb.setDropIfExists( true ); + bdi.setDatabasePopulator( cdb ); + bdi.afterPropertiesSet(); + DataSourceInitializer di = new DataSourceInitializer(); + di.setDataSource( dataSource ); + CompositeDatabasePopulator cdp = new CompositeDatabasePopulator(); + cdp.addPopulators( + new DatabaseSchemaPopulator( factory, "mysql" ), + new InitialDataPopulator( false ) ); + di.setDatabasePopulator( cdp ); + di.setEnabled( true ); + di.afterPropertiesSet(); + } +} diff --git a/gemma-core/pom.xml b/gemma-core/pom.xml index 40ac00fe44..22bf36a417 100644 --- a/gemma-core/pom.xml +++ b/gemma-core/pom.xml @@ -34,55 +34,7 @@ - - schema-export - generate-resources - - run - - - - - - - - - - - - - - org.hibernate - hibernate-core - ${hibernate.version} - - - dom4j - dom4j - - - - - org.dom4j - dom4j - ${dom4j.version} - runtime - - - - org.apache.logging.log4j - log4j-core - ${log4j.version} - - - org.apache.logging.log4j - log4j-1.2-api - ${log4j.version} - - org.apache.maven.plugins @@ -95,6 +47,7 @@ + log4j-test.properties @@ -106,25 +59,6 @@ maven-dependency-plugin 3.3.0 - - unpack-gsec-sql-schemas - process-resources - - unpack - - - - - pavlab - gemma-gsec - ${gsec.version} - true - ${project.build.directory}/schema - **/*.sql - - - - unpack-spring-security-test generate-test-sources @@ -164,68 +98,6 @@ - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - com.mysql - mysql-connector-j - ${mysql.version} - runtime - - - - - com.mysql.cj.jdbc.Driver - ${gemma.testdb.build.user} - ${gemma.testdb.build.password} - true - abort - - - - drop-add-testdb - pre-integration-test - - execute - - - ${bootstrap.db.url} - - - - - ${skipIntegrationTests} - - - - load-testdb-schema - pre-integration-test - - execute - - - ${gemma.testdb.build.url} - - ${project.build.directory}/schema/gemma-ddl.sql - ${project.build.directory}/schema/gemma/gsec/sql/gsec-acl-ddl.sql - ${project.build.directory}/schema/gemma/gsec/sql/init-acl-indices.sql - ${project.basedir}/src/main/resources/sql/init-acls.sql - ${project.basedir}/src/main/resources/sql/init-entities.sql - ${project.basedir}/src/main/resources/sql/mysql/init-entities.sql - ${project.basedir}/src/main/resources/sql/init-data.sql - - - ${skipIntegrationTests} - - - - diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/LocalSessionFactoryBean.java b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/LocalSessionFactoryBean.java new file mode 100644 index 0000000000..5b5849c470 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/LocalSessionFactoryBean.java @@ -0,0 +1,129 @@ +package ubic.gemma.persistence.hibernate; + +import org.hibernate.SessionFactory; +import org.hibernate.cfg.Configuration; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.ResourceLoaderAware; +import org.springframework.core.io.Resource; +import org.springframework.core.io.ResourceLoader; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.core.io.support.ResourcePatternResolver; +import org.springframework.core.io.support.ResourcePatternUtils; +import org.springframework.orm.hibernate4.LocalSessionFactoryBuilder; + +import javax.sql.DataSource; +import java.io.IOException; +import java.util.Properties; + +/** + * Reimplementation of {@link org.springframework.orm.hibernate4.LocalSessionFactoryBean} that supports resolving XSD + * schemas in the classpath. + *

+ * It's been slimmed down to what we actually use in Gemma. + * @see XSDEntityResolver + * @see org.springframework.orm.hibernate4.LocalSessionFactoryBean + */ +public class LocalSessionFactoryBean + implements FactoryBean, ResourceLoaderAware, InitializingBean, DisposableBean { + + private DataSource dataSource; + + private Resource[] configLocations; + + private Properties hibernateProperties; + + private Class[] annotatedClasses; + + private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); + + private Configuration configuration; + + private SessionFactory sessionFactory; + + public void setDataSource( DataSource dataSource ) { + this.dataSource = dataSource; + } + + public void setConfigLocation( Resource configLocation ) { + this.configLocations = new Resource[] { configLocation }; + } + + public void setHibernateProperties( Properties hibernateProperties ) { + this.hibernateProperties = hibernateProperties; + } + + /** + * Return the Hibernate properties, if any. Mainly available for + * configuration through property paths that specify individual keys. + */ + public Properties getHibernateProperties() { + if ( this.hibernateProperties == null ) { + this.hibernateProperties = new Properties(); + } + return this.hibernateProperties; + } + + public void setAnnotatedClasses( Class... annotatedClasses ) { + this.annotatedClasses = annotatedClasses; + } + + public void setResourceLoader( ResourceLoader resourceLoader ) { + this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver( resourceLoader ); + } + + public void afterPropertiesSet() throws IOException { + LocalSessionFactoryBuilder sfb = new LocalSessionFactoryBuilder( this.dataSource, this.resourcePatternResolver ); + + // this is the main difference with the original implementation + sfb.setEntityResolver( new XSDEntityResolver() ); + + if ( this.configLocations != null ) { + for ( Resource resource : this.configLocations ) { + // Load Hibernate configuration from given location. + sfb.configure( resource.getURL() ); + } + } + + if ( this.hibernateProperties != null ) { + sfb.addProperties( this.hibernateProperties ); + } + + if ( this.annotatedClasses != null ) { + sfb.addAnnotatedClasses( this.annotatedClasses ); + } + + // Build SessionFactory instance. + this.configuration = sfb; + this.sessionFactory = buildSessionFactory( sfb ); + } + + protected SessionFactory buildSessionFactory( LocalSessionFactoryBuilder sfb ) { + return sfb.buildSessionFactory(); + } + + public final Configuration getConfiguration() { + if ( this.configuration == null ) { + throw new IllegalStateException( "Configuration not initialized yet" ); + } + return this.configuration; + } + + + public SessionFactory getObject() { + return this.sessionFactory; + } + + public Class getObjectType() { + return ( this.sessionFactory != null ? this.sessionFactory.getClass() : SessionFactory.class ); + } + + public boolean isSingleton() { + return true; + } + + public void destroy() { + this.sessionFactory.close(); + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/XSDEntityResolver.java b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/XSDEntityResolver.java new file mode 100644 index 0000000000..d7ee5ca87f --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/XSDEntityResolver.java @@ -0,0 +1,28 @@ +package ubic.gemma.persistence.hibernate; + +import org.hibernate.internal.util.xml.DTDEntityResolver; +import org.xml.sax.InputSource; + +import java.io.InputStream; + +/** + * Resolves Hibernate XSD schemas from the classpath. + * @see org.hibernate.internal.util.xml.DTDEntityResolver + * @author poirigui + */ +public class XSDEntityResolver extends DTDEntityResolver { + + private static final String HIBERNATE_NAMESPACE = "http://hibernate.org/xsd/"; + + @Override + public InputSource resolveEntity( String publicId, String systemId ) { + if ( systemId.startsWith( HIBERNATE_NAMESPACE ) ) { + InputStream is = XSDEntityResolver.class.getResourceAsStream( "/org/hibernate/" + systemId.substring( HIBERNATE_NAMESPACE.length() ) ); + InputSource inputSource = new InputSource( is ); + inputSource.setPublicId( publicId ); + inputSource.setSystemId( systemId ); + return inputSource; + } + return super.resolveEntity( publicId, systemId ); + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/package-info.java b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/package-info.java new file mode 100644 index 0000000000..0c2820dc80 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/hibernate/package-info.java @@ -0,0 +1,8 @@ +/** + * This package contains Hibernate-related classes and utilities for persisting entities. + * @author poirigui + */ +@ParametersAreNonnullByDefault +package ubic.gemma.persistence.hibernate; + +import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java new file mode 100644 index 0000000000..42088b4fcb --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java @@ -0,0 +1,36 @@ +package ubic.gemma.persistence.initialization; + +import com.zaxxer.hikari.HikariDataSource; +import org.springframework.jdbc.datasource.init.DataSourceInitializer; +import org.springframework.util.Assert; + +import javax.sql.DataSource; + +/** + * A {@link DataSourceInitializer} that bootstraps a data source by removing its database name from the JDBC URL. + * @author poirigui + */ +public class BootstrappedDataSourceInitializer extends DataSourceInitializer { + + @Override + public void setDataSource( DataSource dataSource ) { + Assert.isInstanceOf( HikariDataSource.class, dataSource, "No idea how to bootstrap a data source of type " + dataSource.getClass().getName() + "." ); + HikariDataSource hikariDataSource = ( HikariDataSource ) dataSource; + HikariDataSource bootstrappedDataSource = new HikariDataSource(); + hikariDataSource.copyStateTo( bootstrappedDataSource ); + bootstrappedDataSource.setJdbcUrl( stripPathComponent( bootstrappedDataSource.getJdbcUrl() ) ); + bootstrappedDataSource.setCatalog( null ); + super.setDataSource( bootstrappedDataSource ); + } + + String stripPathComponent( String jdbcUrl ) { + int indexOfProtocol = jdbcUrl.indexOf( "://" ); + int indexOfPath = jdbcUrl.lastIndexOf( '/' ); + int indexOfQuery = jdbcUrl.lastIndexOf( '?' ); + if ( indexOfPath == indexOfProtocol + 2 ) { + return jdbcUrl; + } + return jdbcUrl.substring( 0, indexOfPath ) + + ( ( indexOfQuery > 0 ) ? jdbcUrl.substring( indexOfQuery ) : "" ); + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java new file mode 100644 index 0000000000..5a5ba6efa9 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java @@ -0,0 +1,39 @@ +package ubic.gemma.persistence.initialization; + +import lombok.extern.apachecommons.CommonsLog; +import org.springframework.jdbc.datasource.init.DatabasePopulator; + +import java.sql.Connection; +import java.sql.SQLException; + +/** + * Create a new database and drop an existing one if desired. + *

+ * This populator needs to be run with a {@link BootstrappedDataSourceInitializer} because the database might not exist. + * @author poirigui + * @see BootstrappedDataSourceInitializer + */ +@CommonsLog +public class CreateDatabasePopulator implements DatabasePopulator { + + private final String databaseName; + private boolean dropIfExists = false; + + public CreateDatabasePopulator( String databaseName ) { + this.databaseName = databaseName; + } + + @Override + public void populate( Connection connection ) throws SQLException { + if ( dropIfExists ) { + log.warn( "Dropping database " + databaseName + "..." ); + connection.prepareStatement( "drop database if exists " + databaseName ).execute(); + } + log.info( "Creating database " + databaseName ); + connection.prepareStatement( "create database " + databaseName + " character set utf8mb4" ).execute(); + } + + public void setDropIfExists( boolean dropIfExists ) { + this.dropIfExists = dropIfExists; + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/DatabaseSchemaPopulator.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/DatabaseSchemaPopulator.java new file mode 100644 index 0000000000..2c1755a1e5 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/DatabaseSchemaPopulator.java @@ -0,0 +1,73 @@ +package ubic.gemma.persistence.initialization; + +import lombok.extern.apachecommons.CommonsLog; +import org.hibernate.cfg.Configuration; +import org.hibernate.dialect.Dialect; +import org.springframework.core.io.ClassPathResource; +import org.springframework.jdbc.datasource.init.CompositeDatabasePopulator; +import org.springframework.jdbc.datasource.init.DatabasePopulator; +import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; +import ubic.gemma.persistence.hibernate.H2Dialect; +import ubic.gemma.persistence.hibernate.LocalSessionFactoryBean; +import ubic.gemma.persistence.hibernate.MySQL57InnoDBDialect; + +import java.sql.Connection; +import java.sql.SQLException; + +/** + * Populates the database schema. + * @author poirigui + */ +@CommonsLog +public class DatabaseSchemaPopulator extends CompositeDatabasePopulator { + + public DatabaseSchemaPopulator( LocalSessionFactoryBean sessionFactoryBean, String vendor ) { + Configuration configuration = sessionFactoryBean.getConfiguration(); + Dialect dialect; + if ( configuration.getProperty( "hibernate.dialect" ) != null ) { + try { + dialect = ( Dialect ) Class.forName( configuration.getProperty( "hibernate.dialect" ) ) + .getConstructor().newInstance(); + } catch ( Exception e ) { + throw new RuntimeException( e ); + } + } else { + dialect = vendor.equals( "h2" ) ? new H2Dialect() : new MySQL57InnoDBDialect(); + } + ResourceDatabasePopulator rdp = new ResourceDatabasePopulator() { + @Override + public void populate( Connection connection ) throws SQLException { + log.info( "Populating ACLs, indices, additional tables, etc..." ); + super.populate( connection ); + } + }; + rdp.addScript( new ClassPathResource( "/sql/init-acls.sql" ) ); + rdp.addScript( new ClassPathResource( "/sql/init-entities.sql" ) ); + rdp.addScript( new ClassPathResource( "/sql/" + vendor + "/init-entities.sql" ) ); + addPopulators( new HibernateSchemaPopulator( configuration, dialect ), rdp ); + } + + /** + * Populate the database with the Hibernate DDL schema. + * @author poirigui + */ + private static class HibernateSchemaPopulator implements DatabasePopulator { + + private final Configuration configuration; + private final Dialect dialect; + + public HibernateSchemaPopulator( Configuration configuration, Dialect dialect ) { + this.configuration = configuration; + this.dialect = dialect; + } + + @Override + public void populate( Connection connection ) throws SQLException { + log.info( "Populating Hibernate schema..." ); + String[] ddl = configuration.generateSchemaCreationScript( dialect ); + for ( String sql : ddl ) { + connection.prepareStatement( sql ).execute(); + } + } + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/InitialDataPopulator.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/InitialDataPopulator.java new file mode 100644 index 0000000000..2a045c5c16 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/InitialDataPopulator.java @@ -0,0 +1,47 @@ +package ubic.gemma.persistence.initialization; + +import lombok.extern.apachecommons.CommonsLog; +import org.springframework.core.io.ClassPathResource; +import org.springframework.jdbc.datasource.init.CompositeDatabasePopulator; +import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; + +import java.sql.Connection; +import java.sql.SQLException; + +/** + * Populate some initial data for tests. + * @author poirigui + */ +@CommonsLog +public class InitialDataPopulator extends CompositeDatabasePopulator { + + private final boolean slim; + + public InitialDataPopulator( boolean slim ) { + this.slim = slim; + ResourceDatabasePopulator initDataPopulator = new ResourceDatabasePopulator(); + if ( slim ) { + initDataPopulator.addScript( new ClassPathResource( "/sql/init-data-slim.sql" ) ); + } else { + // this file contains procedures, so splitting by ';' isn't adequate, statements are separated by newlines + initDataPopulator.setSeparator( "\n" ); + initDataPopulator.addScript( new ClassPathResource( "/sql/init-data.sql" ) ); + } + addPopulators( initDataPopulator ); + } + + @Override + public void populate( Connection connection ) throws SQLException { + if ( slim ) { + log.info( "Populating initial slim data..." ); + } else { + log.info( "Populating initial data..." ); + } + super.populate( connection ); + if ( !slim ) { + // TODO: make this configurable + log.info( "An agent was created with username 'gemmaAgent' and password 'XXXXXXXX'." ); + log.info( "An administrator was created with username 'administrator' and password 'administrator'." ); + } + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/package-info.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/package-info.java new file mode 100644 index 0000000000..7ced7d9b0d --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/package-info.java @@ -0,0 +1,7 @@ +/** + * + */ +@ParametersAreNonnullByDefault +package ubic.gemma.persistence.initialization; + +import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/gemma-core/src/test/resources/sql/init-data-slim.sql b/gemma-core/src/main/resources/sql/init-data-slim.sql similarity index 100% rename from gemma-core/src/test/resources/sql/init-data-slim.sql rename to gemma-core/src/main/resources/sql/init-data-slim.sql diff --git a/gemma-core/src/main/resources/ubic/gemma/applicationContext-hibernate.xml b/gemma-core/src/main/resources/ubic/gemma/applicationContext-hibernate.xml index 5c8f201997..0f598d66db 100644 --- a/gemma-core/src/main/resources/ubic/gemma/applicationContext-hibernate.xml +++ b/gemma-core/src/main/resources/ubic/gemma/applicationContext-hibernate.xml @@ -52,7 +52,7 @@ - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml index 0f7b894f8e..81ebf31318 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Analysis.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/AnalysisResultSet.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/AnalysisResultSet.hbm.xml index cdd9dd8494..9aab6bd33a 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/AnalysisResultSet.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/AnalysisResultSet.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/BlacklistedEntity.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/BlacklistedEntity.hbm.xml index 7e66067ed6..5e6e42fb07 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/BlacklistedEntity.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/BlacklistedEntity.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml index 49188b7503..70fc67b1ee 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/Investigation.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.hbm.xml index 80eb4c16bb..e5e783a668 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/ExpressionExperimentSet.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/CoexpCorrelationDistribution.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/CoexpCorrelationDistribution.hbm.xml index ba4e59bd8e..967fd2f9f8 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/CoexpCorrelationDistribution.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/CoexpCorrelationDistribution.hbm.xml @@ -1,8 +1,8 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressedGenes.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressedGenes.hbm.xml index 1ba4acae1e..3eaf1c02a1 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressedGenes.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressedGenes.hbm.xml @@ -1,7 +1,7 @@ - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressionTestedIn.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressionTestedIn.hbm.xml index d53ebbc1c3..916d11445e 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressionTestedIn.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/GeneCoexpressionTestedIn.hbm.xml @@ -1,7 +1,7 @@ - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/HumanSupportDetails.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/HumanSupportDetails.hbm.xml index dc8868b9e2..1cebf8a0af 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/HumanSupportDetails.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/HumanSupportDetails.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/MouseSupportDetails.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/MouseSupportDetails.hbm.xml index 81b2bf4fca..e402c4d8b9 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/MouseSupportDetails.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/MouseSupportDetails.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/OtherSupportDetails.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/OtherSupportDetails.hbm.xml index 9075cf030a..4250c3638f 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/OtherSupportDetails.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/OtherSupportDetails.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/RatSupportDetails.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/RatSupportDetails.hbm.xml index edacf0efb1..a8544016b5 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/RatSupportDetails.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/RatSupportDetails.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/SampleCoexpressionMatrix.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/SampleCoexpressionMatrix.hbm.xml index 09b483323d..9d61829e4b 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/SampleCoexpressionMatrix.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/coexpression/SampleCoexpressionMatrix.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml index 984cb6d636..07605fcb81 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/ContrastResult.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml index 5a18511548..2a6660a299 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResult.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisResult.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisResult.hbm.xml index 7746789f9d..ebd7edc8e9 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisResult.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/GeneDifferentialExpressionMetaAnalysisResult.hbm.xml @@ -1,9 +1,8 @@ + - - - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/HitListSize.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/HitListSize.hbm.xml index e1717bbc24..1cc52f349e 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/HitListSize.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/HitListSize.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/PvalueDistribution.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/PvalueDistribution.hbm.xml index 4180301125..428274fa6a 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/PvalueDistribution.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/diff/PvalueDistribution.hbm.xml @@ -1,8 +1,8 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvalue.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvalue.hbm.xml index 326d348a18..5fe33defb2 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvalue.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvalue.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvector.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvector.hbm.xml index d5fda5d5fe..d215741237 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvector.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/Eigenvector.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/ProbeLoading.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/ProbeLoading.hbm.xml index 46263dc245..66f97187a4 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/ProbeLoading.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/analysis/expression/pca/ProbeLoading.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/BioSequence2GeneProduct.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/BioSequence2GeneProduct.hbm.xml index f45813152d..a04544927a 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/BioSequence2GeneProduct.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/BioSequence2GeneProduct.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/Gene2GOAssociation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/Gene2GOAssociation.hbm.xml index a4d0770b33..d0c4d23b16 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/Gene2GOAssociation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/Gene2GOAssociation.hbm.xml @@ -1,9 +1,8 @@ - - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/GeneCoexpressionNodeDegree.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/GeneCoexpressionNodeDegree.hbm.xml index 30c629cb4d..c2b3cd7e2f 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/GeneCoexpressionNodeDegree.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/GeneCoexpressionNodeDegree.hbm.xml @@ -1,8 +1,7 @@ - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/HumanExperimentCoexpressionLink.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/HumanExperimentCoexpressionLink.hbm.xml index 1387395456..3413be8317 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/HumanExperimentCoexpressionLink.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/HumanExperimentCoexpressionLink.hbm.xml @@ -1,9 +1,7 @@ - - - - + - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/MouseExperimentCoexpressionLink.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/MouseExperimentCoexpressionLink.hbm.xml index 3fe97ab163..e6d0689830 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/MouseExperimentCoexpressionLink.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/MouseExperimentCoexpressionLink.hbm.xml @@ -1,9 +1,7 @@ - - - - + - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/OtherExperimentCoexpressionLink.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/OtherExperimentCoexpressionLink.hbm.xml index ce42416449..08b4352309 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/OtherExperimentCoexpressionLink.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/OtherExperimentCoexpressionLink.hbm.xml @@ -1,9 +1,7 @@ - - - - + - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/RatExperimentCoexpressionLink.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/RatExperimentCoexpressionLink.hbm.xml index 4fac0409f9..aa485c0a2d 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/RatExperimentCoexpressionLink.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/coexpression/RatExperimentCoexpressionLink.hbm.xml @@ -1,9 +1,8 @@ - - - + - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociation.hbm.xml index 529fb9f439..6d5d981b66 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociation.hbm.xml @@ -1,8 +1,8 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociationPublication.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociationPublication.hbm.xml index 267c827302..f2d155756b 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociationPublication.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/association/phenotype/PhenotypeAssociationPublication.hbm.xml @@ -1,8 +1,8 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditEvent.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditEvent.hbm.xml index 78d68beac9..9023e1b305 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditEvent.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditEvent.hbm.xml @@ -1,7 +1,8 @@ - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditTrail.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditTrail.hbm.xml index f29c07419a..bb9860e589 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditTrail.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/AuditTrail.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/Contact.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/Contact.hbm.xml index 84806bba3c..4c7765775f 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/Contact.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/Contact.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/GroupAuthority.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/GroupAuthority.hbm.xml index 4acaa7e6b9..2d08fad6f5 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/GroupAuthority.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/GroupAuthority.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/JobInfo.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/JobInfo.hbm.xml index 9fdb131f24..4603021b5a 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/JobInfo.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/JobInfo.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/UserGroup.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/UserGroup.hbm.xml index b46857fe8a..5609b10f23 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/UserGroup.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/UserGroup.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/curation/CurationDetails.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/curation/CurationDetails.hbm.xml index c5e1bd2317..2cbc8ae66f 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/curation/CurationDetails.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/curation/CurationDetails.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/eventType/AuditEventType.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/eventType/AuditEventType.hbm.xml index af6e36670d..16cc75f730 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/eventType/AuditEventType.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/auditAndSecurity/eventType/AuditEventType.hbm.xml @@ -1,7 +1,8 @@ - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibRefAnnotation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibRefAnnotation.hbm.xml index a46c229064..574fbf26dd 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibRefAnnotation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibRefAnnotation.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibliographicReference.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibliographicReference.hbm.xml index f143223c4e..93f01bb9ba 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibliographicReference.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/description/BibliographicReference.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/description/Characteristic.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/description/Characteristic.hbm.xml index f4e2107808..aab5a3f670 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/description/Characteristic.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/description/Characteristic.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/description/DatabaseEntry.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/description/DatabaseEntry.hbm.xml index f116125e56..6ce00c0353 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/description/DatabaseEntry.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/description/DatabaseEntry.hbm.xml @@ -1,9 +1,8 @@ + - - - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/description/ExternalDatabase.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/description/ExternalDatabase.hbm.xml index db09b81b75..006ef29844 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/description/ExternalDatabase.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/description/ExternalDatabase.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Measurement.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Measurement.hbm.xml index 7be9c3c99d..589e10129c 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Measurement.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Measurement.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Unit.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Unit.hbm.xml index 35e4cf9f6c..307269ef3b 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Unit.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/measurement/Unit.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/protocol/Protocol.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/protocol/Protocol.hbm.xml index a7b6d8498a..98d2d9d433 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/protocol/Protocol.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/protocol/Protocol.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/common/quantitationtype/QuantitationType.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/common/quantitationtype/QuantitationType.hbm.xml index c3c4c1d5a4..03f61385c5 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/common/quantitationtype/QuantitationType.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/common/quantitationtype/QuantitationType.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/AlternateName.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/AlternateName.hbm.xml index 80a3814b97..bae8402b7d 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/AlternateName.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/AlternateName.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/ArrayDesign.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/ArrayDesign.hbm.xml index ca1261526c..8060c08fd8 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/ArrayDesign.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/arrayDesign/ArrayDesign.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssay/BioAssay.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssay/BioAssay.hbm.xml index f9dfdd0f4d..0bda753310 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssay/BioAssay.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssay/BioAssay.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/BioAssayDimension.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/BioAssayDimension.hbm.xml index db16311e57..ac51c8faff 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/BioAssayDimension.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/BioAssayDimension.hbm.xml @@ -1,9 +1,8 @@ + - - - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.hbm.xml index 944c29ce78..a1595f64f4 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/MeanVarianceRelation.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/ProcessedExpressionDataVector.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/ProcessedExpressionDataVector.hbm.xml index 5b6b739ddc..94a3be59bf 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/ProcessedExpressionDataVector.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/ProcessedExpressionDataVector.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.hbm.xml index 65d7a46e14..cc24c46db0 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/bioAssayData/RawExpressionDataVector.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/BioMaterial.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/BioMaterial.hbm.xml index 413103ffe9..a3a6cb5381 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/BioMaterial.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/BioMaterial.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Compound.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Compound.hbm.xml index 3f6530962c..55480a7b4b 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Compound.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Compound.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Treatment.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Treatment.hbm.xml index 7ccae0c648..07b1320927 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Treatment.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/biomaterial/Treatment.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/designElement/CompositeSequence.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/designElement/CompositeSequence.hbm.xml index b58d7060a3..7ac5fb5acf 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/designElement/CompositeSequence.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/designElement/CompositeSequence.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalDesign.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalDesign.hbm.xml index 6d65b60c74..0bf68555ef 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalDesign.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalDesign.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalFactor.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalFactor.hbm.xml index 9e00f9ac51..a3088bf512 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalFactor.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/ExperimentalFactor.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/FactorValue.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/FactorValue.hbm.xml index 8fad5e4466..293c4b52aa 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/FactorValue.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/FactorValue.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/Geeq.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/Geeq.hbm.xml index 0a25744c9d..eac5e037e2 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/Geeq.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/expression/experiment/Geeq.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/Chromosome.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/Chromosome.hbm.xml index 901c7504fd..6e2876eb7b 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/Chromosome.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/Chromosome.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/ChromosomeFeature.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/ChromosomeFeature.hbm.xml index 1220598ad3..df201fa648 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/ChromosomeFeature.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/ChromosomeFeature.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/PhysicalLocation.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/PhysicalLocation.hbm.xml index 6c16fb932d..8439b0c426 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/PhysicalLocation.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/PhysicalLocation.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/Taxon.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/Taxon.hbm.xml index ca8e6dedcb..e642e695cd 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/Taxon.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/Taxon.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/biosequence/BioSequence.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/biosequence/BioSequence.hbm.xml index 8c101aa1c7..c14c6e37e9 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/biosequence/BioSequence.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/biosequence/BioSequence.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneAlias.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneAlias.hbm.xml index 18830b429e..aed2a44e1f 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneAlias.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneAlias.hbm.xml @@ -1,9 +1,9 @@ - - - + + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSet.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSet.hbm.xml index 7ca18cfd54..0eb4f2ccdf 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSet.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSet.hbm.xml @@ -1,9 +1,9 @@ - + - diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSetMember.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSetMember.hbm.xml index 4ac72043ab..e29c6eacda 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSetMember.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/GeneSetMember.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/Multifunctionality.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/Multifunctionality.hbm.xml index 1ce0ed1de4..b92fd478a7 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/Multifunctionality.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/gene/Multifunctionality.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/main/resources/ubic/gemma/model/genome/sequenceAnalysis/SequenceSimilaritySearchResult.hbm.xml b/gemma-core/src/main/resources/ubic/gemma/model/genome/sequenceAnalysis/SequenceSimilaritySearchResult.hbm.xml index c74a09779c..dfce3c0c2f 100644 --- a/gemma-core/src/main/resources/ubic/gemma/model/genome/sequenceAnalysis/SequenceSimilaritySearchResult.hbm.xml +++ b/gemma-core/src/main/resources/ubic/gemma/model/genome/sequenceAnalysis/SequenceSimilaritySearchResult.hbm.xml @@ -1,9 +1,7 @@ - - - - + diff --git a/gemma-core/src/test/java/ubic/gemma/core/datastructure/matrix/MatrixConversionTest.java b/gemma-core/src/test/java/ubic/gemma/core/datastructure/matrix/MatrixConversionTest.java index 8bb25f3710..ce4c4d28a3 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/datastructure/matrix/MatrixConversionTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/datastructure/matrix/MatrixConversionTest.java @@ -48,7 +48,7 @@ public class MatrixConversionTest extends TestCase { public final void testColumnMapping() { Collection quantTypes = new HashSet<>(); - QuantitationType quantType = PersistentDummyObjectHelper.getTestNonPersistentQuantitationType(); + QuantitationType quantType = new PersistentDummyObjectHelper().getTestNonPersistentQuantitationType(); quantType.setId( 0L ); quantTypes.add( quantType ); diff --git a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/arrayDesign/MockBlat.java b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/arrayDesign/MockBlat.java index 08b02fdeab..5af09b6325 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/arrayDesign/MockBlat.java +++ b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/arrayDesign/MockBlat.java @@ -24,7 +24,7 @@ class MockBlat implements Blat { @Override public Collection blatQuery( BioSequence b ) { Collection result = new HashSet<>(); - BioSequence chromseq = PersistentDummyObjectHelper.getTestNonPersistentBioSequence( taxon ); + BioSequence chromseq = new PersistentDummyObjectHelper().getTestNonPersistentBioSequence( taxon ); chromseq.setLength( ( long ) 1e7 ); BlatResult br = BlatResult.Factory.newInstance(); diff --git a/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseDatabaseTest.java b/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseDatabaseTest.java index 7a166568d7..d68775b71a 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseDatabaseTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseDatabaseTest.java @@ -7,20 +7,18 @@ import gemma.gsec.acl.domain.AclService; import gemma.gsec.acl.domain.AclServiceImpl; import org.apache.lucene.util.Version; +import org.h2.Driver; import org.hibernate.SessionFactory; import org.junit.After; -import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.concurrent.ConcurrentMapCache; -import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.DependsOn; import org.springframework.core.io.ClassPathResource; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.SimpleDriverDataSource; +import org.springframework.jdbc.datasource.init.CompositeDatabasePopulator; +import org.springframework.jdbc.datasource.init.DataSourceInitializer; import org.springframework.orm.hibernate4.HibernateTransactionManager; -import org.springframework.orm.hibernate4.LocalSessionFactoryBean; import org.springframework.security.access.hierarchicalroles.NullRoleHierarchy; import org.springframework.security.acls.domain.AclAuthorizationStrategy; import org.springframework.security.acls.domain.ConsoleAuditLogger; @@ -28,12 +26,13 @@ import org.springframework.security.acls.domain.SpringCacheBasedAclCache; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests; -import org.springframework.test.jdbc.JdbcTestUtils; import org.springframework.transaction.PlatformTransactionManager; -import ubic.gemma.persistence.hibernate.H2Dialect; import ubic.gemma.core.config.Settings; +import ubic.gemma.persistence.hibernate.H2Dialect; +import ubic.gemma.persistence.hibernate.LocalSessionFactoryBean; +import ubic.gemma.persistence.initialization.DatabaseSchemaPopulator; +import ubic.gemma.persistence.initialization.InitialDataPopulator; import javax.sql.DataSource; import java.util.Properties; @@ -48,19 +47,17 @@ public abstract class BaseDatabaseTest extends AbstractTransactionalJUnit4Spring protected abstract static class BaseDatabaseTestContextConfiguration { @Bean public DataSource dataSource() { - DataSource ds = new SimpleDriverDataSource( new org.h2.Driver(), "jdbc:h2:mem:gemdtest;MODE=MYSQL;DB_CLOSE_DELAY=-1" ); + DataSource ds = new SimpleDriverDataSource( new Driver(), "jdbc:h2:mem:gemdtest;MODE=MYSQL;DB_CLOSE_DELAY=-1" ); new JdbcTemplate( ds ).execute( "drop all objects" ); return ds; } @Bean - public FactoryBean sessionFactory( DataSource dataSource ) { + public LocalSessionFactoryBean sessionFactory( DataSource dataSource ) { LocalSessionFactoryBean factory = new LocalSessionFactoryBean(); factory.setDataSource( dataSource ); - factory.setConfigLocations( - new ClassPathResource( "/hibernate.cfg.xml" ) ); + factory.setConfigLocation( new ClassPathResource( "/hibernate.cfg.xml" ) ); Properties props = new Properties(); - props.setProperty( "hibernate.hbm2ddl.auto", "create" ); props.setProperty( "hibernate.dialect", H2Dialect.class.getName() ); props.setProperty( "hibernate.cache.use_second_level_cache", "false" ); props.setProperty( "hibernate.max_fetch_depth", "3" ); @@ -80,9 +77,16 @@ public FactoryBean sessionFactory( DataSource dataSource ) { } @Bean - @DependsOn("sessionFactory") - public DataSourceInitializer dataSourceInitializer( DataSource dataSource ) { - return new DataSourceInitializer( dataSource ); + public DataSourceInitializer dataSourceInitializer( DataSource dataSource, LocalSessionFactoryBean sessionFactory ) { + DataSourceInitializer di = new DataSourceInitializer(); + di.setDataSource( dataSource ); + CompositeDatabasePopulator cdp = new CompositeDatabasePopulator(); + cdp.addPopulators( + new DatabaseSchemaPopulator( sessionFactory, "h2" ), + new InitialDataPopulator( true ) ); + di.setDatabasePopulator( cdp ); + di.setEnabled( true ); + return di; } @Bean @@ -125,24 +129,4 @@ public final void flushAndClearSession() { sessionFactory.getCurrentSession().clear(); } - protected static class DataSourceInitializer implements InitializingBean { - - - private final JdbcTemplate template; - - @Autowired - private ApplicationContext applicationContext; - - public DataSourceInitializer( DataSource dataSource ) { - this.template = new JdbcTemplate( dataSource ); - } - - @Override - public void afterPropertiesSet() { - JdbcTestUtils.executeSqlScript( template, applicationContext.getResource( "/sql/init-acls.sql" ), false ); - JdbcTestUtils.executeSqlScript( template, applicationContext.getResource( "/sql/init-entities.sql" ), false ); - JdbcTestUtils.executeSqlScript( template, applicationContext.getResource( "/sql/h2/init-entities.sql" ), false ); - JdbcTestUtils.executeSqlScript( template, applicationContext.getResource( "/sql/init-data-slim.sql" ), false ); - } - } } diff --git a/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseIntegrationTest.java b/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseIntegrationTest.java index b2cee4d243..7a76f37fd0 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseIntegrationTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseIntegrationTest.java @@ -2,14 +2,16 @@ import org.junit.After; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.experimental.categories.Category; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; -import ubic.gemma.core.util.test.category.IntegrationTest; +import org.springframework.test.jdbc.JdbcTestUtils; import ubic.gemma.core.context.EnvironmentProfiles; +import ubic.gemma.core.util.test.category.IntegrationTest; /** * Base class for integration tests. diff --git a/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseSpringContextTest.java b/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseSpringContextTest.java index 35c0e0b32c..0792434c97 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseSpringContextTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/util/test/BaseSpringContextTest.java @@ -303,7 +303,7 @@ protected BioSequence getTestPersistentBioSequence( Taxon t ) { } protected BioSequence getTestNonPersistentBioSequence( Taxon t ) { - return PersistentDummyObjectHelper.getTestNonPersistentBioSequence( t ); + return testHelper.getTestNonPersistentBioSequence( t ); } protected BlatResult getTestPersistentBlatResult( BioSequence querySequence, Taxon taxon ) { diff --git a/gemma-core/src/test/java/ubic/gemma/core/util/test/PersistentDummyObjectHelper.java b/gemma-core/src/test/java/ubic/gemma/core/util/test/PersistentDummyObjectHelper.java index 6eee69e49a..404f10048f 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/util/test/PersistentDummyObjectHelper.java +++ b/gemma-core/src/test/java/ubic/gemma/core/util/test/PersistentDummyObjectHelper.java @@ -58,6 +58,7 @@ import ubic.gemma.model.genome.gene.GeneProduct; import ubic.gemma.model.genome.sequenceAnalysis.BlatAssociation; import ubic.gemma.model.genome.sequenceAnalysis.BlatResult; +import ubic.gemma.persistence.persister.ArrayDesignsForExperimentCache; import ubic.gemma.persistence.persister.PersisterHelper; import ubic.gemma.persistence.service.analysis.expression.diff.DifferentialExpressionAnalysisService; import ubic.gemma.persistence.service.analysis.expression.diff.ExpressionAnalysisResultSetService; @@ -67,7 +68,6 @@ import ubic.gemma.persistence.service.expression.experiment.ExperimentalFactorService; import ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService; import ubic.gemma.persistence.service.expression.experiment.FactorValueService; -import ubic.gemma.persistence.persister.ArrayDesignsForExperimentCache; import java.util.*; @@ -81,17 +81,19 @@ @Transactional public class PersistentDummyObjectHelper { + private final Log log = LogFactory.getLog( this.getClass() ); + private static final int DEFAULT_TEST_ELEMENT_COLLECTION_SIZE = 6; private static final int NUM_BIOMATERIALS = 8; private static final int NUM_EXPERIMENTAL_FACTORS = 2; private static final int NUM_FACTOR_VALUES = 2; private static final int NUM_QUANTITATION_TYPES = 2; private static final int RANDOM_STRING_LENGTH = 10; - private static ExternalDatabase genbank; - private static ExternalDatabase geo; - private static ExternalDatabase pubmed; - private static Taxon testTaxon; - private final Log log = LogFactory.getLog( this.getClass() ); + + private ExternalDatabase genbank; + private ExternalDatabase geo; + private ExternalDatabase pubmed; + private Taxon testTaxon; private int testElementCollectionSize = PersistentDummyObjectHelper.DEFAULT_TEST_ELEMENT_COLLECTION_SIZE; @Autowired @@ -108,7 +110,7 @@ public class PersistentDummyObjectHelper { // setting seed globally does not guarantee reproducibliity always as methods could access // different parts of the sequence if called in different orders, so callers should reset it using resetSeed() - private static Random randomizer = new Random( 12345 ); + private Random randomizer = new Random( 12345 ); // Tests can call this to ensure reproducibility public void resetSeed() { @@ -121,31 +123,31 @@ public void resetSeed() { @Autowired private ExpressionAnalysisResultSetService expressionAnalysisResultSetService; - public static BioSequence getTestNonPersistentBioSequence( Taxon taxon ) { + public BioSequence getTestNonPersistentBioSequence( Taxon taxon ) { BioSequence bs = BioSequence.Factory.newInstance(); bs.setName( RandomStringUtils.randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) + "_testbiosequence" ); bs.setSequence( RandomStringUtils.random( 40, "ATCG" ) ); if ( taxon == null ) - bs.setTaxon( PersistentDummyObjectHelper.getTestNonPersistentTaxon() ); + bs.setTaxon( getTestNonPersistentTaxon() ); else bs.setTaxon( taxon ); - if ( PersistentDummyObjectHelper.genbank == null ) { - PersistentDummyObjectHelper.genbank = ExternalDatabase.Factory.newInstance(); - PersistentDummyObjectHelper.genbank.setName( "Genbank" ); + if ( genbank == null ) { + genbank = ExternalDatabase.Factory.newInstance(); + genbank.setName( "Genbank" ); } DatabaseEntry de = DatabaseEntry.Factory.newInstance(); - de.setExternalDatabase( PersistentDummyObjectHelper.genbank ); + de.setExternalDatabase( genbank ); de.setAccession( RandomStringUtils.randomAlphanumeric( 10 ) ); bs.setSequenceDatabaseEntry( de ); return bs; } - public static GeneProduct getTestNonPersistentGeneProduct( Gene gene ) { + public GeneProduct getTestNonPersistentGeneProduct( Gene gene ) { GeneProduct gp = GeneProduct.Factory.newInstance(); gp.setNcbiGi( RandomStringUtils.randomAlphanumeric( 10 ) ); gp.setName( RandomStringUtils.randomAlphanumeric( 6 ) ); @@ -158,7 +160,7 @@ public static GeneProduct getTestNonPersistentGeneProduct( Gene gene ) { * * @return QT */ - public static QuantitationType getTestNonPersistentQuantitationType() { + public QuantitationType getTestNonPersistentQuantitationType() { QuantitationType qt = QuantitationType.Factory.newInstance(); qt.setName( RandomStringUtils.randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) + "_testqt" ); qt.setDescription( @@ -181,7 +183,7 @@ public static QuantitationType getTestNonPersistentQuantitationType() { * * @return taxon */ - private static Taxon getTestNonPersistentTaxon() { + private Taxon getTestNonPersistentTaxon() { Taxon t = Taxon.Factory.newInstance(); t.setCommonName( "mouse" ); @@ -271,7 +273,7 @@ public ExpressionExperiment getTestExpressionExperimentWithAllDependencies( Expr .randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) ); ee.setDescription( "A test expression experiment" ); ee.setSource( "https://www.ncbi.nlm.nih.gov/geo/" ); - DatabaseEntry de1 = this.getTestPersistentDatabaseEntry( PersistentDummyObjectHelper.geo ); + DatabaseEntry de1 = this.getTestPersistentDatabaseEntry( geo ); ee.setAccession( de1 ); Collection allFactorValues = new HashSet<>(); @@ -324,7 +326,7 @@ public ExpressionExperiment getTestExpressionExperimentWithAllDependencies( bool .randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) ); ee.setDescription( "A test expression experiment" ); ee.setSource( "https://www.ncbi.nlm.nih.gov/geo/" ); - DatabaseEntry de1 = this.getTestPersistentDatabaseEntry( PersistentDummyObjectHelper.geo ); + DatabaseEntry de1 = this.getTestPersistentDatabaseEntry( geo ); ee.setAccession( de1 ); ArrayDesign adA = this.getTestPersistentArrayDesign( this.getTestElementCollectionSize(), true, doSequence ); @@ -461,7 +463,7 @@ public Gene getTestPersistentGene( Taxon t ) { RandomStringUtils.randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ).toUpperCase() ); if ( t == null ) { - gene.setTaxon( PersistentDummyObjectHelper.getTestNonPersistentTaxon() ); + gene.setTaxon( getTestNonPersistentTaxon() ); } else { gene.setTaxon( t ); } @@ -543,7 +545,7 @@ public ExpressionExperiment getTestPersistentBasicExpressionExperiment( ArrayDes .randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) ); ee.setDescription( "A test expression experiment" ); ee.setSource( "https://www.ncbi.nlm.nih.gov/geo/" ); - DatabaseEntry de1 = this.getTestPersistentDatabaseEntry( PersistentDummyObjectHelper.geo ); + DatabaseEntry de1 = this.getTestPersistentDatabaseEntry( geo ); ee.setAccession( de1 ); Collection allFactorValues = new HashSet<>(); @@ -579,10 +581,10 @@ public ExpressionExperiment getTestPersistentBasicExpressionExperiment( ArrayDes public BibliographicReference getTestPersistentBibliographicReference( String accession ) { BibliographicReference br = BibliographicReference.Factory.newInstance(); - if ( PersistentDummyObjectHelper.pubmed == null ) { - PersistentDummyObjectHelper.pubmed = externalDatabaseService.findByName( "PubMed" ); + if ( pubmed == null ) { + pubmed = externalDatabaseService.findByName( "PubMed" ); } - br.setPubAccession( this.getTestPersistentDatabaseEntry( accession, PersistentDummyObjectHelper.pubmed ) ); + br.setPubAccession( this.getTestPersistentDatabaseEntry( accession, pubmed ) ); return ( BibliographicReference ) persisterHelper.persist( br ); } @@ -617,13 +619,13 @@ public BioMaterial getTestPersistentBioMaterial( Taxon tax ) { } public BioSequence getTestPersistentBioSequence() { - BioSequence bs = PersistentDummyObjectHelper.getTestNonPersistentBioSequence( null ); + BioSequence bs = getTestNonPersistentBioSequence( null ); return ( BioSequence ) persisterHelper.persist( bs ); } public BioSequence getTestPersistentBioSequence( Taxon taxon ) { - BioSequence bs = PersistentDummyObjectHelper.getTestNonPersistentBioSequence( taxon ); + BioSequence bs = getTestNonPersistentBioSequence( taxon ); return ( BioSequence ) persisterHelper.persist( bs ); } @@ -735,9 +737,9 @@ public DatabaseEntry getTestPersistentDatabaseEntry( String accession, ExternalD public DatabaseEntry getTestPersistentDatabaseEntry( String accession, String databaseName ) { switch ( databaseName ) { case "GEO": - return this.getTestPersistentDatabaseEntry( accession, PersistentDummyObjectHelper.geo ); + return this.getTestPersistentDatabaseEntry( accession, geo ); case "PubMed": - return this.getTestPersistentDatabaseEntry( accession, PersistentDummyObjectHelper.pubmed ); + return this.getTestPersistentDatabaseEntry( accession, pubmed ); default: ExternalDatabase edp = ExternalDatabase.Factory.newInstance(); edp.setName( databaseName ); @@ -810,7 +812,7 @@ public ExpressionExperiment getTestPersistentExpressionExperiment( Taxon taxon ) } public GeneProduct getTestPersistentGeneProduct( Gene gene ) { - GeneProduct gp = PersistentDummyObjectHelper.getTestNonPersistentGeneProduct( gene ); + GeneProduct gp = getTestNonPersistentGeneProduct( gene ); return ( GeneProduct ) persisterHelper.persist( gp ); } @@ -821,23 +823,23 @@ public GeneProduct getTestPersistentGeneProduct( Gene gene ) { * @return QT */ public QuantitationType getTestPersistentQuantitationType() { - QuantitationType qt = PersistentDummyObjectHelper.getTestNonPersistentQuantitationType(); + QuantitationType qt = getTestNonPersistentQuantitationType(); return ( QuantitationType ) persisterHelper.persist( qt ); } public Taxon getTestPersistentTaxon() { - if ( PersistentDummyObjectHelper.testTaxon == null ) { - PersistentDummyObjectHelper.testTaxon = Taxon.Factory.newInstance(); - PersistentDummyObjectHelper.testTaxon.setCommonName( "elephant" ); - PersistentDummyObjectHelper.testTaxon.setScientificName( "Loxodonta" ); - PersistentDummyObjectHelper.testTaxon.setNcbiId( 1245 ); - PersistentDummyObjectHelper.testTaxon.setIsGenesUsable( true ); - PersistentDummyObjectHelper.testTaxon = ( Taxon ) persisterHelper - .persist( PersistentDummyObjectHelper.testTaxon ); - assert PersistentDummyObjectHelper.testTaxon != null - && PersistentDummyObjectHelper.testTaxon.getId() != null; + if ( testTaxon == null ) { + testTaxon = Taxon.Factory.newInstance(); + testTaxon.setCommonName( "elephant" ); + testTaxon.setScientificName( "Loxodonta" ); + testTaxon.setNcbiId( 1245 ); + testTaxon.setIsGenesUsable( true ); + testTaxon = ( Taxon ) persisterHelper + .persist( testTaxon ); + assert testTaxon != null + && testTaxon.getId() != null; } - return PersistentDummyObjectHelper.testTaxon; + return testTaxon; } public void resetTestElementCollectionSize() { @@ -896,7 +898,7 @@ protected Statement getTestStatement( String name, String value ) { private Set addQuantitationTypes( Set quantitationTypes ) { for ( int quantitationTypeNum = 0; quantitationTypeNum < PersistentDummyObjectHelper.NUM_QUANTITATION_TYPES; quantitationTypeNum++ ) { - QuantitationType q = PersistentDummyObjectHelper.getTestNonPersistentQuantitationType(); + QuantitationType q = getTestNonPersistentQuantitationType(); if ( quantitationTypes.size() == 0 ) { q.setIsPreferred( true ); } @@ -1003,7 +1005,7 @@ private BioAssay getTestNonPersistentBioAssay( ArrayDesign ad, BioMaterial bm ) ba.setSequencePairedReads( false ); DatabaseEntry de = DatabaseEntry.Factory.newInstance(); - de.setExternalDatabase( PersistentDummyObjectHelper.geo ); + de.setExternalDatabase( geo ); de.setAccession( ba.getName() ); ba.setAccession( de ); @@ -1017,12 +1019,12 @@ private BioMaterial getTestNonPersistentBioMaterial() { BioMaterial bm = BioMaterial.Factory.newInstance(); bm.setName( RandomStringUtils.randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) + "_testbiomaterial" ); - if ( PersistentDummyObjectHelper.geo == null ) { - PersistentDummyObjectHelper.geo = externalDatabaseService.findByName( "GEO" ); - assert PersistentDummyObjectHelper.geo != null; + if ( geo == null ) { + geo = externalDatabaseService.findByName( "GEO" ); + assert geo != null; } - bm.setSourceTaxon( PersistentDummyObjectHelper.getTestNonPersistentTaxon() ); - bm.setExternalAccession( this.getTestPersistentDatabaseEntry( PersistentDummyObjectHelper.geo ) ); + bm.setSourceTaxon( getTestNonPersistentTaxon() ); + bm.setExternalAccession( this.getTestPersistentDatabaseEntry( geo ) ); return bm; } @@ -1033,12 +1035,12 @@ private BioMaterial getTestNonPersistentBioMaterial( Taxon tax ) { BioMaterial bm = BioMaterial.Factory.newInstance(); bm.setName( RandomStringUtils.randomNumeric( PersistentDummyObjectHelper.RANDOM_STRING_LENGTH ) + "_testbiomaterial" ); - if ( PersistentDummyObjectHelper.geo == null ) { - PersistentDummyObjectHelper.geo = externalDatabaseService.findByName( "GEO" ); - assert PersistentDummyObjectHelper.geo != null; + if ( geo == null ) { + geo = externalDatabaseService.findByName( "GEO" ); + assert geo != null; } bm.setSourceTaxon( tax ); - bm.setExternalAccession( this.getTestPersistentDatabaseEntry( PersistentDummyObjectHelper.geo ) ); + bm.setExternalAccession( this.getTestPersistentDatabaseEntry( geo ) ); return bm; } } diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/hibernate/HibernateConfigTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/hibernate/HibernateConfigTest.java index f3e7991b5f..bbbffa197e 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/hibernate/HibernateConfigTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/hibernate/HibernateConfigTest.java @@ -18,12 +18,11 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.Import; -import org.springframework.orm.hibernate4.LocalSessionFactoryBean; import org.springframework.test.context.ContextConfiguration; +import ubic.gemma.core.context.TestComponent; import ubic.gemma.core.util.test.BaseDatabaseTest; import ubic.gemma.core.util.test.TestPropertyPlaceholderConfigurer; import ubic.gemma.persistence.cache.EhcacheConfig; -import ubic.gemma.core.context.TestComponent; import javax.sql.DataSource; import java.io.IOException; @@ -61,11 +60,11 @@ public static TestPropertyPlaceholderConfigurer propertyPlaceholderConfigurer() @Override @DependsOn("ehcache") - public FactoryBean sessionFactory( DataSource dataSource ) { - FactoryBean factory = super.sessionFactory( dataSource ); - ( ( LocalSessionFactoryBean ) factory ).getHibernateProperties() + public LocalSessionFactoryBean sessionFactory( DataSource dataSource ) { + LocalSessionFactoryBean factory = super.sessionFactory( dataSource ); + factory.getHibernateProperties() .setProperty( "hibernate.cache.region.factory_class", SingletonEhCacheRegionFactory.class.getName() ); - ( ( LocalSessionFactoryBean ) factory ).getHibernateProperties() + factory.getHibernateProperties() .setProperty( "hibernate.cache.use_second_level_cache", "true" ); return factory; } diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java new file mode 100644 index 0000000000..c801e4f88d --- /dev/null +++ b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java @@ -0,0 +1,16 @@ +package ubic.gemma.persistence.initialization; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class BootstrappedDataSourceInitializerTest { + + @Test + public void test() { + BootstrappedDataSourceInitializer initializer = new BootstrappedDataSourceInitializer(); + assertEquals( "jdbc:mysql://test@foo?a=b", initializer.stripPathComponent( "jdbc:mysql://test@foo/bleh?a=b" ) ); + assertEquals( "jdbc:mysql://test@foo", initializer.stripPathComponent( "jdbc:mysql://test@foo/bleh" ) ); + assertEquals( "jdbc:mysql://test@foo?a=b", initializer.stripPathComponent( "jdbc:mysql://test@foo?a=b" ) ); + } +} \ No newline at end of file diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/service/AbstractFilteringVoEnabledDaoTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/service/AbstractFilteringVoEnabledDaoTest.java index a1a4f31f79..697d642af2 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/service/AbstractFilteringVoEnabledDaoTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/service/AbstractFilteringVoEnabledDaoTest.java @@ -7,11 +7,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.orm.hibernate4.LocalSessionFactoryBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import ubic.gemma.model.common.IdentifiableValueObject; import ubic.gemma.model.common.Identifiable; +import ubic.gemma.persistence.hibernate.LocalSessionFactoryBean; import ubic.gemma.persistence.hibernate.MySQL57InnoDBDialect; import ubic.gemma.persistence.util.Filters; import ubic.gemma.persistence.util.Slice; diff --git a/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml b/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml new file mode 100644 index 0000000000..f218e2aa71 --- /dev/null +++ b/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 503e1e9bf7..468a903740 100644 --- a/pom.xml +++ b/pom.xml @@ -242,7 +242,7 @@ org.dom4j dom4j ${dom4j.version} - runtime + compile org.hibernate From 33e43639e84a822e3f8846b1a1b7e9d142375d18 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 2 Aug 2024 14:25:13 -0400 Subject: [PATCH 82/99] Make sure that the bootstrapped data source is closed --- .../BootstrappedDataSourceInitializer.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java index 42088b4fcb..9b84314c82 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java @@ -12,17 +12,31 @@ */ public class BootstrappedDataSourceInitializer extends DataSourceInitializer { + private HikariDataSource bootstrappedDataSource; + @Override public void setDataSource( DataSource dataSource ) { Assert.isInstanceOf( HikariDataSource.class, dataSource, "No idea how to bootstrap a data source of type " + dataSource.getClass().getName() + "." ); HikariDataSource hikariDataSource = ( HikariDataSource ) dataSource; HikariDataSource bootstrappedDataSource = new HikariDataSource(); hikariDataSource.copyStateTo( bootstrappedDataSource ); - bootstrappedDataSource.setJdbcUrl( stripPathComponent( bootstrappedDataSource.getJdbcUrl() ) ); + bootstrappedDataSource.setJdbcUrl( stripPathComponent( hikariDataSource.getJdbcUrl() ) ); bootstrappedDataSource.setCatalog( null ); + this.bootstrappedDataSource = bootstrappedDataSource; super.setDataSource( bootstrappedDataSource ); } + @Override + public void destroy() { + try { + super.destroy(); + } finally { + if ( bootstrappedDataSource != null ) { + bootstrappedDataSource.close(); + } + } + } + String stripPathComponent( String jdbcUrl ) { int indexOfProtocol = jdbcUrl.indexOf( "://" ); int indexOfPath = jdbcUrl.lastIndexOf( '/' ); From 4d55679325ba6115f2fedad9097bddaed3163ec6 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 2 Aug 2024 15:26:08 -0400 Subject: [PATCH 83/99] Disable schema validation by default In tests, this causes Hibernate to try to validate the schema before the database is even created. --- gemma-core/src/main/resources/default.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemma-core/src/main/resources/default.properties b/gemma-core/src/main/resources/default.properties index ce5f2b78de..c2387bd7e5 100755 --- a/gemma-core/src/main/resources/default.properties +++ b/gemma-core/src/main/resources/default.properties @@ -162,7 +162,7 @@ gemma.transaction.maxretries=10 #### Hibernate settings. ##### # See https://docs.jboss.org/hibernate/orm/4.2/manual/en-US/html/ch03.html # this should be set to validate in production -gemma.hibernate.hbm2ddl.auto=validate +gemma.hibernate.hbm2ddl.auto= # Setting the following to true might be good in development/debugging environments. gemma.hibernate.format_sql=false gemma.hibernate.show_sql=false From 28a975cd0ca56fee854705416f613423bfce90c5 Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Fri, 2 Aug 2024 13:20:28 -0700 Subject: [PATCH 84/99] clarify what this CLI does --- .../java/ubic/gemma/core/apps/RefreshExperimentCli.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/RefreshExperimentCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/RefreshExperimentCli.java index 0f01d623ea..9a2312c331 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/RefreshExperimentCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/RefreshExperimentCli.java @@ -27,14 +27,14 @@ public String getCommandName() { @Nullable @Override public String getShortDesc() { - return "Refresh the given experiments on the Gemma Website"; + return "Refresh the cache for experiments on the Gemma Website"; } @Override protected void buildOptions( Options options ) { super.buildOptions( options ); - options.addOption( "v", "refreshVectors", false, "Refresh raw and processed data vectors" ); - options.addOption( "r", "refreshReports", false, "Refresh experiment reports (i.e. batch information, diff ex. analyses, etc.)" ); + options.addOption( "v", "refreshVectors", false, "Refresh cache of raw and processed data vectors" ); + options.addOption( "r", "refreshReports", false, "Refresh cache of experiment reports (i.e. batch information, diff ex. analyses, etc.)" ); addThreadsOption( options ); } From b3bdff068ae11ab8d494fb07f8b999afbdc68161 Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Fri, 2 Aug 2024 13:20:57 -0700 Subject: [PATCH 85/99] Track skipped experiments in the error objects and refresh cache --- gemma-cli/src/main/java/ubic/gemma/core/apps/GeeqCli.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/GeeqCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/GeeqCli.java index d17c00f293..0eca7ba788 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/GeeqCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/GeeqCli.java @@ -88,12 +88,14 @@ protected void doWork() throws Exception { ExpressionExperiment ee = ( ExpressionExperiment ) bioassay; if ( !force && this.noNeedToRun( ee, GeeqEvent.class ) ) { - AbstractCLI.log.debug( "Can't or don't need to run " + ee ); + AbstractCLI.log.info( "Can't or don't need to run " + ee ); + addErrorObject( ee, "Can't or don't need to run " + ee ); continue; } try { geeqService.calculateScore( ee, mode ); + refreshExpressionExperimentFromGemmaWeb( ee, false, true ); addSuccessObject( ee ); } catch ( Exception e ) { addErrorObject( ee, e ); From 21156d629751e8a45360821714dd5fcc05683665 Mon Sep 17 00:00:00 2001 From: Paul Pavlidis Date: Fri, 2 Aug 2024 13:21:09 -0700 Subject: [PATCH 86/99] remove dead code --- .../preprocess/PreprocessorServiceImpl.java | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/core/analysis/preprocess/PreprocessorServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/analysis/preprocess/PreprocessorServiceImpl.java index 07da748e4f..bc61aa95f1 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/analysis/preprocess/PreprocessorServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/analysis/preprocess/PreprocessorServiceImpl.java @@ -78,8 +78,6 @@ public class PreprocessorServiceImpl implements PreprocessorService { @Autowired private AuditTrailService auditTrailService; @Autowired - private OutlierDetectionService outlierDetectionService; - @Autowired private ExpressionExperimentReportService expressionExperimentReportService; @Autowired private GeeqService geeqService; @@ -306,33 +304,4 @@ private Collection getProcessedExpressionDataVect } return vecs; } - - @SuppressWarnings("unused") - private void checkOutliers( ExpressionExperiment ee ) { - Collection outliers = outlierDetectionService.identifyOutliersByMedianCorrelation( ee ); - if ( !outliers.isEmpty() ) { - Collection knownOutliers = this.getAlreadyKnownOutliers( ee ); - Collection unknownOutliers = new LinkedList<>(); - - for ( OutlierDetails od : outliers ) { - if ( !knownOutliers.contains( od ) ) { - unknownOutliers.add( od ); - } - } - - if ( !unknownOutliers.isEmpty() ) { - String newline = System.lineSeparator(); - - StringBuilder newOutliersString = new StringBuilder(); - - for ( OutlierDetails od : unknownOutliers ) { - newOutliersString.append( od.getBioAssay().toString() ).append( newline ); - } - - throw new PreprocessingException( ee, - String.format( "Could not be batch-corrected because new outliers were identified. Please remove the outliers and try again.%s Newly detected outliers: %s%s", - newline, newline, newOutliersString ) ); - } - } - } } From b501fd2c7896f436cb372e9a681784fbce7356d5 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 2 Aug 2024 16:03:46 -0400 Subject: [PATCH 87/99] Ensure that GoldenPath's DataSource is always closed --- .../core/apps/ArrayDesignProbeMapperCli.java | 10 ++- .../gemma/core/goldenpath/GoldenPath.java | 50 ++++++++++----- .../core/goldenpath/GoldenPathQuery.java | 4 +- .../ArrayDesignProbeMapperServiceImpl.java | 51 +++++++-------- ...rayDesignSequenceAlignmentServiceImpl.java | 62 +++++++++---------- .../analysis/sequence/ProbeMapperTest.java | 50 +++++++++------ .../core/goldenpath/GoldenPathQueryTest.java | 21 ++++--- 7 files changed, 143 insertions(+), 105 deletions(-) diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java index 7192e2f61e..7d7f046c76 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/ArrayDesignProbeMapperCli.java @@ -6,6 +6,8 @@ import org.apache.commons.cli.ParseException; import org.springframework.beans.factory.annotation.Autowired; import ubic.gemma.core.analysis.sequence.ProbeMapperConfig; +import ubic.gemma.core.config.Settings; +import ubic.gemma.core.goldenpath.GoldenPathSequenceAnalysis; import ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignProbeMapperService; import ubic.gemma.core.util.AbstractCLI; import ubic.gemma.model.common.auditAndSecurity.AuditEvent; @@ -20,7 +22,6 @@ import ubic.gemma.persistence.service.common.description.ExternalDatabaseService; import ubic.gemma.persistence.service.expression.designElement.CompositeSequenceService; import ubic.gemma.persistence.service.genome.taxon.TaxonService; -import ubic.gemma.core.config.Settings; import java.io.File; import java.io.IOException; @@ -660,8 +661,11 @@ private void processProbes( ArrayDesign arrayDesign ) { probe = compositeSequenceService.thaw( probe ); - Map> results = this.arrayDesignProbeMapperService - .processCompositeSequence( this.config, taxon, null, probe ); + Map> results; + try ( GoldenPathSequenceAnalysis goldenPathDb = new GoldenPathSequenceAnalysis( taxon ) ) { + results = this.arrayDesignProbeMapperService + .processCompositeSequence( this.config, taxon, goldenPathDb, probe ); + } for ( Collection col : results.values() ) { for ( BlatAssociation association : col ) { diff --git a/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPath.java b/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPath.java index d35b4cc247..095f05103e 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPath.java +++ b/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPath.java @@ -19,14 +19,15 @@ package ubic.gemma.core.goldenpath; import com.zaxxer.hikari.HikariDataSource; -import lombok.Getter; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.jdbc.core.JdbcTemplate; +import ubic.gemma.core.config.Settings; import ubic.gemma.model.common.description.DatabaseType; import ubic.gemma.model.common.description.ExternalDatabase; import ubic.gemma.model.genome.Taxon; -import ubic.gemma.core.config.Settings; + +import javax.sql.DataSource; /** * Perform useful queries against GoldenPath (UCSC) databases. @@ -34,11 +35,11 @@ * @author pavlidis */ @SuppressWarnings({ "unused", "WeakerAccess" }) // Possible external use -@Getter -public abstract class GoldenPath { +public abstract class GoldenPath implements AutoCloseable { protected static final Log log = LogFactory.getLog( GoldenPath.class ); + private final HikariDataSource dataSource; private final JdbcTemplate jdbcTemplate; private final ExternalDatabase searchedDatabase; private final Taxon taxon; @@ -47,25 +48,42 @@ public abstract class GoldenPath { * Create a GoldenPath database for a given taxon. */ public GoldenPath( Taxon taxon ) { - this.jdbcTemplate = createJdbcTemplateFromConfig( taxon ); + this.dataSource = createDataSource( taxon ); + this.jdbcTemplate = createJdbcTemplateFromConfig( this.dataSource, taxon ); this.searchedDatabase = createExternalDatabase( taxon ); this.taxon = taxon; } - private static JdbcTemplate createJdbcTemplateFromConfig( Taxon taxon ) { - String host; - String databaseName = getDbNameForTaxon( taxon ); + @Override + public void close() { + dataSource.close(); + } - // SimpleDriverDataSource dataSource = new SimpleDriverDataSource(); - HikariDataSource dataSource = new HikariDataSource(); - dataSource.setPoolName( "goldenpath" ); + protected DataSource getDataSource() { + return dataSource; + } + + protected JdbcTemplate getJdbcTemplate() { + return jdbcTemplate; + } + + protected ExternalDatabase getSearchedDatabase() { + return searchedDatabase; + } + + public Taxon getTaxon() { + return taxon; + } + + private static HikariDataSource createDataSource( Taxon taxon ) { String driverClassName = Settings.getString( "gemma.goldenpath.db.driver" ); String url = Settings.getString( "gemma.goldenpath.db.url" ); String user = Settings.getString( "gemma.goldenpath.db.user" ); String password = Settings.getString( "gemma.goldenpath.db.password" ); - GoldenPath.log.info( "Connecting to " + databaseName ); GoldenPath.log.debug( "Connecting to Golden Path : " + url + " as " + user ); + HikariDataSource dataSource = new HikariDataSource(); + dataSource.setPoolName( "goldenpath" ); dataSource.setDriverClassName( driverClassName ); dataSource.setJdbcUrl( url ); dataSource.setUsername( user ); @@ -73,11 +91,15 @@ private static JdbcTemplate createJdbcTemplateFromConfig( Taxon taxon ) { dataSource.setMaximumPoolSize( Settings.getInt( "gemma.goldenpath.db.maximumPoolSize" ) ); dataSource.addDataSourceProperty( "relaxAutoCommit", "true" ); + return dataSource; + } + + private static JdbcTemplate createJdbcTemplateFromConfig( HikariDataSource dataSource, Taxon taxon ) { + String databaseName = getDbNameForTaxon( taxon ); JdbcTemplate jdbcTemplate = new JdbcTemplate( dataSource ); jdbcTemplate.setFetchSize( 50 ); - + GoldenPath.log.info( "Connecting to " + databaseName ); jdbcTemplate.execute( "use " + databaseName ); - return jdbcTemplate; } diff --git a/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPathQuery.java b/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPathQuery.java index f033995ec0..34b86f9617 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPathQuery.java +++ b/gemma-core/src/main/java/ubic/gemma/core/goldenpath/GoldenPathQuery.java @@ -44,8 +44,8 @@ public class GoldenPathQuery extends GoldenPath { public GoldenPathQuery( Taxon taxon ) { super( taxon ); - estQuery = new EstQuery( this.getJdbcTemplate().getDataSource() ); - mrnaQuery = new MrnaQuery( this.getJdbcTemplate().getDataSource() ); + estQuery = new EstQuery( getDataSource() ); + mrnaQuery = new MrnaQuery( getDataSource() ); } /** diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignProbeMapperServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignProbeMapperServiceImpl.java index b6dc23379d..95352e1f46 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignProbeMapperServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignProbeMapperServiceImpl.java @@ -34,7 +34,6 @@ import ubic.gemma.core.analysis.service.ArrayDesignAnnotationService; import ubic.gemma.core.analysis.service.ExpressionDataFileService; import ubic.gemma.core.goldenpath.GoldenPathSequenceAnalysis; -import ubic.gemma.persistence.service.genome.gene.GeneService; import ubic.gemma.model.common.description.ExternalDatabase; import ubic.gemma.model.expression.arrayDesign.ArrayDesign; import ubic.gemma.model.expression.arrayDesign.TechnologyType; @@ -54,6 +53,7 @@ import ubic.gemma.persistence.service.expression.designElement.CompositeSequenceService; import ubic.gemma.persistence.service.genome.biosequence.BioSequenceService; import ubic.gemma.persistence.service.genome.gene.GeneProductService; +import ubic.gemma.persistence.service.genome.gene.GeneService; import ubic.gemma.persistence.service.genome.sequenceAnalysis.AnnotationAssociationService; import ubic.gemma.persistence.service.genome.sequenceAnalysis.BlatResultService; @@ -149,8 +149,6 @@ public void processArrayDesign( ArrayDesign arrayDesign, ProbeMapperConfig confi "Array design has sequence from multiple taxa and has no primary taxon set: " + arrayDesign ); } - GoldenPathSequenceAnalysis goldenPathDb = new GoldenPathSequenceAnalysis( taxon ); - BlockingQueue persistingQueue = new ArrayBlockingQueue<>( ArrayDesignProbeMapperServiceImpl.QUEUE_SIZE ); AtomicBoolean generatorDone = new AtomicBoolean( false ); AtomicBoolean loaderDone = new AtomicBoolean( false ); @@ -167,30 +165,32 @@ public void processArrayDesign( ArrayDesign arrayDesign, ProbeMapperConfig confi int numWithNoResults = 0; ArrayDesignProbeMapperServiceImpl.log .info( "Start processing " + arrayDesign.getCompositeSequences().size() + " probes ..." ); - for ( CompositeSequence compositeSequence : arrayDesign.getCompositeSequences() ) { + try ( GoldenPathSequenceAnalysis goldenPathDb = new GoldenPathSequenceAnalysis( taxon ) ) { + for ( CompositeSequence compositeSequence : arrayDesign.getCompositeSequences() ) { - Map> results = this - .processCompositeSequence( config, taxon, goldenPathDb, compositeSequence ); + Map> results = this + .processCompositeSequence( config, taxon, goldenPathDb, compositeSequence ); - if ( results == null ) { - numWithNoResults++; - continue; - } + if ( results == null ) { + numWithNoResults++; + continue; + } - for ( Collection col : results.values() ) { - for ( BlatAssociation association : col ) { - if ( ArrayDesignProbeMapperServiceImpl.log.isDebugEnabled() ) - ArrayDesignProbeMapperServiceImpl.log.debug( association ); - persistingQueue.add( new BACS( compositeSequence, association ) ); + for ( Collection col : results.values() ) { + for ( BlatAssociation association : col ) { + if ( ArrayDesignProbeMapperServiceImpl.log.isDebugEnabled() ) + ArrayDesignProbeMapperServiceImpl.log.debug( association ); + persistingQueue.add( new BACS( compositeSequence, association ) ); + } + ++hits; } - ++hits; - } - if ( ++count % 200 == 0 ) { - ArrayDesignProbeMapperServiceImpl.log - .info( "Processed " + count + " composite sequences" + " with blat results; " + hits - + " mappings found." ); + if ( ++count % 200 == 0 ) { + ArrayDesignProbeMapperServiceImpl.log + .info( "Processed " + count + " composite sequences" + " with blat results; " + hits + + " mappings found." ); + } } } @@ -396,13 +396,6 @@ public Map> processCompositeSequence( ProbeM return null; } - GoldenPathSequenceAnalysis db; - if ( goldenPathDb == null ) { - db = new GoldenPathSequenceAnalysis( bs.getTaxon() ); - } else { - db = goldenPathDb; - } - final Collection blatResults = blatResultService.findByBioSequence( bs ); ProbeMapUtils.removeDuplicates( blatResults ); @@ -410,7 +403,7 @@ public Map> processCompositeSequence( ProbeM if ( blatResults.isEmpty() ) return null; - return probeMapper.processBlatResults( db, blatResults, config ); + return probeMapper.processBlatResults( goldenPathDb, blatResults, config ); } private void doLoad( final BlockingQueue queue, AtomicBoolean generatorDone, AtomicBoolean loaderDone, diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignSequenceAlignmentServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignSequenceAlignmentServiceImpl.java index 6e2adbcf1e..ce533601e1 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignSequenceAlignmentServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/arrayDesign/ArrayDesignSequenceAlignmentServiceImpl.java @@ -26,9 +26,9 @@ import org.springframework.stereotype.Component; import ubic.basecode.util.StringUtil; import ubic.gemma.core.analysis.report.ArrayDesignReportService; +import ubic.gemma.core.analysis.sequence.Blat; import ubic.gemma.core.analysis.sequence.ProbeMapUtils; import ubic.gemma.core.analysis.sequence.SequenceBinUtils; -import ubic.gemma.core.analysis.sequence.Blat; import ubic.gemma.core.analysis.sequence.ShellDelegatingBlat; import ubic.gemma.core.goldenpath.GoldenPathQuery; import ubic.gemma.model.common.description.ExternalDatabase; @@ -312,44 +312,44 @@ private Map> getAlignments( Collection getGoldenPathAlignments( Collection sequencesToBlat, Taxon taxon, Map> results ) { - GoldenPathQuery gpq = new GoldenPathQuery( taxon ); + try ( GoldenPathQuery gpq = new GoldenPathQuery( taxon ) ) { + Collection needBlat = new HashSet<>(); + int count = 0; + int totalFound = 0; + for ( BioSequence sequence : sequencesToBlat ) { + boolean found = false; + if ( sequence.getSequenceDatabaseEntry() != null ) { + Collection brs = gpq.findAlignments( sequence.getSequenceDatabaseEntry().getAccession() ); + + if ( brs != null && brs.size() > 0 ) { + for ( BlatResult result : brs ) { + this.copyLengthInformation( sequence, result ); + result.setQuerySequence( sequence ); + } + results.put( sequence, brs ); + found = true; + totalFound++; + } + } - Collection needBlat = new HashSet<>(); - int count = 0; - int totalFound = 0; - for ( BioSequence sequence : sequencesToBlat ) { - boolean found = false; - if ( sequence.getSequenceDatabaseEntry() != null ) { - Collection brs = gpq.findAlignments( sequence.getSequenceDatabaseEntry().getAccession() ); + if ( ++count % 1000 == 0 && totalFound > 0 ) { + ArrayDesignSequenceAlignmentServiceImpl.log + .info( "Alignments in Golden Path database for " + totalFound + "/" + count + + " checked so far." ); + } - if ( brs != null && brs.size() > 0 ) { - for ( BlatResult result : brs ) { - this.copyLengthInformation( sequence, result ); - result.setQuerySequence( sequence ); - } - results.put( sequence, brs ); - found = true; - totalFound++; + if ( !found ) { + needBlat.add( sequence ); } - } - if ( ++count % 1000 == 0 && totalFound > 0 ) { - ArrayDesignSequenceAlignmentServiceImpl.log - .info( "Alignments in Golden Path database for " + totalFound + "/" + count - + " checked so far." ); } - if ( !found ) { - needBlat.add( sequence ); + if ( totalFound > 0 ) { + ArrayDesignSequenceAlignmentServiceImpl.log + .info( "Found " + totalFound + "/" + count + " alignments in Golden Path database" ); } - - } - - if ( totalFound > 0 ) { - ArrayDesignSequenceAlignmentServiceImpl.log - .info( "Found " + totalFound + "/" + count + " alignments in Golden Path database" ); + return needBlat; } - return needBlat; } /** diff --git a/gemma-core/src/test/java/ubic/gemma/core/analysis/sequence/ProbeMapperTest.java b/gemma-core/src/test/java/ubic/gemma/core/analysis/sequence/ProbeMapperTest.java index 5f708bbb0b..3943484f4a 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/analysis/sequence/ProbeMapperTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/analysis/sequence/ProbeMapperTest.java @@ -20,9 +20,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.junit.AfterClass; import org.junit.Assert; -import org.junit.Assume; -import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.springframework.jdbc.CannotGetJdbcConnectionException; @@ -41,6 +41,9 @@ import java.util.List; import java.util.Map; +import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeNoException; + /** * Unaware of the Gemma database but uses the hg19 and mm10 databases (tests will not work with hg38) * @@ -50,23 +53,22 @@ public class ProbeMapperTest { private static final Log log = LogFactory.getLog( ProbeMapperTest.class.getName() ); - private Collection blatres; - private List tester; - private GoldenPathSequenceAnalysis mousegp = null; - private GoldenPathSequenceAnalysis humangp = null; - @Before - public void setUp() throws Exception { + private static GoldenPathSequenceAnalysis mousegp = null; + private static GoldenPathSequenceAnalysis humangp = null; + private static Collection blatres; + private static List tester; + + @BeforeClass + public static void setUp() throws Exception { Taxon mouseTaxon = Taxon.Factory.newInstance( "mouse" ); Taxon humanTaxon = Taxon.Factory.newInstance( "human" ); - mousegp = new GoldenPathSequenceAnalysis( mouseTaxon ); - humangp = new GoldenPathSequenceAnalysis( humanTaxon ); try { - mousegp.getJdbcTemplate().queryForObject( "select 1", Integer.class ); - humangp.getJdbcTemplate().queryForObject( "select 1", Integer.class ); + mousegp = new GoldenPathSequenceAnalysis( mouseTaxon ); + humangp = new GoldenPathSequenceAnalysis( humanTaxon ); } catch ( CannotGetJdbcConnectionException e ) { - Assume.assumeNoException( e ); + assumeNoException( e ); } tester = new ArrayList<>(); @@ -75,12 +77,22 @@ public void setUp() throws Exception { tester.add( 100d ); tester.add( 50d ); - try ( InputStream is = this.getClass().getResourceAsStream( "/data/loader/genome/col8a1.blatresults.txt" ) ) { + try ( InputStream is = ProbeMapperTest.class.getResourceAsStream( "/data/loader/genome/col8a1.blatresults.txt" ) ) { BlatResultParser brp = new BlatResultParser(); brp.setTaxon( mouseTaxon ); brp.parse( is ); blatres = brp.getResults(); - assert blatres != null && blatres.size() > 0; + assertTrue( blatres != null && !blatres.isEmpty() ); + } + } + + @AfterClass + public static void tearDown() { + if ( mousegp != null ) { + mousegp.close(); + } + if ( humangp != null ) { + humangp.close(); } } @@ -146,8 +158,8 @@ public void testProcessBlatResults() { ProbeMapper pm = new ProbeMapperImpl(); Map> res = pm.processBlatResults( mousegp, blatres, config ); - Assert.assertTrue( "No results", res.values().size() > 0 ); - Assert.assertTrue( "No results", res.values().iterator().next().size() > 0 ); + assertTrue( "No results", res.values().size() > 0 ); + assertTrue( "No results", res.values().iterator().next().size() > 0 ); boolean found = false; for ( Collection r : res.values() ) { @@ -158,7 +170,7 @@ public void testProcessBlatResults() { } } - Assert.assertTrue( found ); + assertTrue( found ); } @Test @@ -168,7 +180,7 @@ public void testIntronIssues() { .findAssociations( "chr1", 145517370L, 145518088L, "145517370,145518070", "18,18", null, ThreePrimeDistanceMethod.RIGHT, config ); - Assert.assertTrue( results != null && !results.isEmpty() ); + assertTrue( results != null && !results.isEmpty() ); for ( BlatAssociation blatAssociation : results ) { ProbeMapperTest.log.debug( blatAssociation ); if ( blatAssociation.getGeneProduct().getGene().getOfficialSymbol().equals( "NBPF10" ) ) { diff --git a/gemma-core/src/test/java/ubic/gemma/core/goldenpath/GoldenPathQueryTest.java b/gemma-core/src/test/java/ubic/gemma/core/goldenpath/GoldenPathQueryTest.java index db2923f3de..9c9bc24a55 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/goldenpath/GoldenPathQueryTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/goldenpath/GoldenPathQueryTest.java @@ -18,9 +18,9 @@ */ package ubic.gemma.core.goldenpath; +import org.junit.AfterClass; import org.junit.Assert; -import org.junit.Assume; -import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; import org.springframework.jdbc.CannotGetJdbcConnectionException; @@ -30,6 +30,8 @@ import java.util.Collection; +import static org.junit.Assume.assumeNoException; + /** * These tests require a populated Human database. Valid as of 11/2009 on hg19 * @@ -39,21 +41,26 @@ public class GoldenPathQueryTest { /* fixtures */ - private GoldenPathQuery queryer; + private static GoldenPathQuery queryer; - @Before - public void setUp() throws Exception { + @BeforeClass + public static void setUp() throws Exception { Taxon t = Taxon.Factory.newInstance(); t.setCommonName( "human" ); t.setIsGenesUsable( true ); try { queryer = new GoldenPathQuery( t ); - queryer.getJdbcTemplate().queryForObject( "select 1", Integer.class ); } catch ( CannotGetJdbcConnectionException e ) { - Assume.assumeNoException( "Skipping test because hg could not be configured", e ); + assumeNoException( e ); } } + @AfterClass + public static void tearDown() { + if ( queryer != null ) + queryer.close(); + } + @Test public final void testQueryEst() { Collection actualValue = queryer.findAlignments( "AA411542" ); From f8ba5833c7ab096d6b2fd83e081d0836e5b7c121 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Fri, 2 Aug 2024 17:17:37 -0400 Subject: [PATCH 88/99] Bootstrap the data source instead of the initializer --- .../core/apps/InitializeDatabaseCli.java | 21 +++---- .../BootstrappedDataSourceFactory.java | 63 +++++++++++++++++++ .../BootstrappedDataSourceInitializer.java | 50 --------------- .../CreateDatabasePopulator.java | 5 +- ...BootstrappedDataSourceInitializerTest.java | 7 +-- ...plicationContext-dataSourceInitializer.xml | 8 ++- 6 files changed, 83 insertions(+), 71 deletions(-) create mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java delete mode 100644 gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java index a145941519..196180c3a9 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java @@ -8,10 +8,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Profile; import org.springframework.jdbc.datasource.init.CompositeDatabasePopulator; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; +import org.springframework.jdbc.datasource.init.DatabasePopulatorUtils; import ubic.gemma.core.util.AbstractCLI; import ubic.gemma.persistence.hibernate.LocalSessionFactoryBean; -import ubic.gemma.persistence.initialization.BootstrappedDataSourceInitializer; +import ubic.gemma.persistence.initialization.BootstrappedDataSourceFactory; import ubic.gemma.persistence.initialization.CreateDatabasePopulator; import ubic.gemma.persistence.initialization.DatabaseSchemaPopulator; import ubic.gemma.persistence.initialization.InitialDataPopulator; @@ -68,20 +68,15 @@ protected void doWork() throws Exception { jdbcUrl = dataSource.toString(); } promptConfirmationOrAbort( "The following data source will be initialized: " + jdbcUrl ); - BootstrappedDataSourceInitializer bdi = new BootstrappedDataSourceInitializer(); - bdi.setDataSource( dataSource ); - CreateDatabasePopulator cdb = new CreateDatabasePopulator( databaseName ); - cdb.setDropIfExists( true ); - bdi.setDatabasePopulator( cdb ); - bdi.afterPropertiesSet(); - DataSourceInitializer di = new DataSourceInitializer(); - di.setDataSource( dataSource ); + try ( HikariDataSource bootstrappedDataSource = BootstrappedDataSourceFactory.createBootstrappedDataSource( dataSource ) ) { + CreateDatabasePopulator cdb = new CreateDatabasePopulator( databaseName ); + cdb.setDropIfExists( true ); + DatabasePopulatorUtils.execute( cdb, bootstrappedDataSource ); + } CompositeDatabasePopulator cdp = new CompositeDatabasePopulator(); cdp.addPopulators( new DatabaseSchemaPopulator( factory, "mysql" ), new InitialDataPopulator( false ) ); - di.setDatabasePopulator( cdp ); - di.setEnabled( true ); - di.afterPropertiesSet(); + DatabasePopulatorUtils.execute( cdp, dataSource ); } } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java new file mode 100644 index 0000000000..650ca40b68 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java @@ -0,0 +1,63 @@ +package ubic.gemma.persistence.initialization; + +import com.zaxxer.hikari.HikariDataSource; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.util.Assert; + +import javax.sql.DataSource; + +/** + * A bootstrapped data source that strips the database from the JDBC URL. + * @author poirigui + */ +public class BootstrappedDataSourceFactory implements FactoryBean, DisposableBean { + + private final HikariDataSource dataSource; + + public BootstrappedDataSourceFactory( DataSource dataSource ) { + this.dataSource = createBootstrappedDataSource( dataSource ); + } + + @Override + public DataSource getObject() throws Exception { + return this.dataSource; + } + + @Override + public Class getObjectType() { + return HikariDataSource.class; + } + + @Override + public boolean isSingleton() { + return true; + } + + @Override + public void destroy() throws Exception { + this.dataSource.close(); + } + + public static HikariDataSource createBootstrappedDataSource( DataSource dataSource ) { + Assert.isInstanceOf( HikariDataSource.class, dataSource, + "Don't know how to bootstrap a data source of type " + dataSource.getClass().getName() + "." ); + HikariDataSource hikariDataSource = ( HikariDataSource ) dataSource; + HikariDataSource bootstrappedDataSource = new HikariDataSource(); + hikariDataSource.copyStateTo( bootstrappedDataSource ); + bootstrappedDataSource.setJdbcUrl( stripPathComponent( hikariDataSource.getJdbcUrl() ) ); + bootstrappedDataSource.setCatalog( null ); + return bootstrappedDataSource; + } + + static String stripPathComponent( String jdbcUrl ) { + int indexOfProtocol = jdbcUrl.indexOf( "://" ); + int indexOfPath = jdbcUrl.lastIndexOf( '/' ); + int indexOfQuery = jdbcUrl.lastIndexOf( '?' ); + if ( indexOfPath == indexOfProtocol + 2 ) { + return jdbcUrl; + } + return jdbcUrl.substring( 0, indexOfPath ) + + ( ( indexOfQuery > 0 ) ? jdbcUrl.substring( indexOfQuery ) : "" ); + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java deleted file mode 100644 index 9b84314c82..0000000000 --- a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializer.java +++ /dev/null @@ -1,50 +0,0 @@ -package ubic.gemma.persistence.initialization; - -import com.zaxxer.hikari.HikariDataSource; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.util.Assert; - -import javax.sql.DataSource; - -/** - * A {@link DataSourceInitializer} that bootstraps a data source by removing its database name from the JDBC URL. - * @author poirigui - */ -public class BootstrappedDataSourceInitializer extends DataSourceInitializer { - - private HikariDataSource bootstrappedDataSource; - - @Override - public void setDataSource( DataSource dataSource ) { - Assert.isInstanceOf( HikariDataSource.class, dataSource, "No idea how to bootstrap a data source of type " + dataSource.getClass().getName() + "." ); - HikariDataSource hikariDataSource = ( HikariDataSource ) dataSource; - HikariDataSource bootstrappedDataSource = new HikariDataSource(); - hikariDataSource.copyStateTo( bootstrappedDataSource ); - bootstrappedDataSource.setJdbcUrl( stripPathComponent( hikariDataSource.getJdbcUrl() ) ); - bootstrappedDataSource.setCatalog( null ); - this.bootstrappedDataSource = bootstrappedDataSource; - super.setDataSource( bootstrappedDataSource ); - } - - @Override - public void destroy() { - try { - super.destroy(); - } finally { - if ( bootstrappedDataSource != null ) { - bootstrappedDataSource.close(); - } - } - } - - String stripPathComponent( String jdbcUrl ) { - int indexOfProtocol = jdbcUrl.indexOf( "://" ); - int indexOfPath = jdbcUrl.lastIndexOf( '/' ); - int indexOfQuery = jdbcUrl.lastIndexOf( '?' ); - if ( indexOfPath == indexOfProtocol + 2 ) { - return jdbcUrl; - } - return jdbcUrl.substring( 0, indexOfPath ) - + ( ( indexOfQuery > 0 ) ? jdbcUrl.substring( indexOfQuery ) : "" ); - } -} diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java index 5a5ba6efa9..3b7a70d6fd 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/CreateDatabasePopulator.java @@ -9,9 +9,10 @@ /** * Create a new database and drop an existing one if desired. *

- * This populator needs to be run with a {@link BootstrappedDataSourceInitializer} because the database might not exist. + * This populator needs to be run with a data source that has been passed through {@link BootstrappedDataSourceFactory}, + * because the database might not exist. * @author poirigui - * @see BootstrappedDataSourceInitializer + * @see BootstrappedDataSourceFactory */ @CommonsLog public class CreateDatabasePopulator implements DatabasePopulator { diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java index c801e4f88d..9d79473415 100644 --- a/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java +++ b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java @@ -8,9 +8,8 @@ public class BootstrappedDataSourceInitializerTest { @Test public void test() { - BootstrappedDataSourceInitializer initializer = new BootstrappedDataSourceInitializer(); - assertEquals( "jdbc:mysql://test@foo?a=b", initializer.stripPathComponent( "jdbc:mysql://test@foo/bleh?a=b" ) ); - assertEquals( "jdbc:mysql://test@foo", initializer.stripPathComponent( "jdbc:mysql://test@foo/bleh" ) ); - assertEquals( "jdbc:mysql://test@foo?a=b", initializer.stripPathComponent( "jdbc:mysql://test@foo?a=b" ) ); + assertEquals( "jdbc:mysql://test@foo?a=b", BootstrappedDataSourceFactory.stripPathComponent( "jdbc:mysql://test@foo/bleh?a=b" ) ); + assertEquals( "jdbc:mysql://test@foo", BootstrappedDataSourceFactory.stripPathComponent( "jdbc:mysql://test@foo/bleh" ) ); + assertEquals( "jdbc:mysql://test@foo?a=b", BootstrappedDataSourceFactory.stripPathComponent( "jdbc:mysql://test@foo?a=b" ) ); } } \ No newline at end of file diff --git a/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml b/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml index f218e2aa71..a01b1c31da 100644 --- a/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml +++ b/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml @@ -3,8 +3,12 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" profile="test"> - - + + + + + + From 3834ee947f908e78021d3b6199012f6967d38f75 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 3 Aug 2024 14:23:13 -0400 Subject: [PATCH 89/99] Fix regressions with FV IDs Add a parameter to only render contrast' FVs IDs for compactness and make it default to false to preserve currently expected behavior. Don't make subsetFactorId mutually exclusive with subsetFactor. This will be changed in the next minor release. --- .../diff/ContrastResultValueObject.java | 5 +++++ ...xpressionAnalysisResultSetValueObject.java | 8 ++++++-- ...erentialExpressionAnalysisValueObject.java | 6 ++++-- .../diff/ExpressionAnalysisResultSetDao.java | 8 +++++--- .../ExpressionAnalysisResultSetDaoImpl.java | 4 ++-- .../ExpressionAnalysisResultSetService.java | 2 +- ...xpressionAnalysisResultSetServiceImpl.java | 4 ++-- .../rest/AnalysisResultSetsWebService.java | 19 ++++++++++--------- .../main/resources/restapidocs/CHANGELOG.md | 11 ++++++++--- 9 files changed, 43 insertions(+), 24 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java index a46580bb56..df173a6511 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/ContrastResultValueObject.java @@ -1,6 +1,7 @@ package ubic.gemma.model.analysis.expression.diff; import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -22,12 +23,16 @@ public class ContrastResultValueObject extends IdentifiableValueObject * Note: this constructor assumes that {@link ExpressionAnalysisResultSet#getResults()} has already been initialized. + * @param includeFactorValuesInContrasts include complete factorValue and secondFactorValue when serializing + * {@link ContrastResultValueObject} if true, else only the {@code factorValueId} + * and {@code secondFactorValueId} fields are populated. The latter approach + * is more compact and the full factors can be retrieved via {@link #experimentalFactors}. */ - public DifferentialExpressionAnalysisResultSetValueObject( ExpressionAnalysisResultSet analysisResultSet, Map> result2Genes ) { + public DifferentialExpressionAnalysisResultSetValueObject( ExpressionAnalysisResultSet analysisResultSet, boolean includeFactorValuesInContrasts, Map> result2Genes ) { this( analysisResultSet ); this.results = analysisResultSet.getResults() .stream() - .map( result -> new DifferentialExpressionAnalysisResultValueObject( result, false, result2Genes.getOrDefault( result.getId(), Collections.emptyList() ) ) ) + .map( result -> new DifferentialExpressionAnalysisResultValueObject( result, includeFactorValuesInContrasts, result2Genes.getOrDefault( result.getId(), Collections.emptyList() ) ) ) .collect( Collectors.toList() ); } diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java index 5e98c52589..1f14071dc8 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisValueObject.java @@ -61,8 +61,10 @@ public class DifferentialExpressionAnalysisValueObject extends AnalysisValueObje @JsonInclude(JsonInclude.Include.NON_NULL) private Long subsetFactorId; @JsonInclude(JsonInclude.Include.NON_NULL) + @Schema(description = "This property is mutually exclusive with `subsetFactorValueId`.") private FactorValueValueObject subsetFactorValue; @JsonInclude(JsonInclude.Include.NON_NULL) + @Schema(description = "This property is mutually exclusive with `subsetFactorValue`.") private Long subsetFactorValueId; public DifferentialExpressionAnalysisValueObject() { @@ -89,9 +91,9 @@ public DifferentialExpressionAnalysisValueObject( DifferentialExpressionAnalysis if ( Hibernate.isInitialized( analysis.getSubsetFactorValue().getExperimentalFactor() ) ) { this.subsetFactor = new ExperimentalFactorValueObject( analysis.getSubsetFactorValue().getExperimentalFactor() ); - } else { - this.subsetFactorId = analysis.getSubsetFactorValue().getExperimentalFactor().getId(); } + // TODO: make this mutually exclusive with subsetFactor + this.subsetFactorId = analysis.getSubsetFactorValue().getExperimentalFactor().getId(); } else { this.subsetFactorValueId = analysis.getSubsetFactorValue().getId(); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java index c0cf1c9833..86d2a92f77 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java @@ -75,12 +75,14 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao> loadResultIdToGenesMap( ExpressionAnalysisResultSet ears ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java index ddaf67c0e4..a40b77b10d 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java @@ -84,8 +84,8 @@ public ExpressionAnalysisResultSet loadWithExperimentAnalyzed( Long id ) { @Override @Transactional(readOnly = true) - public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears, boolean queryByResult ) { - return voDao.loadValueObjectWithResults( ears, queryByResult ); + public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears, boolean includeFactorValuesInContrasts, boolean queryByResult ) { + return voDao.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, queryByResult ); } @Override diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java b/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java index 480acbfbae..7884ec5a08 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java @@ -173,6 +173,7 @@ public Object getResultSet( @QueryParam("threshold") Double threshold, @QueryParam("offset") OffsetArg offsetArg, @QueryParam("limit") LimitArg limitArg, + @Parameter(description = "Include complete factor values in contrasts instead of only populating `factorValueId` and `secondFactorValueId`. In 2.9.0, this will default to false.") @QueryParam("includeFactorValuesInContrasts") @DefaultValue("true") Boolean includeFactorValuesInContrasts, @Parameter(hidden = true) @QueryParam("excludeResults") @DefaultValue("false") Boolean excludeResults, @Context HttpHeaders headers ) { MediaType acceptedMediaType = negotiate( headers, MediaType.APPLICATION_JSON_TYPE, TEXT_TAB_SEPARATED_VALUES_Q9_TYPE ); @@ -192,12 +193,12 @@ public Object getResultSet( if ( threshold < 0.0 || threshold > 1.0 ) { throw new BadRequestException( "The threshold must be between 0 and 1." ); } - return getResultSetAsJson( analysisResultSet, threshold, offset, limit ); + return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, threshold, offset, limit ); } else { - return getResultSetAsJson( analysisResultSet, offset, limit ); + return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, offset, limit ); } } else { - return getResultSetAsJson( analysisResultSet, excludeResults ); + return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, excludeResults ); } } else { if ( offsetArg != null || limitArg != null ) { @@ -213,7 +214,7 @@ public Object getResultSet( } } - private ResponseDataObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean excludeResults ) { + private ResponseDataObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, boolean excludeResults ) { if ( excludeResults ) { ExpressionAnalysisResultSet ears = expressionAnalysisResultSetArgService.getEntity( analysisResultSet ); return respond( expressionAnalysisResultSetService.loadValueObject( ears ) ); @@ -222,26 +223,26 @@ private ResponseDataObject g if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } - return respond( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, false ) ); + return respond( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, false ) ); } } - private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, int offset, int limit ) { + private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, int offset, int limit ) { ExpressionAnalysisResultSet ears = expressionAnalysisResultSetArgService.getEntityWithContrastsAndResults( analysisResultSet, offset, limit ); if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } long totalElements = expressionAnalysisResultSetService.countResults( ears ); - return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, true ), null, offset, limit, totalElements ); + return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, true ), null, offset, limit, totalElements ); } - private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, double threshold, int offset, int limit ) { + private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, double threshold, int offset, int limit ) { ExpressionAnalysisResultSet ears = expressionAnalysisResultSetArgService.getEntityWithContrastsAndResults( analysisResultSet, threshold, offset, limit ); if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } long totalElements = expressionAnalysisResultSetService.countResults( ears, threshold ); - return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, true ), threshold, offset, limit, totalElements ); + return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, true ), threshold, offset, limit, totalElements ); } private StreamingOutput getResultSetAsTsv( ExpressionAnalysisResultSetArg analysisResultSet ) { diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index 81556c3232..2960028795 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -2,20 +2,25 @@ ### Update 2.8.1 -- add `factorValueId` and `secondFactorValueId` in `ContrastResultValueObject`. Those are populated in `getResultSet` to - make the payload slimmer since the factors can be looked up by ID in `experimentalFactors` +- add `factorValueId` and `secondFactorValueId` in `ContrastResultValueObject`. Those are populated in `getResultSet` +- when the query parameter `includeFactorValuesInContrasts` is set to `true` to make the payload slimmer since the +- factors can be looked up by ID in `experimentalFactors`. It will default to `false` in the 2.9.0. - don't render the details of the experimental factor in `FactorValueValueObject` when it is rendered in the context of an `ExperimentalFactorValueObject` - rename `bioAssaySetId` to `experimentAnalyzedId` and `sourceExperiment` to `sourceExperimentId` in `DifferentialExpressionAnalysisValueObject`, previous names are deprecated - add `subsetFactorValueId` in `DifferentialExpressionAnalysisValueObject` and populate it when`subsetFactorValue` is not initialized -- omit `subsetFactorId` if `subsetFactor` is rendered - omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set - omit `charId` in `FactorValueValueObject` - omit `accessions`, `aliases` and `multifunctionalityRank` in `GeneValueObject` when not set - populate `baselineGroup` and `secondBaselineGroup` in `getResultSet()` for interaction and continuous factors +#### Future breaking changes for 2.9.0 + +In 2.9.0, `subsetFactorId` and `subsetFactor` in `DifferentialExpressionAnalysisValueObject` will become mutually +exclusives. + ### Update 2.8.0 - add `getAnnotationsParents` and `getAnnotationsChildren` endpoint to perform the exact same ontology inference we use From 7bf784f4d8d2814432cd9ddd4a327a94ef1b42ee Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sun, 4 Aug 2024 12:00:37 -0400 Subject: [PATCH 90/99] rest: Add includeTaxonInGenes option to getResultSet() This allows one to omit redundant taxon in the gene serialization. --- ...xpressionAnalysisResultSetValueObject.java | 35 +++++++++--- ...alExpressionAnalysisResultValueObject.java | 6 +-- .../model/genome/gene/GeneValueObject.java | 54 ++++++++++++++++--- .../diff/ExpressionAnalysisResultSetDao.java | 3 +- .../ExpressionAnalysisResultSetDaoImpl.java | 4 +- .../ExpressionAnalysisResultSetService.java | 2 +- ...xpressionAnalysisResultSetServiceImpl.java | 4 +- .../rest/AnalysisResultSetsWebService.java | 34 ++++++++---- .../main/resources/restapidocs/CHANGELOG.md | 20 +++++-- 9 files changed, 125 insertions(+), 37 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java index 6a381a5834..225b4748f8 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultSetValueObject.java @@ -5,12 +5,10 @@ import ubic.gemma.model.expression.experiment.ExperimentalFactorValueObject; import ubic.gemma.model.expression.experiment.FactorValueBasicValueObject; import ubic.gemma.model.genome.Gene; +import ubic.gemma.model.genome.TaxonValueObject; import javax.annotation.Nullable; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -27,6 +25,13 @@ public class DifferentialExpressionAnalysisResultSetValueObject extends Analysis @JsonInclude(JsonInclude.Include.NON_NULL) private FactorValueBasicValueObject secondBaselineGroup; + /** + * When genes are included, this field is populated. + */ + @Nullable + @JsonInclude(JsonInclude.Include.NON_NULL) + private Set taxa; + /** * Related analysis results. *

@@ -61,11 +66,20 @@ public DifferentialExpressionAnalysisResultSetValueObject( ExpressionAnalysisRes * and {@code secondFactorValueId} fields are populated. The latter approach * is more compact and the full factors can be retrieved via {@link #experimentalFactors}. */ - public DifferentialExpressionAnalysisResultSetValueObject( ExpressionAnalysisResultSet analysisResultSet, boolean includeFactorValuesInContrasts, Map> result2Genes ) { + public DifferentialExpressionAnalysisResultSetValueObject( ExpressionAnalysisResultSet analysisResultSet, boolean includeFactorValuesInContrasts, Map> result2Genes, boolean includeTaxonInGenes ) { this( analysisResultSet ); + if ( !includeTaxonInGenes ) { + // when taxon are not rendered in genes, they need to be enumerated somewhere in the payload + this.taxa = result2Genes.values().stream() + .flatMap( List::stream ) + .map( Gene::getTaxon ) + .distinct() + .map( TaxonValueObject::new ) + .collect( Collectors.toSet() ); + } this.results = analysisResultSet.getResults() .stream() - .map( result -> new DifferentialExpressionAnalysisResultValueObject( result, includeFactorValuesInContrasts, result2Genes.getOrDefault( result.getId(), Collections.emptyList() ) ) ) + .map( result -> new DifferentialExpressionAnalysisResultValueObject( result, includeFactorValuesInContrasts, result2Genes.getOrDefault( result.getId(), Collections.emptyList() ), includeTaxonInGenes ) ) .collect( Collectors.toList() ); } @@ -104,6 +118,15 @@ public void setSecondBaselineGroup( @Nullable FactorValueBasicValueObject second this.secondBaselineGroup = secondBaselineGroup; } + @Nullable + public Set getTaxa() { + return taxa; + } + + public void setTaxa( @Nullable Set taxa ) { + this.taxa = taxa; + } + @Override public Collection getResults() { return results; diff --git a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java index fb37dc421b..07ec066653 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/analysis/expression/diff/DifferentialExpressionAnalysisResultValueObject.java @@ -67,8 +67,8 @@ public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAn } } - public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result, boolean includeFactorValues, List genes ) { - this( result, includeFactorValues ); - this.genes = genes.stream().map( GeneValueObject::new ).collect( Collectors.toList() ); + public DifferentialExpressionAnalysisResultValueObject( DifferentialExpressionAnalysisResult result, boolean includeFactorValuesInContrasts, List genes, boolean includeTaxonInGenes ) { + this( result, includeFactorValuesInContrasts ); + this.genes = genes.stream().map( g -> new GeneValueObject( g, includeTaxonInGenes ) ).collect( Collectors.toList() ); } } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java index 838dc0f8a0..4ddc440f8b 100644 --- a/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java +++ b/gemma-core/src/main/java/ubic/gemma/model/genome/gene/GeneValueObject.java @@ -21,16 +21,19 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.hibernate.Hibernate; -import ubic.gemma.model.common.IdentifiableValueObject; +import ubic.gemma.model.annotations.GemmaRestOnly; import ubic.gemma.model.annotations.GemmaWebOnly; +import ubic.gemma.model.common.IdentifiableValueObject; +import ubic.gemma.model.common.description.CharacteristicValueObject; import ubic.gemma.model.common.description.DatabaseEntryValueObject; import ubic.gemma.model.genome.Gene; import ubic.gemma.model.genome.Taxon; import ubic.gemma.model.genome.TaxonValueObject; -import ubic.gemma.model.common.description.CharacteristicValueObject; import javax.annotation.Nullable; import java.io.Serializable; @@ -50,6 +53,7 @@ public class GeneValueObject extends IdentifiableValueObject implements Se /** * Gene aliases, sorted alphabetically. */ + @Nullable @JsonInclude(JsonInclude.Include.NON_NULL) private SortedSet aliases; /** @@ -71,12 +75,14 @@ public class GeneValueObject extends IdentifiableValueObject implements Se */ @JsonIgnore private Boolean isQuery = true; + @Nullable @JsonInclude(JsonInclude.Include.NON_NULL) private Double multifunctionalityRank; @JsonIgnore private String name; private Integer ncbiId; private String ensemblId; + @Nullable @JsonInclude(JsonInclude.Include.NON_NULL) private Set accessions; @JsonIgnore @@ -105,8 +111,13 @@ public class GeneValueObject extends IdentifiableValueObject implements Se private Integer platformCount; @JsonIgnore private Double score; // This is for genes in gene sets might have a rank or a score associated with them. + + // those are serialized manually for the REST API @Nullable + @JsonIgnore private TaxonValueObject taxon; + @JsonIgnore + private boolean includeTaxon = true; /** * Required when using the class as a spring bean. @@ -120,8 +131,6 @@ public GeneValueObject( Long id ) { } /** - * Aliases are not filled in. - * * @param gene gene */ public GeneValueObject( Gene gene ) { @@ -129,7 +138,7 @@ public GeneValueObject( Gene gene ) { this.ncbiId = gene.getNcbiGeneId(); this.officialName = gene.getOfficialName(); this.officialSymbol = gene.getOfficialSymbol(); - if ( gene.getTaxon() != null && Hibernate.isInitialized( gene.getTaxon() ) ) { + if ( gene.getTaxon() != null ) { this.taxon = new TaxonValueObject( gene.getTaxon() ); } this.name = gene.getName(); @@ -150,13 +159,21 @@ public GeneValueObject( Gene gene ) { } } + /** + * @param includeTaxon include full taxon details in {@link #getTaxonForGemmaRest()}, otherwise only + * {@link #getTaxonIdForGemmaRest()} is filled + */ + public GeneValueObject( Gene gene, boolean includeTaxon ) { + this( gene ); + this.includeTaxon = includeTaxon; + } + /** * Copies constructor from other GeneValueObject * * @param otherBean, cannot be null * @throws NullPointerException if the argument is null */ - @SuppressWarnings("CopyConstructorMissesField") // Only copying constructor argument fields public GeneValueObject( GeneValueObject otherBean ) { super( otherBean ); this.name = otherBean.name; @@ -166,7 +183,14 @@ public GeneValueObject( GeneValueObject otherBean ) { this.description = otherBean.description; this.score = otherBean.score; this.taxon = otherBean.taxon; - this.aliases = null; + this.includeTaxon = otherBean.includeTaxon; + if ( otherBean.aliases != null ) { + this.aliases = new TreeSet<>( otherBean.aliases ); + } + this.multifunctionalityRank = otherBean.multifunctionalityRank; + if ( otherBean.accessions != null ) { + this.accessions = new HashSet<>( otherBean.accessions ); + } } public GeneValueObject( Long geneId, String geneSymbol, String geneOfficialName, Taxon taxon ) { @@ -229,6 +253,22 @@ public Long getTaxonId() { return taxon == null ? null : taxon.getId(); } + @GemmaRestOnly + @JsonProperty("taxon") + @JsonInclude(JsonInclude.Include.NON_NULL) + @Schema(description = "This property is mutually exclusive with `taxonId`.") + public TaxonValueObject getTaxonForGemmaRest() { + return includeTaxon ? taxon : null; + } + + @GemmaRestOnly + @JsonProperty("taxonId") + @JsonInclude(JsonInclude.Include.NON_NULL) + @Schema(description = "This property is mutually exclusive with `taxon`.") + public Long getTaxonIdForGemmaRest() { + return !includeTaxon && taxon != null ? taxon.getId() : null; + } + @GemmaWebOnly public String getTaxonCommonName() { return taxon == null ? null : taxon.getCommonName(); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java index 86d2a92f77..155379223b 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetDao.java @@ -79,10 +79,11 @@ public interface ExpressionAnalysisResultSetDao extends AnalysisResultSetDao> loadResultIdToGenesMap( ExpressionAnalysisResultSet ears ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java index a40b77b10d..bbd1d1d892 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/diff/ExpressionAnalysisResultSetServiceImpl.java @@ -84,8 +84,8 @@ public ExpressionAnalysisResultSet loadWithExperimentAnalyzed( Long id ) { @Override @Transactional(readOnly = true) - public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears, boolean includeFactorValuesInContrasts, boolean queryByResult ) { - return voDao.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, queryByResult ); + public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults( ExpressionAnalysisResultSet ears, boolean includeFactorValuesInContrasts, boolean queryByResult, boolean includeTaxonInGenes ) { + return voDao.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, queryByResult, includeTaxonInGenes ); } @Override diff --git a/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java b/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java index 7884ec5a08..3b90528478 100644 --- a/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java +++ b/gemma-rest/src/main/java/ubic/gemma/rest/AnalysisResultSetsWebService.java @@ -173,11 +173,19 @@ public Object getResultSet( @QueryParam("threshold") Double threshold, @QueryParam("offset") OffsetArg offsetArg, @QueryParam("limit") LimitArg limitArg, - @Parameter(description = "Include complete factor values in contrasts instead of only populating `factorValueId` and `secondFactorValueId`. In 2.9.0, this will default to false.") @QueryParam("includeFactorValuesInContrasts") @DefaultValue("true") Boolean includeFactorValuesInContrasts, + @Parameter(description = "Include complete factor values in contrasts instead of only populating `factorValueId` and `secondFactorValueId`. In 2.9.0, this will default to false.", schema = @Schema(defaultValue = "true")) @QueryParam("includeFactorValuesInContrasts") Boolean includeFactorValuesInContrasts, + @Parameter(description = "Include complete taxon in genes instead of only populating `taxonId`. When this is set to true, a `taxa` collection will be included in `DifferentialExpressionAnalysisResultSetValueObject`. In 2.9.0, this will default to false.", schema = @Schema(defaultValue = "true")) @QueryParam("includeTaxonInGenes") Boolean includeTaxonInGenes, @Parameter(hidden = true) @QueryParam("excludeResults") @DefaultValue("false") Boolean excludeResults, @Context HttpHeaders headers ) { MediaType acceptedMediaType = negotiate( headers, MediaType.APPLICATION_JSON_TYPE, TEXT_TAB_SEPARATED_VALUES_Q9_TYPE ); if ( acceptedMediaType.equals( MediaType.APPLICATION_JSON_TYPE ) ) { + // TODO: those should default to false in 2.9.0, see https://github.com/PavlidisLab/Gemma/issues/1198 + if ( includeFactorValuesInContrasts == null ) { + includeFactorValuesInContrasts = true; + } + if ( includeTaxonInGenes == null ) { + includeTaxonInGenes = true; + } if ( offsetArg != null || limitArg != null || threshold != null ) { if ( excludeResults ) { throw new BadRequestException( "The excludeResults parameter cannot be used with offset/limit or threshold parameters." ); @@ -193,17 +201,23 @@ public Object getResultSet( if ( threshold < 0.0 || threshold > 1.0 ) { throw new BadRequestException( "The threshold must be between 0 and 1." ); } - return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, threshold, offset, limit ); + return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, includeTaxonInGenes, threshold, offset, limit ); } else { - return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, offset, limit ); + return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, includeTaxonInGenes, offset, limit ); } } else { - return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, excludeResults ); + return getResultSetAsJson( analysisResultSet, includeFactorValuesInContrasts, includeTaxonInGenes, excludeResults ); } } else { if ( offsetArg != null || limitArg != null ) { throw new BadRequestException( "The offset/limit parameters cannot be used with the TSV representation." ); } + if ( includeFactorValuesInContrasts != null ) { + throw new BadRequestException( "The includeFactorValuesInContrasts parameter cannot be used with the TSV representation." ); + } + if ( includeTaxonInGenes != null ) { + throw new BadRequestException( "The includeTaxonInGenes parameter cannot be used with the TSV representation." ); + } if ( excludeResults ) { throw new BadRequestException( "The excludeResults parameter cannot be used with the TSV representation." ); } @@ -214,7 +228,7 @@ public Object getResultSet( } } - private ResponseDataObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, boolean excludeResults ) { + private ResponseDataObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, boolean includeTaxonInGenes, boolean excludeResults ) { if ( excludeResults ) { ExpressionAnalysisResultSet ears = expressionAnalysisResultSetArgService.getEntity( analysisResultSet ); return respond( expressionAnalysisResultSetService.loadValueObject( ears ) ); @@ -223,26 +237,26 @@ private ResponseDataObject g if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } - return respond( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, false ) ); + return respond( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, false, includeTaxonInGenes ) ); } } - private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, int offset, int limit ) { + private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, boolean includeTaxonInGenes, int offset, int limit ) { ExpressionAnalysisResultSet ears = expressionAnalysisResultSetArgService.getEntityWithContrastsAndResults( analysisResultSet, offset, limit ); if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } long totalElements = expressionAnalysisResultSetService.countResults( ears ); - return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, true ), null, offset, limit, totalElements ); + return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, true, includeTaxonInGenes ), null, offset, limit, totalElements ); } - private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, double threshold, int offset, int limit ) { + private PaginatedResultsResponseDataObjectDifferentialExpressionAnalysisResultSetValueObject getResultSetAsJson( ExpressionAnalysisResultSetArg analysisResultSet, boolean includeFactorValuesInContrasts, boolean includeTaxonInGenes, double threshold, int offset, int limit ) { ExpressionAnalysisResultSet ears = expressionAnalysisResultSetArgService.getEntityWithContrastsAndResults( analysisResultSet, threshold, offset, limit ); if ( ears == null ) { throw new NotFoundException( "Could not find ExpressionAnalysisResultSet for " + analysisResultSet + "." ); } long totalElements = expressionAnalysisResultSetService.countResults( ears, threshold ); - return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, true ), threshold, offset, limit, totalElements ); + return paginateResults( expressionAnalysisResultSetService.loadValueObjectWithResults( ears, includeFactorValuesInContrasts, true, includeTaxonInGenes ), threshold, offset, limit, totalElements ); } private StreamingOutput getResultSetAsTsv( ExpressionAnalysisResultSetArg analysisResultSet ) { diff --git a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md index 2960028795..7385399977 100644 --- a/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md +++ b/gemma-rest/src/main/resources/restapidocs/CHANGELOG.md @@ -3,8 +3,11 @@ ### Update 2.8.1 - add `factorValueId` and `secondFactorValueId` in `ContrastResultValueObject`. Those are populated in `getResultSet` -- when the query parameter `includeFactorValuesInContrasts` is set to `true` to make the payload slimmer since the -- factors can be looked up by ID in `experimentalFactors`. It will default to `false` in the 2.9.0. + when the query parameter `includeFactorValuesInContrasts` is set to `true` to make the payload slimmer since the + factors can be looked up by ID in `experimentalFactors`. It will default to `false` in the 2.9.0. +- add `taxonId` in `GeneValueObject` and a `includeTaxonInGenes` query parameter to `getResultSet`. When set to `true`, + taxa information will be omitted from individual genes; a `taxonId` field will be populated and a `taxa` collection + in `DifferentialExpressionAnalysisResultSetValueObject` will be available. It will default to `false` in the 2.9.0. - don't render the details of the experimental factor in `FactorValueValueObject` when it is rendered in the context of an `ExperimentalFactorValueObject` - rename `bioAssaySetId` to `experimentAnalyzedId` and `sourceExperiment` to `sourceExperimentId` in @@ -14,12 +17,19 @@ - omit `factorValuesUsedByExperimentalFactorId` in `DifferentialExpressionAnalysisValueObject` when not set - omit `charId` in `FactorValueValueObject` - omit `accessions`, `aliases` and `multifunctionalityRank` in `GeneValueObject` when not set -- populate `baselineGroup` and `secondBaselineGroup` in `getResultSet()` for interaction and continuous factors +- add `taxonId` in `GeneValueObject` and use it in `getResultSet` to avoid producing a full taxon for every single + result, taxa are made available in a `taxa` field in `DifferentialExpressionAnalysisResultSetValueObject` +- populate `baselineGroup` and `secondBaselineGroup` in `getResultSet` for interaction and continuous factors #### Future breaking changes for 2.9.0 -In 2.9.0, `subsetFactorId` and `subsetFactor` in `DifferentialExpressionAnalysisValueObject` will become mutually -exclusives. +- `subsetFactorId` and `subsetFactor` in `DifferentialExpressionAnalysisValueObject` will become mutually exclusives. +- `includeFactorValuesInContrasts` will default to `false` in `getResultSet` and as a result, `factorValue` + and `secondFactorValue` will be omitted from `ContrastResultValueObject` in `getResultSet`. +- `includeTaxonInGenes` will default to `false` in `getResultSet` and as a result, `taxon` will no longer be populated + in genes + +Discussion related to these changes are available in https://github.com/PavlidisLab/Gemma/issues/1198. ### Update 2.8.0 From 64c94934edf411f834541a6150991798b640486e Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Mon, 5 Aug 2024 12:09:03 -0400 Subject: [PATCH 91/99] Minor improvements for BootstrappedDataSourceFactory Add support for bootstrapping any AbstractDriverBasedDataSource subclasses. --- .../core/apps/InitializeDatabaseCli.java | 5 ++-- .../BootstrappedDataSourceFactory.java | 30 ++++++++++++++----- .../BootstrappedDataSourceFactoryTest.java | 16 ++++++++++ ...BootstrappedDataSourceInitializerTest.java | 15 ---------- 4 files changed, 42 insertions(+), 24 deletions(-) create mode 100644 gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactoryTest.java delete mode 100644 gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java diff --git a/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java b/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java index 196180c3a9..8a13f8c081 100644 --- a/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java +++ b/gemma-cli/src/main/java/ubic/gemma/core/apps/InitializeDatabaseCli.java @@ -11,7 +11,6 @@ import org.springframework.jdbc.datasource.init.DatabasePopulatorUtils; import ubic.gemma.core.util.AbstractCLI; import ubic.gemma.persistence.hibernate.LocalSessionFactoryBean; -import ubic.gemma.persistence.initialization.BootstrappedDataSourceFactory; import ubic.gemma.persistence.initialization.CreateDatabasePopulator; import ubic.gemma.persistence.initialization.DatabaseSchemaPopulator; import ubic.gemma.persistence.initialization.InitialDataPopulator; @@ -19,6 +18,8 @@ import javax.annotation.Nullable; import javax.sql.DataSource; +import static ubic.gemma.persistence.initialization.BootstrappedDataSourceFactory.createBootstrappedDataSource; + /** * This is exclusively available for the test database. */ @@ -68,7 +69,7 @@ protected void doWork() throws Exception { jdbcUrl = dataSource.toString(); } promptConfirmationOrAbort( "The following data source will be initialized: " + jdbcUrl ); - try ( HikariDataSource bootstrappedDataSource = BootstrappedDataSourceFactory.createBootstrappedDataSource( dataSource ) ) { + try ( HikariDataSource bootstrappedDataSource = createBootstrappedDataSource( dataSource ) ) { CreateDatabasePopulator cdb = new CreateDatabasePopulator( databaseName ); cdb.setDropIfExists( true ); DatabasePopulatorUtils.execute( cdb, bootstrappedDataSource ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java index 650ca40b68..893b76ea64 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactory.java @@ -3,7 +3,7 @@ import com.zaxxer.hikari.HikariDataSource; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; -import org.springframework.util.Assert; +import org.springframework.jdbc.datasource.AbstractDriverBasedDataSource; import javax.sql.DataSource; @@ -26,7 +26,7 @@ public DataSource getObject() throws Exception { @Override public Class getObjectType() { - return HikariDataSource.class; + return this.dataSource.getClass(); } @Override @@ -40,16 +40,32 @@ public void destroy() throws Exception { } public static HikariDataSource createBootstrappedDataSource( DataSource dataSource ) { - Assert.isInstanceOf( HikariDataSource.class, dataSource, - "Don't know how to bootstrap a data source of type " + dataSource.getClass().getName() + "." ); - HikariDataSource hikariDataSource = ( HikariDataSource ) dataSource; + if ( dataSource instanceof HikariDataSource ) { + return bootstrapHikariDataSource( ( HikariDataSource ) dataSource ); + } else if ( dataSource instanceof AbstractDriverBasedDataSource ) { + return bootstrapDriverBasedDataSource( ( AbstractDriverBasedDataSource ) dataSource ); + } else { + throw new IllegalArgumentException( "Don't know how to bootstrap a data source of type " + dataSource.getClass().getName() + "." ); + } + } + + private static HikariDataSource bootstrapHikariDataSource( HikariDataSource dataSource ) { HikariDataSource bootstrappedDataSource = new HikariDataSource(); - hikariDataSource.copyStateTo( bootstrappedDataSource ); - bootstrappedDataSource.setJdbcUrl( stripPathComponent( hikariDataSource.getJdbcUrl() ) ); + dataSource.copyStateTo( bootstrappedDataSource ); + bootstrappedDataSource.setJdbcUrl( stripPathComponent( dataSource.getJdbcUrl() ) ); bootstrappedDataSource.setCatalog( null ); return bootstrappedDataSource; } + private static HikariDataSource bootstrapDriverBasedDataSource( AbstractDriverBasedDataSource dataSource ) { + HikariDataSource bootstrappedDataSource = new HikariDataSource(); + bootstrappedDataSource.setJdbcUrl( stripPathComponent( dataSource.getUrl() ) ); + bootstrappedDataSource.setUsername( dataSource.getUsername() ); + bootstrappedDataSource.setPassword( dataSource.getPassword() ); + bootstrappedDataSource.setDataSourceProperties( dataSource.getConnectionProperties() ); + return bootstrappedDataSource; + } + static String stripPathComponent( String jdbcUrl ) { int indexOfProtocol = jdbcUrl.indexOf( "://" ); int indexOfPath = jdbcUrl.lastIndexOf( '/' ); diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactoryTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactoryTest.java new file mode 100644 index 0000000000..b41c9bb40d --- /dev/null +++ b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceFactoryTest.java @@ -0,0 +1,16 @@ +package ubic.gemma.persistence.initialization; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static ubic.gemma.persistence.initialization.BootstrappedDataSourceFactory.stripPathComponent; + +public class BootstrappedDataSourceFactoryTest { + + @Test + public void test() { + assertEquals( "jdbc:mysql://test@foo?a=b", stripPathComponent( "jdbc:mysql://test@foo/bleh?a=b" ) ); + assertEquals( "jdbc:mysql://test@foo", stripPathComponent( "jdbc:mysql://test@foo/bleh" ) ); + assertEquals( "jdbc:mysql://test@foo?a=b", stripPathComponent( "jdbc:mysql://test@foo?a=b" ) ); + } +} \ No newline at end of file diff --git a/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java b/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java deleted file mode 100644 index 9d79473415..0000000000 --- a/gemma-core/src/test/java/ubic/gemma/persistence/initialization/BootstrappedDataSourceInitializerTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package ubic.gemma.persistence.initialization; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class BootstrappedDataSourceInitializerTest { - - @Test - public void test() { - assertEquals( "jdbc:mysql://test@foo?a=b", BootstrappedDataSourceFactory.stripPathComponent( "jdbc:mysql://test@foo/bleh?a=b" ) ); - assertEquals( "jdbc:mysql://test@foo", BootstrappedDataSourceFactory.stripPathComponent( "jdbc:mysql://test@foo/bleh" ) ); - assertEquals( "jdbc:mysql://test@foo?a=b", BootstrappedDataSourceFactory.stripPathComponent( "jdbc:mysql://test@foo?a=b" ) ); - } -} \ No newline at end of file From 2c877271528aede32d7760ba671b90bedf1f0715 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 13:25:41 -0400 Subject: [PATCH 92/99] Fix batching of parameters in CoexpressionAnalysisDao.getExperimentsWithAnalysis() --- .../coexpression/CoexpressionAnalysisDao.java | 2 +- .../CoexpressionAnalysisDaoImpl.java | 30 +++++++++---------- .../CoexpressionAnalysisService.java | 2 +- .../CoexpressionAnalysisServiceImpl.java | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDao.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDao.java index c375380d8a..435b1fdb47 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDao.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDao.java @@ -36,6 +36,6 @@ public interface CoexpressionAnalysisDao extends SingleExperimentAnalysisDao getExperimentsWithAnalysis( Collection idsToFilter ); - Boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ); + boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ); } diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDaoImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDaoImpl.java index 98fc4cfee6..61e8db5de4 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDaoImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisDaoImpl.java @@ -28,7 +28,7 @@ import java.util.Collection; -import static ubic.gemma.persistence.util.QueryUtils.optimizeParameterList; +import static ubic.gemma.persistence.util.QueryUtils.listByBatch; /** *

@@ -49,27 +49,27 @@ public CoexpressionAnalysisDaoImpl( SessionFactory sessionFactory ) { @Override public CoexpCorrelationDistribution getCoexpCorrelationDistribution( ExpressionExperiment expressionExperiment ) { - String q = "select ccd from CoexpressionAnalysis pca " - + "join pca.coexpCorrelationDistribution ccd where pca.experimentAnalyzed = :ee"; - return ( CoexpCorrelationDistribution ) this.getSessionFactory().getCurrentSession().createQuery( q ) - .setParameter( "ee", expressionExperiment ).uniqueResult(); + return ( CoexpCorrelationDistribution ) this.getSessionFactory().getCurrentSession() + .createQuery( "select ccd from CoexpressionAnalysis pca " + + "join pca.coexpCorrelationDistribution ccd where pca.experimentAnalyzed = :ee" ) + .setParameter( "ee", expressionExperiment ) + .uniqueResult(); } @Override public Collection getExperimentsWithAnalysis( Collection idsToFilter ) { - //noinspection unchecked - return this.getSessionFactory().getCurrentSession().createQuery( - "select experimentAnalyzed.id from CoexpressionAnalysis where experimentAnalyzed.id in (:ids)" ) - .setParameterList( "ids", optimizeParameterList( idsToFilter ) ).list(); + return listByBatch( this.getSessionFactory().getCurrentSession() + .createQuery( "select experimentAnalyzed.id from CoexpressionAnalysis where experimentAnalyzed.id in (:ids)" ), + "ids", idsToFilter, 2048 ); } @Override - public Boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ) { - String q = "select ccd from CoexpressionAnalysis pca " - + "join pca.coexpCorrelationDistribution ccd where pca.experimentAnalyzed = :ee"; - return this.getSessionFactory().getCurrentSession().createQuery( q ).setParameter( "ee", ee ).uniqueResult() - != null; + public boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ) { + return this.getSessionFactory().getCurrentSession() + .createQuery( "select ccd from CoexpressionAnalysis pca " + + "join pca.coexpCorrelationDistribution ccd where pca.experimentAnalyzed = :ee" ) + .setParameter( "ee", ee ) + .uniqueResult() != null; } - } \ No newline at end of file diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisService.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisService.java index efb18f633d..712032152a 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisService.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisService.java @@ -62,7 +62,7 @@ void addCoexpCorrelationDistribution( ExpressionExperiment expressionExperiment, CoexpCorrelationDistribution coexpd ); @Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "ACL_SECURABLE_READ" }) - Boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ); + boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ); @Override void removeForExperiment( BioAssaySet ee ); diff --git a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisServiceImpl.java b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisServiceImpl.java index fae31db592..5282db63e1 100644 --- a/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisServiceImpl.java +++ b/gemma-core/src/main/java/ubic/gemma/persistence/service/analysis/expression/coexpression/CoexpressionAnalysisServiceImpl.java @@ -96,7 +96,7 @@ public void addCoexpCorrelationDistribution( ExpressionExperiment expressionExpe @Override @Transactional(readOnly = true) - public Boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ) { + public boolean hasCoexpCorrelationDistribution( ExpressionExperiment ee ) { return this.coexpressionAnalysisDao.hasCoexpCorrelationDistribution( ee ); } From 548fdace3e43ce1f24e98e88e0f39b50b041e97f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 14:32:13 -0400 Subject: [PATCH 93/99] Add schemas and an in-classpath entity resolver for NCBI XML documents Remove some assertions for external DTDs since those are now available in the classpath. --- .../gemma/core/loader/entrez/EutilFetch.java | 13 +- .../entrez/pubmed/ESearchXMLParser.java | 8 +- .../loader/entrez/pubmed/PubMedXMLParser.java | 10 +- .../expression/geo/DatasetCombiner.java | 5 +- .../expression/geo/service/GeoBrowser.java | 12 +- .../core/loader/util/NcbiEntityResolver.java | 37 + .../java/ubic/gemma/core/util/XMLUtils.java | 16 +- .../core/loader/dtd/20041029/esummary-v1.dtd | 20 + .../core/loader/dtd/20060628/esearch.dtd | 103 + .../gemma/core/loader/dtd/bookdoc_110101.dtd | 78 + .../gemma/core/loader/dtd/eSearch_020511.dtd | 64 + .../gemma/core/loader/dtd/iso8879/isobox.ent | 61 + .../gemma/core/loader/dtd/iso8879/isocyr1.ent | 88 + .../gemma/core/loader/dtd/iso8879/isocyr2.ent | 47 + .../gemma/core/loader/dtd/iso8879/isodia.ent | 35 + .../gemma/core/loader/dtd/iso8879/isolat1.ent | 83 + .../gemma/core/loader/dtd/iso8879/isolat2.ent | 142 ++ .../gemma/core/loader/dtd/iso8879/isonum.ent | 97 + .../gemma/core/loader/dtd/iso8879/isopub.ent | 105 + .../core/loader/dtd/iso9573-13/isoamsa.ent | 167 ++ .../core/loader/dtd/iso9573-13/isoamsb.ent | 143 ++ .../core/loader/dtd/iso9573-13/isoamsc.ent | 43 + .../core/loader/dtd/iso9573-13/isoamsn.ent | 114 ++ .../core/loader/dtd/iso9573-13/isoamso.ent | 73 + .../core/loader/dtd/iso9573-13/isoamsr.ent | 204 ++ .../core/loader/dtd/iso9573-13/isogrk3.ent | 64 + .../core/loader/dtd/iso9573-13/isomfrk.ent | 75 + .../core/loader/dtd/iso9573-13/isomopf.ent | 49 + .../core/loader/dtd/iso9573-13/isomscr.ent | 75 + .../core/loader/dtd/iso9573-13/isotech.ent | 182 ++ .../core/loader/dtd/mathml-in-pubmed.mod | 151 ++ .../gemma/core/loader/dtd/mathml/mmlalias.ent | 564 ++++++ .../gemma/core/loader/dtd/mathml/mmlextra.ent | 122 ++ .../gemma/core/loader/dtd/mathml3-qname1.mod | 294 +++ .../ubic/gemma/core/loader/dtd/mathml3.dtd | 1682 +++++++++++++++++ .../core/loader/dtd/nlmcommon_041101.dtd | 190 ++ .../core/loader/dtd/nlmmedline_041101.dtd | 70 + .../loader/dtd/nlmmedlinecitation_041101.dtd | 113 ++ .../dtd/nlmmedlinecitationset_110101.dtd | 197 ++ .../loader/dtd/nlmsharedcatcit_041101.dtd | 77 + .../gemma/core/loader/dtd/pubmed_041101.dtd | 65 + .../gemma/core/loader/dtd/pubmed_110101.dtd | 79 + .../gemma/core/loader/dtd/pubmed_180101.dtd | 434 +++++ .../gemma/core/loader/dtd/pubmed_190101.dtd | 478 +++++ .../gemma/core/loader/dtd/pubmed_240101.dtd | 477 +++++ .../service/GeoBrowserServiceParseTest.java | 3 - 46 files changed, 7171 insertions(+), 38 deletions(-) create mode 100644 gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20041029/esummary-v1.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20060628/esearch.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/bookdoc_110101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSearch_020511.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isobox.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr1.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr2.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isodia.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat1.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat2.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isonum.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isopub.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsa.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsb.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsc.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsn.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamso.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsr.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isogrk3.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomfrk.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomopf.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomscr.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isotech.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml-in-pubmed.mod create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlalias.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlextra.ent create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3-qname1.mod create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmcommon_041101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedline_041101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitation_041101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitationset_110101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmsharedcatcit_041101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_041101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_110101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_180101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_190101.dtd create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_240101.dtd diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/EutilFetch.java b/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/EutilFetch.java index 03cfc33465..05a5e4150f 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/EutilFetch.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/EutilFetch.java @@ -26,11 +26,10 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -import ubic.gemma.core.util.XMLUtils; import ubic.gemma.core.config.Settings; +import ubic.gemma.core.util.XMLUtils; import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import java.io.BufferedReader; import java.io.IOException; @@ -39,6 +38,8 @@ import java.net.URL; import java.net.URLConnection; +import static ubic.gemma.core.util.XMLUtils.createDocumentBuilder; + /** * @author paul */ @@ -48,7 +49,6 @@ public class EutilFetch { private static final String EFETCH = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db="; private static final String ESEARCH = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db="; private static final String APIKEY = Settings.getString( "entrez.efetch.apikey" ); - private static final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); private static final int MAX_TRIES = 3; /** @@ -66,9 +66,8 @@ public static String fetch( String db, String searchString, int limit ) throws I public static Document parseStringInputStream( String details ) throws SAXException, IOException, ParserConfigurationException { - DocumentBuilder builder = EutilFetch.factory.newDocumentBuilder(); + DocumentBuilder builder = createDocumentBuilder(); int tries = 0; - while ( true ) { try ( InputStream is = new StringInputStream( details ) ) { return builder.parse( is ); @@ -102,8 +101,6 @@ private static String fetch( String db, String searchString, Mode mode, int limi while ( conn == null && numTries < MAX_TRIES ) { try { numTries++; - EutilFetch.factory.setIgnoringComments( true ); - EutilFetch.factory.setValidating( false ); Document document = EutilFetch.parseSUrlInputStream( searchUrl ); @@ -168,7 +165,7 @@ private static String fetch( String db, String searchString, Mode mode, int limi private static Document parseSUrlInputStream( URL url ) throws SAXException, IOException, ParserConfigurationException { - DocumentBuilder builder = EutilFetch.factory.newDocumentBuilder(); + DocumentBuilder builder = createDocumentBuilder(); int tries = 0; while ( true ) { diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/ESearchXMLParser.java b/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/ESearchXMLParser.java index 6669e7c709..8a50da4002 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/ESearchXMLParser.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/ESearchXMLParser.java @@ -25,17 +25,17 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; - import ubic.gemma.core.util.XMLUtils; import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import java.io.IOException; import java.io.InputStream; import java.util.Collection; import java.util.HashSet; +import static ubic.gemma.core.util.XMLUtils.createDocumentBuilder; + /** * @author pavlidis */ @@ -62,9 +62,7 @@ public int getCount( InputStream is ) throws IOException, ParserConfigurationExc } private Document openAndParse( InputStream is ) throws IOException, ParserConfigurationException, SAXException, ESearchException { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setIgnoringComments( true ); - DocumentBuilder builder = factory.newDocumentBuilder(); + DocumentBuilder builder = createDocumentBuilder(); Document doc = builder.parse( is ); NodeList error = doc.getDocumentElement().getElementsByTagName( "ERROR" ); if ( error.getLength() > 0 ) { diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/PubMedXMLParser.java b/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/PubMedXMLParser.java index 7628796df9..a4f826feb9 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/PubMedXMLParser.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/entrez/pubmed/PubMedXMLParser.java @@ -24,13 +24,11 @@ import org.apache.commons.logging.LogFactory; import org.w3c.dom.*; import org.xml.sax.SAXException; - import ubic.gemma.core.util.XMLUtils; import ubic.gemma.model.common.description.*; import ubic.gemma.model.expression.biomaterial.Compound; import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.*; import java.io.IOException; @@ -39,6 +37,8 @@ import java.text.ParseException; import java.util.*; +import static ubic.gemma.core.util.XMLUtils.createDocumentBuilder; + /** * Simple class to parse XML in the format defined by * ncbi. The resulting @@ -56,7 +56,6 @@ public class PubMedXMLParser { private static final Locale PUB_MED_LOCALE = Locale.ENGLISH; final DateFormat df = DateFormat.getDateInstance( DateFormat.MEDIUM ); private final String[] PUB_MED_DATE_FORMATS = new String[] { "MMM dd, yyyy", "yyyy", "mm dd, yyyy" }; - DocumentBuilder builder; public void extractBookPublicationYear( BibliographicReference bibRef, Node item ) { NodeList c = item.getChildNodes(); @@ -98,10 +97,7 @@ public Collection parse( InputStream is ) throws IOExcep // throw new IOException( "XML stream contains no data." ); // } - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setIgnoringComments( true ); - factory.setValidating( false ); - builder = factory.newDocumentBuilder(); + DocumentBuilder builder = createDocumentBuilder(); Document document = builder.parse( is ); PubMedXMLParser.log.debug( "done parsing" ); diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java index 943263ede1..509f599f00 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/DatasetCombiner.java @@ -45,6 +45,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import static ubic.gemma.core.util.XMLUtils.createDocumentBuilder; + /** * Class to handle cases where there are multiple GEO dataset for a single actual experiment. This can occur in at least * two ways: @@ -72,7 +74,6 @@ @SuppressWarnings({ "unused", "WeakerAccess" }) // Possible external use public class DatasetCombiner { - static final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); @SuppressWarnings("Annotator") private static final String PUNCTUATION_REGEXP = "[()\\s-._]"; /** @@ -180,7 +181,7 @@ public static Collection findGDSforGSE( String seriesAccession ) { XPathExpression xgds = xpath.compile( "/eSummaryResult/DocSum[Item/@Name=\"entryType\" and (Item=\"GDS\")]/Item[@Name=\"GDS\"][1]/text()" ); - DocumentBuilder builder = DatasetCombiner.factory.newDocumentBuilder(); + DocumentBuilder builder = createDocumentBuilder(); /* * Bug 2690. There must be a better way. diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowser.java b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowser.java index 9dbe3896d8..c3b8eae7b1 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowser.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowser.java @@ -34,15 +34,15 @@ import org.xml.sax.SAXParseException; import ubic.basecode.util.DateUtil; import ubic.basecode.util.StringUtil; +import ubic.gemma.core.config.Settings; import ubic.gemma.core.loader.entrez.pubmed.PubMedXMLFetcher; import ubic.gemma.core.loader.expression.geo.model.GeoRecord; import ubic.gemma.core.util.XMLUtils; import ubic.gemma.model.common.description.BibliographicReference; import ubic.gemma.model.common.description.MedicalSubjectHeading; -import ubic.gemma.core.config.Settings; import javax.annotation.Nullable; -import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.*; import java.io.*; @@ -58,6 +58,8 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; +import static ubic.gemma.core.util.XMLUtils.createDocumentBuilder; + /** * Gets records from GEO and compares them to Gemma. This is used to identify data sets that are new in GEO and not in * Gemma. @@ -93,8 +95,6 @@ public class GeoBrowser { private static final Log log = LogFactory.getLog( GeoBrowser.class.getName() ); private static final String NCBI_API_KEY = Settings.getString( "entrez.efetch.apikey" ); - private static final DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); - private static final XPathExpression characteristics; private static final XPathExpression source; private static final XPathExpression xaccession; @@ -121,8 +121,6 @@ public class GeoBrowser { private static final String GEO_BROWSE_SUFFIX = "&display="; static { - GeoBrowser.docFactory.setIgnoringComments( true ); - GeoBrowser.docFactory.setValidating( false ); XPathFactory xFactory = XPathFactory.newInstance(); XPath xpath = xFactory.newXPath(); try { @@ -832,7 +830,7 @@ Document parseMiniMLDocument( URL url ) throws EmptyXmlDocumentException, IOExce private Document parseMiniMLDocument( URL url, int maxRetries, @Nullable IOExceptionWithRetry errorFromPreviousAttempt ) throws EmptyXmlDocumentException, IOException { try ( InputStream is = openUrlWithMaxSize( url, MAX_MINIML_RECORD_SIZE ) ) { - return GeoBrowser.docFactory.newDocumentBuilder().parse( is ); + return createDocumentBuilder().parse( is ); } catch ( ParserConfigurationException | SAXException e ) { if ( isCausedByAnEmptyXmlDocument( e ) ) { throw new EmptyXmlDocumentException( e ); diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java b/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java new file mode 100644 index 0000000000..8e31a68d08 --- /dev/null +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java @@ -0,0 +1,37 @@ +package ubic.gemma.core.loader.util; + +import lombok.extern.apachecommons.CommonsLog; +import org.xml.sax.EntityResolver; +import org.xml.sax.InputSource; + +import java.io.InputStream; + +/** + * Resolve a bunch of NCBI DTDs in the classpath. + * @author poirigui + */ +@CommonsLog +public class NcbiEntityResolver implements EntityResolver { + + private final String[] NAMESPACES = new String[] { + "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/", + "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/", + "https://dtd.nlm.nih.gov/ncbi/pubmed/out/" + }; + + @Override + public InputSource resolveEntity( String publicId, String systemId ) { + for ( String namespace : NAMESPACES ) { + if ( systemId.startsWith( namespace ) ) { + InputStream is = getClass().getResourceAsStream( "/ubic/gemma/core/loader/dtd/" + systemId.substring( namespace.length() ) ); + if ( is != null ) { + InputSource source = new InputSource( is ); + source.setPublicId( publicId ); + source.setSystemId( systemId ); + return source; + } + } + } + return null; + } +} diff --git a/gemma-core/src/main/java/ubic/gemma/core/util/XMLUtils.java b/gemma-core/src/main/java/ubic/gemma/core/util/XMLUtils.java index 9e8dbdd583..5348b80a44 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/util/XMLUtils.java +++ b/gemma-core/src/main/java/ubic/gemma/core/util/XMLUtils.java @@ -25,7 +25,9 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; +import ubic.gemma.core.loader.util.NcbiEntityResolver; +import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -135,15 +137,17 @@ public static String getTextValue( org.w3c.dom.Element ele ) { return value.toString(); } - public static Document openAndParse( InputStream is ) - throws IOException, ParserConfigurationException, SAXException { - + public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setIgnoringComments( true ); - // factory.setValidating( true ); - + factory.setValidating( false ); DocumentBuilder builder = factory.newDocumentBuilder(); - return builder.parse( is ); + builder.setEntityResolver( new NcbiEntityResolver() ); + return builder; } + public static Document openAndParse( InputStream is ) + throws IOException, ParserConfigurationException, SAXException { + return createDocumentBuilder().parse( is ); + } } diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20041029/esummary-v1.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20041029/esummary-v1.dtd new file mode 100644 index 0000000000..a10572a18f --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20041029/esummary-v1.dtd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20060628/esearch.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20060628/esearch.dtd new file mode 100644 index 0000000000..bd11e35ab7 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/20060628/esearch.dtd @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/bookdoc_110101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/bookdoc_110101.dtd new file mode 100644 index 0000000000..78e2baeee6 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/bookdoc_110101.dtd @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSearch_020511.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSearch_020511.dtd new file mode 100644 index 0000000000..15e734bd9d --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSearch_020511.dtd @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isobox.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isobox.ent new file mode 100644 index 0000000000..05e2b1309e --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isobox.ent @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr1.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr1.ent new file mode 100644 index 0000000000..b4149c7454 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr1.ent @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr2.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr2.ent new file mode 100644 index 0000000000..b038bd9118 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isocyr2.ent @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isodia.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isodia.ent new file mode 100644 index 0000000000..39ccfcdfe5 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isodia.ent @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat1.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat1.ent new file mode 100644 index 0000000000..43ae7649d9 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat1.ent @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat2.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat2.ent new file mode 100644 index 0000000000..c29b828f1b --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isolat2.ent @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isonum.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isonum.ent new file mode 100644 index 0000000000..79f4380b2c --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isonum.ent @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isopub.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isopub.ent new file mode 100644 index 0000000000..9b27b63d6a --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso8879/isopub.ent @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsa.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsa.ent new file mode 100644 index 0000000000..c413168bfc --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsa.ent @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsb.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsb.ent new file mode 100644 index 0000000000..b74414ba8e --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsb.ent @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsc.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsc.ent new file mode 100644 index 0000000000..46ea2217c3 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsc.ent @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsn.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsn.ent new file mode 100644 index 0000000000..a1df8b7377 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsn.ent @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamso.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamso.ent new file mode 100644 index 0000000000..f99cf110cb --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamso.ent @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsr.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsr.ent new file mode 100644 index 0000000000..2251ef17df --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isoamsr.ent @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isogrk3.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isogrk3.ent new file mode 100644 index 0000000000..0cbde885f1 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isogrk3.ent @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomfrk.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomfrk.ent new file mode 100644 index 0000000000..0e1a9438b6 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomfrk.ent @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomopf.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomopf.ent new file mode 100644 index 0000000000..4b264256a7 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomopf.ent @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomscr.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomscr.ent new file mode 100644 index 0000000000..a2174f0511 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isomscr.ent @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isotech.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isotech.ent new file mode 100644 index 0000000000..d94c775833 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/iso9573-13/isotech.ent @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml-in-pubmed.mod b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml-in-pubmed.mod new file mode 100644 index 0000000000..ce95673f57 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml-in-pubmed.mod @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + +%ent-mmlextra; + + + +%ent-mmlalias; + + +%isobox; +%isocyr1; +%isocyr2; +%isodia; +%isolat1; +%isolat2; +%isonum; +%isopub; +%isoamsa; +%isoamsb; +%isoamsc; +%isoamsn; +%isoamso; +%isoamsr; +%isogrk3; +%isomfrk; +%isomopf; +%isomscr; +%isotech; + + + + + + + + + + + + + + +%mathml.dtd; diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlalias.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlalias.ent new file mode 100644 index 0000000000..1371af3224 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlalias.ent @@ -0,0 +1,564 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlextra.ent b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlextra.ent new file mode 100644 index 0000000000..850c7e7a75 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml/mmlextra.ent @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3-qname1.mod b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3-qname1.mod new file mode 100644 index 0000000000..254bdb24f4 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3-qname1.mod @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + +]]> + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3.dtd new file mode 100644 index 0000000000..3a8886ef59 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/mathml3.dtd @@ -0,0 +1,1682 @@ + + + + + + + + + + + + + + +%mathml-qname.mod;]]> + + + +]]> + + + + + + +%isobox; + +%isocyr1; + +%isocyr2; + +%isodia; + +%isolat1; + +%isolat2; + +%isonum; + +%isopub; + +%isoamsa; + +%isoamsb; + +%isoamsc; + +%isoamsn; + +%isoamso; + +%isoamsr; + +%isogrk3; + +%isomfrk; + +%isomopf; + +%isomscr; + +%isotech; + +%mmlextra; + +%mmlalias; + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmcommon_041101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmcommon_041101.dtd new file mode 100644 index 0000000000..3cd806c6d0 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmcommon_041101.dtd @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedline_041101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedline_041101.dtd new file mode 100644 index 0000000000..62efac00b9 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedline_041101.dtd @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + +%MedlineCitation; + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitation_041101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitation_041101.dtd new file mode 100644 index 0000000000..cae3866cbc --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitation_041101.dtd @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + +%NlmSharedCatCit; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitationset_110101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitationset_110101.dtd new file mode 100644 index 0000000000..c520c6d600 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmmedlinecitationset_110101.dtd @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmsharedcatcit_041101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmsharedcatcit_041101.dtd new file mode 100644 index 0000000000..9a9a0ca871 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/nlmsharedcatcit_041101.dtd @@ -0,0 +1,77 @@ + + + + + + +%NlmCommon; + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_041101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_041101.dtd new file mode 100644 index 0000000000..629513277a --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_041101.dtd @@ -0,0 +1,65 @@ + + + + + +%Medline; + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_110101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_110101.dtd new file mode 100644 index 0000000000..6298eb64bd --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_110101.dtd @@ -0,0 +1,79 @@ + + + + + +%Medline; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%Bookdoc; + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_180101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_180101.dtd new file mode 100644 index 0000000000..48bec8a8b5 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_180101.dtd @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_190101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_190101.dtd new file mode 100644 index 0000000000..d5ef99a3f7 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_190101.dtd @@ -0,0 +1,478 @@ + + + + + + + +%mathml-in-pubmed; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_240101.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_240101.dtd new file mode 100644 index 0000000000..72682c6cb3 --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/pubmed_240101.dtd @@ -0,0 +1,477 @@ + + + + + + + +%mathml-in-pubmed; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceParseTest.java b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceParseTest.java index b19c8a6c31..2345952a67 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceParseTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceParseTest.java @@ -92,7 +92,6 @@ public ExternalDatabaseService externalDatabaseService() { @Test @Category(SlowTest.class) public void testParse() { - assumeThatResourceIsAvailable( "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd" ); String response; try ( InputStream r = new ClassPathResource( "/data/loader/expression/geo/geo.esummary.test.xml" ).getInputStream() ) { response = IOUtils.toString( r, StandardCharsets.ISO_8859_1 ); @@ -111,7 +110,6 @@ public void testParse() { @Test public void testParse2() { - assumeThatResourceIsAvailable( "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd" ); String response; try ( InputStream r = new ClassPathResource( "/data/loader/expression/geo/geo.esummary.test1.xml" ).getInputStream() ) { response = IOUtils.toString( r, StandardCharsets.UTF_8 ); @@ -130,7 +128,6 @@ public void testParse2() { @Test public void testParse3() { - assumeThatResourceIsAvailable( "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd" ); String response; try ( InputStream r = new ClassPathResource( "/data/loader/expression/geo/geo.esummary.test2.xml" ).getInputStream() ) { response = IOUtils.toString( r, StandardCharsets.UTF_8 ); From 8afde5b103c95a9475d5d609a82bfc4ac10d5a88 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 16:21:11 -0400 Subject: [PATCH 94/99] Add missing assumptions for remote resources --- .../loader/expression/geo/service/GeoBrowserServiceTest.java | 3 +++ .../core/ontology/providers/GemmaOntologyServiceTest.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceTest.java b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceTest.java index 066ad87d92..f4ce329bc9 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/loader/expression/geo/service/GeoBrowserServiceTest.java @@ -29,6 +29,7 @@ import java.util.List; import static org.junit.Assert.*; +import static ubic.gemma.core.util.test.Assumptions.assumeThatResourceIsAvailable; /** * @author paul @@ -40,6 +41,7 @@ public class GeoBrowserServiceTest extends BaseSpringContextTest { @Test public final void testGetDetails() throws Exception { + assumeThatResourceIsAvailable( "https://www.ncbi.nlm.nih.gov/geo/browse/" ); try { String details = gbs.getDetails( "GSE15904", "" ); @@ -79,6 +81,7 @@ public final void testGetDetails() throws Exception { @Test public final void testGetRecentRecords() throws Exception { + assumeThatResourceIsAvailable( "https://www.ncbi.nlm.nih.gov/geo/browse/" ); try { // I changed the skip because the very newest records can cause a problem with fetching details. diff --git a/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GemmaOntologyServiceTest.java b/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GemmaOntologyServiceTest.java index 89756adcdd..fe8d66a2d5 100644 --- a/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GemmaOntologyServiceTest.java +++ b/gemma-core/src/test/java/ubic/gemma/core/ontology/providers/GemmaOntologyServiceTest.java @@ -8,11 +8,13 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static ubic.gemma.core.util.test.Assumptions.assumeThatResourceIsAvailable; public class GemmaOntologyServiceTest { @Test public void test() { + assumeThatResourceIsAvailable( "https://raw.githubusercontent.com/PavlidisLab/TGEMO/master/TGEMO.OWL" ); GemmaOntologyService gemmaOntology = new GemmaOntologyService(); gemmaOntology.setSearchEnabled( false ); gemmaOntology.setProcessImports( false ); // FIXME: remove this once https://github.com/PavlidisLab/TGEMO/pull/20 is merged From 178c5ab66f3ffaa981c09ca635a13954c186740f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 16:27:31 -0400 Subject: [PATCH 95/99] Add an option to skip testdb initialization --- gemma-core/src/main/resources/default.properties | 2 ++ .../ubic/gemma/applicationContext-dataSourceInitializer.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gemma-core/src/main/resources/default.properties b/gemma-core/src/main/resources/default.properties index c2387bd7e5..85c165064e 100755 --- a/gemma-core/src/main/resources/default.properties +++ b/gemma-core/src/main/resources/default.properties @@ -205,6 +205,8 @@ gemma.testdb.password=1234 gemma.testdb.maximumPoolSize=10 gemma.testdb.agent.userName=gemmaAgent gemma.testdb.agent.password=XXXXXXXX +# Initialize the test database, this can be disabled to make integration tests faster +gemma.testdb.initialize=true #the external database id to exclude by default in phenocarta gemma.neurocarta.exluded_database_id=85 # Featured external databases in Gemma Web About page and Gemma REST main endpoint diff --git a/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml b/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml index a01b1c31da..8b5aacf02d 100644 --- a/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml +++ b/gemma-core/src/test/resources/ubic/gemma/applicationContext-dataSourceInitializer.xml @@ -15,6 +15,7 @@ + @@ -34,5 +35,6 @@ + \ No newline at end of file From 6625bb327d486920fe22f3b24581944089211876 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 14:12:53 -0700 Subject: [PATCH 96/99] Add missing DTD for eSummary and warn when no file can be resolved --- .../core/loader/util/NcbiEntityResolver.java | 1 + .../gemma/core/loader/dtd/eSummary_041029.dtd | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSummary_041029.dtd diff --git a/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java b/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java index 8e31a68d08..d7ac45ff5d 100644 --- a/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java +++ b/gemma-core/src/main/java/ubic/gemma/core/loader/util/NcbiEntityResolver.java @@ -32,6 +32,7 @@ public InputSource resolveEntity( String publicId, String systemId ) { } } } + log.warn( String.format( "Could not find a schema for %s %s in the classpath.", publicId, systemId ) ); return null; } } diff --git a/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSummary_041029.dtd b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSummary_041029.dtd new file mode 100644 index 0000000000..a10572a18f --- /dev/null +++ b/gemma-core/src/main/resources/ubic/gemma/core/loader/dtd/eSummary_041029.dtd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + From 15c81bc607a9d51cfbcc29f3dcdf4379fd754eff Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 15:30:24 -0700 Subject: [PATCH 97/99] Narrow down scanning for non-standard CLIs in ubic.gemma.core.loader Fix incompatible bytecode in NcbiEntityResolver. --- .../ubic/gemma/applicationContext-component-scan.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gemma-cli/src/main/resources/ubic/gemma/applicationContext-component-scan.xml b/gemma-cli/src/main/resources/ubic/gemma/applicationContext-component-scan.xml index b170f34b63..0d83f0449f 100644 --- a/gemma-cli/src/main/resources/ubic/gemma/applicationContext-component-scan.xml +++ b/gemma-cli/src/main/resources/ubic/gemma/applicationContext-component-scan.xml @@ -16,7 +16,13 @@ - + + + + From 75c0c81d5635fc69bbab0d7617c12e888da23590 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 17:06:54 -0700 Subject: [PATCH 98/99] Update completion scripts --- .../main/config/bash_completion.d/gemma-cli | 16 +- .../bash_completion.d/gemma-cli-staging | 16 +- .../fish/completions/gemma-cli-staging.fish | 180 +++++++++--------- .../config/fish/completions/gemma-cli.fish | 180 +++++++++--------- 4 files changed, 214 insertions(+), 178 deletions(-) diff --git a/gemma-cli/src/main/config/bash_completion.d/gemma-cli b/gemma-cli/src/main/config/bash_completion.d/gemma-cli index af5562a2f8..6981603149 100644 --- a/gemma-cli/src/main/config/bash_completion.d/gemma-cli +++ b/gemma-cli/src/main/config/bash_completion.d/gemma-cli @@ -2,11 +2,11 @@ function __gemma_cli_complete() { COMPREPLY=() words="${COMP_WORDS[*]}" current_option="${COMP_WORDS[$COMP_CWORD-1]}" - if ! [[ " $words " =~ ' '(adATcleanup|addExternalDatabase|addGEOData|addPlatformSequences|addTSVData|affyAltsUpdate|affyCollapse|affyFromCel|blackList|blatPlatform|coexpAnalyze|corrMat|ctdDownload|deleteDiffEx|deleteExperiments|deletePhenotypes|deletePlatformElements|detachSequences|dgaDownload|diffExAnalyze|dumpForNIF|evidenceImport|fetchMeshTerms|fillBatchInfo|findDatasetPubs|findObsoleteTerms|geneUpdate|generateDataFile|genericPlatform|getDataMatrix|gwasDownload|importDesign|listExternalDatabases|listGEOData|loadEvidenceForClassifier|loadGenesFromFile|loadTaxa|makePlatformAnnotFiles|makePrivate|makeProcessedData|makePublic|mapPlatformToGenes|mergePlatforms|migrateFactorValues|omimDownload|orderVectorsByDesign|pca|platformMapSummary|platformRepeatScan|platformSubsumptionTest|printExperimentalDesign|probeRename|pubmedAssociateToExperiments|pubmedLoad|pubmedSearchAndSave|refreshExperiment|replaceData|rgdDownload|rnaseqBatchInfo|rnaseqDataAdd|runGeeq|searchIndex|seqCleanup|sfariDownload|splitExperiment|switchExperimentPlatform|updateEe2c|updateExternalDatabase|updateGOAnnots|updateMultifunc|updatePubMeds|vectorMerge|viewExpDesigns)' ' ]]; then + if ! [[ " $words " =~ ' '(adATcleanup|addExternalDatabase|addGEOData|addPlatformSequences|addTSVData|affyAltsUpdate|affyCollapse|affyFromCel|blackList|blatPlatform|coexpAnalyze|corrMat|ctdDownload|deleteDiffEx|deleteExperiments|deletePhenotypes|deletePlatformElements|detachSequences|dgaDownload|diffExAnalyze|dumpForNIF|evidenceImport|fetchMeshTerms|fillBatchInfo|findDatasetPubs|findObsoleteTerms|geneUpdate|generateDataFile|genericPlatform|getDataMatrix|gwasDownload|importDesign|listExternalDatabases|listGEOData|loadEvidenceForClassifier|loadGenesFromFile|loadTaxa|makePlatformAnnotFiles|makePrivate|makeProcessedData|makePublic|mapPlatformToGenes|mergePlatforms|migrateFactorValues|omimDownload|orderVectorsByDesign|pca|platformMapSummary|platformRepeatScan|platformSubsumptionTest|printExperimentalDesign|probeRename|pubmedAssociateToExperiments|pubmedLoad|pubmedSearchAndSave|refreshExperiment|replaceData|rgdDownload|rnaseqBatchInfo|rnaseqDataAdd|runGeeq|searchIndex|seqCleanup|sfariDownload|splitExperiment|switchExperimentPlatform|updateEe2Ad|updateEe2c|updateExternalDatabase|updateGOAnnots|updateGene2Cs|updateMultifunc|updatePubMeds|vectorMerge|viewExpDesigns)' ' ]]; then if ! [[ "$current_option" =~ (--completion-executable|--completion-shell|--logger|--verbosity|-ce|-cs|-logger|-v) ]]; then mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--completion' '--completion-executable' '--completion-shell' '--help' '--help-all' '--logger' '--profiling' '--testdb' '--verbosity' '--version' '-c' '-ce' '-cs' '-h' '-ha' '-logger' '-profiling' '-testdb' '-v' '-version'" -- "$2") fi - mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'adATcleanup' 'addExternalDatabase' 'addGEOData' 'addPlatformSequences' 'addTSVData' 'affyAltsUpdate' 'affyCollapse' 'affyFromCel' 'blackList' 'blatPlatform' 'coexpAnalyze' 'corrMat' 'ctdDownload' 'deleteDiffEx' 'deleteExperiments' 'deletePhenotypes' 'deletePlatformElements' 'detachSequences' 'dgaDownload' 'diffExAnalyze' 'dumpForNIF' 'evidenceImport' 'fetchMeshTerms' 'fillBatchInfo' 'findDatasetPubs' 'findObsoleteTerms' 'geneUpdate' 'generateDataFile' 'genericPlatform' 'getDataMatrix' 'gwasDownload' 'importDesign' 'listExternalDatabases' 'listGEOData' 'loadEvidenceForClassifier' 'loadGenesFromFile' 'loadTaxa' 'makePlatformAnnotFiles' 'makePrivate' 'makeProcessedData' 'makePublic' 'mapPlatformToGenes' 'mergePlatforms' 'migrateFactorValues' 'omimDownload' 'orderVectorsByDesign' 'pca' 'platformMapSummary' 'platformRepeatScan' 'platformSubsumptionTest' 'printExperimentalDesign' 'probeRename' 'pubmedAssociateToExperiments' 'pubmedLoad' 'pubmedSearchAndSave' 'refreshExperiment' 'replaceData' 'rgdDownload' 'rnaseqBatchInfo' 'rnaseqDataAdd' 'runGeeq' 'searchIndex' 'seqCleanup' 'sfariDownload' 'splitExperiment' 'switchExperimentPlatform' 'updateEe2c' 'updateExternalDatabase' 'updateGOAnnots' 'updateMultifunc' 'updatePubMeds' 'vectorMerge' 'viewExpDesigns'" -- "$2") + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'adATcleanup' 'addExternalDatabase' 'addGEOData' 'addPlatformSequences' 'addTSVData' 'affyAltsUpdate' 'affyCollapse' 'affyFromCel' 'blackList' 'blatPlatform' 'coexpAnalyze' 'corrMat' 'ctdDownload' 'deleteDiffEx' 'deleteExperiments' 'deletePhenotypes' 'deletePlatformElements' 'detachSequences' 'dgaDownload' 'diffExAnalyze' 'dumpForNIF' 'evidenceImport' 'fetchMeshTerms' 'fillBatchInfo' 'findDatasetPubs' 'findObsoleteTerms' 'geneUpdate' 'generateDataFile' 'genericPlatform' 'getDataMatrix' 'gwasDownload' 'importDesign' 'listExternalDatabases' 'listGEOData' 'loadEvidenceForClassifier' 'loadGenesFromFile' 'loadTaxa' 'makePlatformAnnotFiles' 'makePrivate' 'makeProcessedData' 'makePublic' 'mapPlatformToGenes' 'mergePlatforms' 'migrateFactorValues' 'omimDownload' 'orderVectorsByDesign' 'pca' 'platformMapSummary' 'platformRepeatScan' 'platformSubsumptionTest' 'printExperimentalDesign' 'probeRename' 'pubmedAssociateToExperiments' 'pubmedLoad' 'pubmedSearchAndSave' 'refreshExperiment' 'replaceData' 'rgdDownload' 'rnaseqBatchInfo' 'rnaseqDataAdd' 'runGeeq' 'searchIndex' 'seqCleanup' 'sfariDownload' 'splitExperiment' 'switchExperimentPlatform' 'updateEe2Ad' 'updateEe2c' 'updateExternalDatabase' 'updateGOAnnots' 'updateGene2Cs' 'updateMultifunc' 'updatePubMeds' 'vectorMerge' 'viewExpDesigns'" -- "$2") fi if [[ " $words " =~ ' addGEOData ' ]]; then if ! [[ "$current_option" =~ (--acc|--file|-batchFormat|-batchOutputFile|-e|-f|-softfile) ]]; then @@ -216,8 +216,15 @@ function __gemma_cli_complete() { mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -f -- "$2") fi fi + if [[ " $words " =~ ' updateEe2Ad ' ]]; then + if ! [[ "$current_option" =~ (-mdate) ]]; then + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '-h' '-mdate'" -- "$2") + fi + fi if [[ " $words " =~ ' updateEe2c ' ]]; then - mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '--truncate' '-h' '-truncate'" -- "$2") + if ! [[ "$current_option" =~ (-mdate) ]]; then + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '--truncate' '-h' '-mdate' '-truncate'" -- "$2") + fi fi if [[ " $words " =~ ' vectorMerge ' ]]; then if ! [[ "$current_option" =~ (--eeListfile|--excludeEEFile|--experiment|--expressionQuery|--taxon|-batchFormat|-batchOutputFile|-e|-eeset|-f|-q|-t|-x) ]]; then @@ -494,5 +501,8 @@ function __gemma_cli_complete() { if [[ " $words " =~ ' pubmedSearchAndSave ' ]]; then mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '--persist' '-d' '-h'" -- "$2") fi + if [[ " $words " =~ ' updateGene2Cs ' ]]; then + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '-h'" -- "$2") + fi } complete -o filenames -o bashdefault -F __gemma_cli_complete 'gemma-cli' diff --git a/gemma-cli/src/main/config/bash_completion.d/gemma-cli-staging b/gemma-cli/src/main/config/bash_completion.d/gemma-cli-staging index 2bb714a03b..036a3cb393 100644 --- a/gemma-cli/src/main/config/bash_completion.d/gemma-cli-staging +++ b/gemma-cli/src/main/config/bash_completion.d/gemma-cli-staging @@ -2,11 +2,11 @@ function __gemma_cli_complete() { COMPREPLY=() words="${COMP_WORDS[*]}" current_option="${COMP_WORDS[$COMP_CWORD-1]}" - if ! [[ " $words " =~ ' '(adATcleanup|addExternalDatabase|addGEOData|addPlatformSequences|addTSVData|affyAltsUpdate|affyCollapse|affyFromCel|blackList|blatPlatform|coexpAnalyze|corrMat|ctdDownload|deleteDiffEx|deleteExperiments|deletePhenotypes|deletePlatformElements|detachSequences|dgaDownload|diffExAnalyze|dumpForNIF|evidenceImport|fetchMeshTerms|fillBatchInfo|findDatasetPubs|findObsoleteTerms|geneUpdate|generateDataFile|genericPlatform|getDataMatrix|gwasDownload|importDesign|listExternalDatabases|listGEOData|loadEvidenceForClassifier|loadGenesFromFile|loadTaxa|makePlatformAnnotFiles|makePrivate|makeProcessedData|makePublic|mapPlatformToGenes|mergePlatforms|migrateFactorValues|omimDownload|orderVectorsByDesign|pca|platformMapSummary|platformRepeatScan|platformSubsumptionTest|printExperimentalDesign|probeRename|pubmedAssociateToExperiments|pubmedLoad|pubmedSearchAndSave|refreshExperiment|replaceData|rgdDownload|rnaseqBatchInfo|rnaseqDataAdd|runGeeq|searchIndex|seqCleanup|sfariDownload|splitExperiment|switchExperimentPlatform|updateEe2c|updateExternalDatabase|updateGOAnnots|updateMultifunc|updatePubMeds|vectorMerge|viewExpDesigns)' ' ]]; then + if ! [[ " $words " =~ ' '(adATcleanup|addExternalDatabase|addGEOData|addPlatformSequences|addTSVData|affyAltsUpdate|affyCollapse|affyFromCel|blackList|blatPlatform|coexpAnalyze|corrMat|ctdDownload|deleteDiffEx|deleteExperiments|deletePhenotypes|deletePlatformElements|detachSequences|dgaDownload|diffExAnalyze|dumpForNIF|evidenceImport|fetchMeshTerms|fillBatchInfo|findDatasetPubs|findObsoleteTerms|geneUpdate|generateDataFile|genericPlatform|getDataMatrix|gwasDownload|importDesign|listExternalDatabases|listGEOData|loadEvidenceForClassifier|loadGenesFromFile|loadTaxa|makePlatformAnnotFiles|makePrivate|makeProcessedData|makePublic|mapPlatformToGenes|mergePlatforms|migrateFactorValues|omimDownload|orderVectorsByDesign|pca|platformMapSummary|platformRepeatScan|platformSubsumptionTest|printExperimentalDesign|probeRename|pubmedAssociateToExperiments|pubmedLoad|pubmedSearchAndSave|refreshExperiment|replaceData|rgdDownload|rnaseqBatchInfo|rnaseqDataAdd|runGeeq|searchIndex|seqCleanup|sfariDownload|splitExperiment|switchExperimentPlatform|updateEe2Ad|updateEe2c|updateExternalDatabase|updateGOAnnots|updateGene2Cs|updateMultifunc|updatePubMeds|vectorMerge|viewExpDesigns)' ' ]]; then if ! [[ "$current_option" =~ (--completion-executable|--completion-shell|--logger|--verbosity|-ce|-cs|-logger|-v) ]]; then mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--completion' '--completion-executable' '--completion-shell' '--help' '--help-all' '--logger' '--profiling' '--testdb' '--verbosity' '--version' '-c' '-ce' '-cs' '-h' '-ha' '-logger' '-profiling' '-testdb' '-v' '-version'" -- "$2") fi - mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'adATcleanup' 'addExternalDatabase' 'addGEOData' 'addPlatformSequences' 'addTSVData' 'affyAltsUpdate' 'affyCollapse' 'affyFromCel' 'blackList' 'blatPlatform' 'coexpAnalyze' 'corrMat' 'ctdDownload' 'deleteDiffEx' 'deleteExperiments' 'deletePhenotypes' 'deletePlatformElements' 'detachSequences' 'dgaDownload' 'diffExAnalyze' 'dumpForNIF' 'evidenceImport' 'fetchMeshTerms' 'fillBatchInfo' 'findDatasetPubs' 'findObsoleteTerms' 'geneUpdate' 'generateDataFile' 'genericPlatform' 'getDataMatrix' 'gwasDownload' 'importDesign' 'listExternalDatabases' 'listGEOData' 'loadEvidenceForClassifier' 'loadGenesFromFile' 'loadTaxa' 'makePlatformAnnotFiles' 'makePrivate' 'makeProcessedData' 'makePublic' 'mapPlatformToGenes' 'mergePlatforms' 'migrateFactorValues' 'omimDownload' 'orderVectorsByDesign' 'pca' 'platformMapSummary' 'platformRepeatScan' 'platformSubsumptionTest' 'printExperimentalDesign' 'probeRename' 'pubmedAssociateToExperiments' 'pubmedLoad' 'pubmedSearchAndSave' 'refreshExperiment' 'replaceData' 'rgdDownload' 'rnaseqBatchInfo' 'rnaseqDataAdd' 'runGeeq' 'searchIndex' 'seqCleanup' 'sfariDownload' 'splitExperiment' 'switchExperimentPlatform' 'updateEe2c' 'updateExternalDatabase' 'updateGOAnnots' 'updateMultifunc' 'updatePubMeds' 'vectorMerge' 'viewExpDesigns'" -- "$2") + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'adATcleanup' 'addExternalDatabase' 'addGEOData' 'addPlatformSequences' 'addTSVData' 'affyAltsUpdate' 'affyCollapse' 'affyFromCel' 'blackList' 'blatPlatform' 'coexpAnalyze' 'corrMat' 'ctdDownload' 'deleteDiffEx' 'deleteExperiments' 'deletePhenotypes' 'deletePlatformElements' 'detachSequences' 'dgaDownload' 'diffExAnalyze' 'dumpForNIF' 'evidenceImport' 'fetchMeshTerms' 'fillBatchInfo' 'findDatasetPubs' 'findObsoleteTerms' 'geneUpdate' 'generateDataFile' 'genericPlatform' 'getDataMatrix' 'gwasDownload' 'importDesign' 'listExternalDatabases' 'listGEOData' 'loadEvidenceForClassifier' 'loadGenesFromFile' 'loadTaxa' 'makePlatformAnnotFiles' 'makePrivate' 'makeProcessedData' 'makePublic' 'mapPlatformToGenes' 'mergePlatforms' 'migrateFactorValues' 'omimDownload' 'orderVectorsByDesign' 'pca' 'platformMapSummary' 'platformRepeatScan' 'platformSubsumptionTest' 'printExperimentalDesign' 'probeRename' 'pubmedAssociateToExperiments' 'pubmedLoad' 'pubmedSearchAndSave' 'refreshExperiment' 'replaceData' 'rgdDownload' 'rnaseqBatchInfo' 'rnaseqDataAdd' 'runGeeq' 'searchIndex' 'seqCleanup' 'sfariDownload' 'splitExperiment' 'switchExperimentPlatform' 'updateEe2Ad' 'updateEe2c' 'updateExternalDatabase' 'updateGOAnnots' 'updateGene2Cs' 'updateMultifunc' 'updatePubMeds' 'vectorMerge' 'viewExpDesigns'" -- "$2") fi if [[ " $words " =~ ' addGEOData ' ]]; then if ! [[ "$current_option" =~ (--acc|--file|-batchFormat|-batchOutputFile|-e|-f|-softfile) ]]; then @@ -216,8 +216,15 @@ function __gemma_cli_complete() { mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -f -- "$2") fi fi + if [[ " $words " =~ ' updateEe2Ad ' ]]; then + if ! [[ "$current_option" =~ (-mdate) ]]; then + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '-h' '-mdate'" -- "$2") + fi + fi if [[ " $words " =~ ' updateEe2c ' ]]; then - mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '--truncate' '-h' '-truncate'" -- "$2") + if ! [[ "$current_option" =~ (-mdate) ]]; then + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '--truncate' '-h' '-mdate' '-truncate'" -- "$2") + fi fi if [[ " $words " =~ ' vectorMerge ' ]]; then if ! [[ "$current_option" =~ (--eeListfile|--excludeEEFile|--experiment|--expressionQuery|--taxon|-batchFormat|-batchOutputFile|-e|-eeset|-f|-q|-t|-x) ]]; then @@ -494,5 +501,8 @@ function __gemma_cli_complete() { if [[ " $words " =~ ' pubmedSearchAndSave ' ]]; then mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '--persist' '-d' '-h'" -- "$2") fi + if [[ " $words " =~ ' updateGene2Cs ' ]]; then + mapfile -t -O "${#COMPREPLY[@]}" COMPREPLY < <(compgen -W "'--help' '-h'" -- "$2") + fi } complete -o filenames -o bashdefault -F __gemma_cli_complete 'gemma-cli-staging' diff --git a/gemma-cli/src/main/config/fish/completions/gemma-cli-staging.fish b/gemma-cli/src/main/config/fish/completions/gemma-cli-staging.fish index 13ffa4fda5..0e389fe60c 100644 --- a/gemma-cli/src/main/config/fish/completions/gemma-cli-staging.fish +++ b/gemma-cli/src/main/config/fish/completions/gemma-cli-staging.fish @@ -1,14 +1,14 @@ -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s h -l help --description 'Show help' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ha -l help-all --description 'Show complete help with all available CLI commands' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s c -l completion --description 'Generate a completion script' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ce -l completion-executable -r --description 'Name of the executable to generate completion for (defaults to gemma-cli)' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o cs -l completion-shell -r --description 'Indicate which shell to generate completion for. Only fish and bash are supported' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o version -l version --description 'Show Gemma version' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o logger -l logger -r --description 'Configure a specific logger verbosity (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.\nFor example, '"'"'--logger ubic.gemma=5'"'"', '"'"'--logger org.hibernate.SQL=5'"'"' or '"'"'--logger org.hibernate.SQL=debug'"'"'. ' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s v -l verbosity -r --description 'Set verbosity level for all loggers (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o testdb -l testdb --description 'Use the test database as described by gemma.testdb.* configuration' -complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o profiling -l profiling --description 'Enable profiling' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addGEOData' --description 'Load data from GEO' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s h -l help --description 'Show help' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ha -l help-all --description 'Show complete help with all available CLI commands' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s c -l completion --description 'Generate a completion script' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ce -l completion-executable -r --description 'Name of the executable to generate completion for (defaults to gemma-cli)' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o cs -l completion-shell -r --description 'Indicate which shell to generate completion for. Only fish and bash are supported' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o version -l version --description 'Show Gemma version' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o logger -l logger -r --description 'Configure a specific logger verbosity (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.\nFor example, '"'"'--logger ubic.gemma=5'"'"', '"'"'--logger org.hibernate.SQL=5'"'"' or '"'"'--logger org.hibernate.SQL=debug'"'"'. ' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s v -l verbosity -r --description 'Set verbosity level for all loggers (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o testdb -l testdb --description 'Use the test database as described by gemma.testdb.* configuration' +complete -c 'gemma-cli-staging' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o profiling -l profiling --description 'Enable profiling' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addGEOData' --description 'Load data from GEO' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -s f -l file -r --description 'Optional path to file with list of experiment accessions to load' @@ -23,14 +23,14 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -o sof complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -o allowsuper -f --description 'Allow sub/super series to be loaded' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addGEOData' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addTSVData' --description 'Load an experiment from a tab-delimited file instead of GEO' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addTSVData' --description 'Load an experiment from a tab-delimited file instead of GEO' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addTSVData' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addTSVData' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addTSVData' -s f -l file -r --description 'the list of experiments in flat file' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addTSVData' -s d -l dir -r -f --description 'The folder for containing the experiment files' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addTSVData' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addTSVData' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyFromCel' --description 'Reanalyze Affymetrix data from CEL files, if available; affy-power-tools must be configured.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyFromCel' --description 'Reanalyze Affymetrix data from CEL files, if available; affy-power-tools must be configured.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -44,7 +44,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -o ba complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -o aptFile -r --description 'File output from apt-probeset-summarize; use if you want to override usual GEO download behaviour; ensure you used the right official CDF/MPS configuration' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyFromCel' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'coexpAnalyze' --description 'Analyze expression data sets for coexpressed genes' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'coexpAnalyze' --description 'Analyze expression data sets for coexpressed genes' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -83,7 +83,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -o n complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -o delete -f --description 'Delete analyses for selected experiments, instead of doing analysis; supersedes all other options' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from coexpAnalyze' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'corrMat' --description 'Create or update sample correlation matrices for expression experiments' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'corrMat' --description 'Create or update sample correlation matrices for expression experiments' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -96,7 +96,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -s q -l e complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from corrMat' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteDiffEx' --description 'Delete differential expression analyses for experiment(s) from the system' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteDiffEx' --description 'Delete differential expression analyses for experiment(s) from the system' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -108,7 +108,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -s x complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteDiffEx' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteExperiments' --description 'Delete experiments or platforms from the system' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteExperiments' --description 'Delete experiments or platforms from the system' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -121,7 +121,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deleteExperiments' -s a -l array -r -f --description 'Delete platform(s) instead; you must delete associated experiments first; other options are ignored' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'diffExAnalyze' --description 'Analyze expression data sets for differentially expressed genes.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'diffExAnalyze' --description 'Analyze expression data sets for differentially expressed genes.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -145,7 +145,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -o complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -o delete -f --description 'Instead of running the analysis on the given experiments, remove the old analyses. Use with care!' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -o nobayes -f --description 'Do not apply empirical-Bayes moderated statistics. Default is to use eBayes' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from diffExAnalyze' -o nofiles --description 'Don'"'"'t create archive files after analysis. Default is to make them' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fillBatchInfo' --description 'Populate the batch information for experiments (if possible)' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fillBatchInfo' --description 'Populate the batch information for experiments (if possible)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -158,12 +158,12 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -s complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fillBatchInfo' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findDatasetPubs' --description 'Identify experiments that have no publication in Gemma and try to fill it in.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findDatasetPubs' --description 'Identify experiments that have no publication in Gemma and try to fill it in.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from findDatasetPubs' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from findDatasetPubs' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from findDatasetPubs' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from findDatasetPubs' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'generateDataFile' --description 'Generate analysis text files (diff expression)' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'generateDataFile' --description 'Generate analysis text files (diff expression)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -176,7 +176,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from generateDataFile' -s w -l forceWrite -f --description 'Overwrites exsiting files if this option is set' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'getDataMatrix' --description 'Prints preferred data matrix to a file; gene information is included if available.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'getDataMatrix' --description 'Prints preferred data matrix to a file; gene information is included if available.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -190,12 +190,12 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -o complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -s o -l outputFileName -r --description 'File name. If omitted, the file name will be based on the short name of the experiment.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from getDataMatrix' -o filter -f --description 'Filter expression matrix under default parameters' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'importDesign' --description 'Import an experimental design' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'importDesign' --description 'Import an experimental design' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from importDesign' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from importDesign' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from importDesign' -s e -l experiment -r -f --description 'Expression experiment short name' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from importDesign' -s f -l designFile -r --description 'Experimental design description file' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePrivate' --description 'Make experiments private' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePrivate' --description 'Make experiments private' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -207,7 +207,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -s x complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePrivate' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makeProcessedData' --description 'Performs preprocessing. Optionally can do only selected processing steps including batch correction, rank computation and diagnostic computation' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makeProcessedData' --description 'Performs preprocessing. Optionally can do only selected processing steps including batch correction, rank computation and diagnostic computation' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -224,7 +224,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' -o diagupdate -f --description 'Only update the diagnostics without recomputing data (PCA, M-V, sample correlation, GEEQ; may be combined with other options)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' -o rankupdate -f --description 'Only update the expression intensity rank information (may be combined with other options)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makeProcessedData' -o ignoreqm -f --description 'Ignore mismatch between raw quantitations and that inferred from data' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePublic' --description 'Make experiments public' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePublic' --description 'Make experiments public' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -236,7 +236,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -s x - complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePublic' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pca' --description 'Run PCA (using SVD) on data sets' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pca' --description 'Run PCA (using SVD) on data sets' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -249,7 +249,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -s q -l expre complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pca' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'printExperimentalDesign' --description 'Prints experimental design to a file in a R-friendly format' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'printExperimentalDesign' --description 'Prints experimental design to a file in a R-friendly format' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalDesign' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalDesign' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalDesign' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -262,7 +262,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalD complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalDesign' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalDesign' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from printExperimentalDesign' -s o -l outFilePrefix -r --description 'File prefix for saving the output (short name will be appended)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedAssociateToExperiments' --description 'Set or update the primary publication for experiments by fetching from GEO' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedAssociateToExperiments' --description 'Set or update the primary publication for experiments by fetching from GEO' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -276,7 +276,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToE complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -o pubmedIDFile -r --description 'A text file which contains the list of pubmed IDs associated with each experiment ID. If the pubmed ID is not found, it will try to use the existing pubmed ID associated with the experiment. Each row has two columns: pubmedId and experiment shortName, e.g. 22438826GSE27715' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'refreshExperiment' --description 'Refresh the given experiments on the Gemma Website' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'refreshExperiment' --description 'Refresh the cache for experiments on the Gemma Website' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -288,10 +288,10 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s v -l refreshVectors -f --description 'Refresh raw and processed data vectors' -complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s r -l refreshReports -f --description 'Refresh experiment reports (i.e. batch information, diff ex. analyses, etc.)' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s v -l refreshVectors -f --description 'Refresh cache of raw and processed data vectors' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -s r -l refreshReports -f --description 'Refresh cache of experiment reports (i.e. batch information, diff ex. analyses, etc.)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from refreshExperiment' -o threads -r -f --description 'Number of threads to use for batch processing.' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'replaceData' --description 'Replace expression data for non-Affymetrix and non-RNA-seq data sets' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'replaceData' --description 'Replace expression data for non-Affymetrix and non-RNA-seq data sets' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -305,7 +305,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -o ba complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -o file -r --description 'Path to file with tab-delimited data, first column = probe ids, first row = sample IDs (e.g. GEO GSM#)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from replaceData' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqBatchInfo' --description 'Load RNASeq batch information; header files expected to be in structure like ${gemma.fastq.headers.dir}/GSExxx/GSMxxx/SRRxxx.fastq.header' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqBatchInfo' --description 'Load RNASeq batch information; header files expected to be in structure like ${gemma.fastq.headers.dir}/GSExxx/GSMxxx/SRRxxx.fastq.header' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -318,7 +318,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' - complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqBatchInfo' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqDataAdd' --description 'Add expression quantifiation to an RNA-seq experiment' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqDataAdd' --description 'Add expression quantifiation to an RNA-seq experiment' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -337,7 +337,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -s complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -o rlen -r -f --description 'Information on read length given as a string like '"'"'100:paired'"'"', '"'"'36:unpaired'"'"' or simply '"'"'36'"'"' if pairedness is unknown' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -o log2cpm -f --description 'Just compute log2cpm from the existing stored count data (backfill); batchmode OK, no other options needed' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rnaseqDataAdd' -o multiqc -r -f --description 'File containing a MultiQC report' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'runGeeq' --description 'Generate or update GEEQ scores' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'runGeeq' --description 'Generate or update GEEQ scores' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -353,7 +353,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -o auto - complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -o mdate -r -f --description 'Constrain to run only on entities with analyses older than the given date. For example, to run only on entities that have not been analyzed in the last 10 days, use '"'"'-10d'"'"'. If there is no record of when the analysis was last run, it will be run.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from runGeeq' -s m -l mode -r -f --description 'If specified, switches the scoring mode. By default the mode is set to '"'"'all'"'"'\n Possible values are:\n all - runs all scoring\n batch- recalculates batch related scores - info, confound and batch effect\n reps - recalculates score for replicates\n pub - recalculates score for publication' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'splitExperiment' --description 'Split an experiment into parts based on an experimental factor' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'splitExperiment' --description 'Split an experiment into parts based on an experimental factor' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -366,7 +366,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' - complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from splitExperiment' -o factor -r -f --description 'ID numbers, categories or names of the factor to use, with spaces replaced by underscores (must not be '"'"'batch'"'"')' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'switchExperimentPlatform' --description 'Switch an experiment to a different array design (usually a merged one)' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'switchExperimentPlatform' --description 'Switch an experiment to a different array design (usually a merged one)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -378,13 +378,18 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPl complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -s a -l array -r -f --description 'Array design name (or short name) - no need to specifiy if the platforms used by the EE are merged' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -s a -l array -r -f --description 'Array design short name to be switched to - no need to specify if the platforms used by the EE are merged' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from switchExperimentPlatform' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateEe2c' --description 'Update the EXPRESSION_EXPERIMENT2CHARACTERISTIC table' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateEe2Ad' --description 'Update the EXPRESSION_EXPERIMENT2ARRAY_DESIGN table' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2Ad' -f +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2Ad' -s h -l help -f --description 'Print this message' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2Ad' -o mdate -r -f --description 'Constrain to run only on entities with analyses older than the given date. For example, to run only on entities that have not been analyzed in the last 10 days, use '"'"'-10d'"'"'. If there is no record of when the analysis was last run, it will be run.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateEe2c' --description 'Update the EXPRESSION_EXPERIMENT2CHARACTERISTIC table' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2c' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2c' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2c' -o truncate -l truncate -f --description 'Truncate the table before updating it' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'vectorMerge' --description 'For experiments that used multiple array designs, merge the expression profiles' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateEe2c' -o mdate -r -f --description 'Constrain to run only on entities with analyses older than the given date. For example, to run only on entities that have not been analyzed in the last 10 days, use '"'"'-10d'"'"'. If there is no record of when the analysis was last run, it will be run.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'vectorMerge' --description 'For experiments that used multiple array designs, merge the expression profiles' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -397,7 +402,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -s q complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from vectorMerge' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'adATcleanup' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'adATcleanup' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -406,7 +411,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -o md complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from adATcleanup' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addPlatformSequences' --description 'Attach sequences to array design, from a file or fetching from BLAST database.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addPlatformSequences' --description 'Attach sequences to array design, from a file or fetching from BLAST database.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequences' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequences' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequences' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -420,7 +425,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequenc complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequences' -s s -l sequence -r -f --description 'A single accession to update' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequences' -o force -f --description 'Force overwriting of existing sequences; If biosequences are encountered that already have sequences filled in, they will be overwritten; default is to leave them.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addPlatformSequences' -s t -r -f --description 'Taxon common name (e.g., human) for sequences (only required if array design is '"'"'naive'"'"')' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyCollapse' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyCollapse' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -430,7 +435,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -o a complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyCollapse' -o affyProbeFile -r --description 'Affymetrix probe file to use as input' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blatPlatform' --description 'Run BLAT on the sequences for a platform; the results are persisted in the DB.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blatPlatform' --description 'Run BLAT on the sequences for a platform; the results are persisted in the DB.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -443,7 +448,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -o s complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -s t -r -f --description 'Taxon common name (e.g., human); if platform name not given (analysis will be restricted to sequences on that platform for taxon given), blat will be run for all ArrayDesigns from that taxon (overrides -a and -b)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -s s -l scoreThresh -r -f --description 'Threshold (0-1.0) for acceptance of BLAT alignments [Default = 0.7]' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blatPlatform' -s b -l blatfile -r --description 'Blat result file in PSL format (if supplied, BLAT will not be run; will not work with settings that indicate multiple platforms to run); -t option overrides' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePlatformElements' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePlatformElements' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElements' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElements' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElements' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -452,7 +457,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElem complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElements' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElements' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePlatformElements' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'detachSequences' --description 'Remove all associations that a platform has with sequences, for cases where imported data had wrong associations. Also can be used to delete sequences associated with a platform (use very carefully as sequences can be shared by platforms)' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'detachSequences' --description 'Remove all associations that a platform has with sequences, for cases where imported data had wrong associations. Also can be used to delete sequences associated with a platform (use very carefully as sequences can be shared by platforms)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -462,14 +467,14 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' - complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from detachSequences' -o delete -f --description 'Delete sequences instead of detaching them - use with care' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'genericPlatform' --description 'Update a '"'"'platform'"'"' based on a list of NCBI IDs' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'genericPlatform' --description 'Update a '"'"'platform'"'"' based on a list of NCBI IDs' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from genericPlatform' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from genericPlatform' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from genericPlatform' -s t -l taxon -r -f --description 'Taxon of the genes' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from genericPlatform' -s a -l platform -r -f --description 'Platform short name (existing or new to add)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from genericPlatform' -s f -l geneListFile -r --description 'File with list of NCBI IDs of genes to add to platform (one per line)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from genericPlatform' -o nodb -f --description 'Dry run: Do not update the database nor delete any flat files' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePlatformAnnotFiles' --description 'Generate annotation files for platforms.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePlatformAnnotFiles' --description 'Generate annotation files for platforms.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -483,7 +488,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotF complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s t -l taxon -r -f --description 'Taxon short name e.g. '"'"'mouse'"'"' (use with --genefile, or alone to process all known genes for the taxon, or with --batch to process all arrays for the taxon.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -o nogo -l nogo -f --description 'Skip GO annotations' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s k -l dontDeleteOtherFiles --description 'Keep other files associatedwith the platform such as data set flat files and DEA results. Use this option if the annotations haven'"'"'t changed; default is to delete them' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mapPlatformToGenes' --description 'Process the BLAT results for an array design to map them onto genes' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mapPlatformToGenes' --description 'Process the BLAT results for an array design to map them onto genes' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -505,7 +510,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes' -o source -r -f --description 'Source database name (GEO etc); required if using -import' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes' -o nodb -f --description 'Don'"'"'t save the results to the database, print to stdout instead (not with -import)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mapPlatformToGenes' -o probes -r -f --description 'Comma-delimited list of probe names to process (for testing); implies -nodb' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mergePlatforms' --description 'Make a new array design that combines the reporters from others.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mergePlatforms' --description 'Make a new array design that combines the reporters from others.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -518,7 +523,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -s complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -s n -l name -r -f --description 'Name for new platform, if the given platform is not already a merged design' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -s s -l shortname -r -f --description 'Short name for new platform, if the given platform is not already a merged design' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from mergePlatforms' -o add -f --description 'If the given platform is already a merged design, add the -o designs to it. Recommended unless there is a specific reason to create a new design.' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformRepeatScan' --description 'Run RepeatMasker on sequences for an Array design' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformRepeatScan' --description 'Run RepeatMasker on sequences for an Array design' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -527,7 +532,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformRepeatScan' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformSubsumptionTest' --description 'Test microarray designs to see if one subsumes other(s) (in terms of probe sequences), and if so update their information' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformSubsumptionTest' --description 'Test microarray designs to see if one subsumes other(s) (in terms of probe sequences), and if so update their information' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptionTest' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptionTest' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptionTest' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -538,7 +543,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptio complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptionTest' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptionTest' -s o -l other -r -f --description 'Short name(s) of platforms to compare to the first one, comma-delimited' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformSubsumptionTest' -o all -f --description 'Test all platforms listed against all (not just to the first one)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'probeRename' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'probeRename' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -547,7 +552,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -o md complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from probeRename' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'seqCleanup' --description 'Examines biosequences for array designs in the database and removes duplicates.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'seqCleanup' --description 'Examines biosequences for array designs in the database and removes duplicates.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -558,14 +563,14 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -o bat complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -o dryrun -f --description 'Set to run without any database modifications' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from seqCleanup' -s b -l file --description 'File with list of biosequence ids to check; default: check all on provided platforms' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dumpForNIF' --description 'Generate views of the database in flat files' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dumpForNIF' --description 'Generate views of the database in flat files' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dumpForNIF' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dumpForNIF' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dumpForNIF' -s d -l dataset -f --description 'Will generate a zip file containing a summary of all accessible datasets in gemma' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dumpForNIF' -s t -l tissue -f --description 'Will generate a zip file containing a summary of all the tissues in accessible datasets' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dumpForNIF' -s x -l diffexpression -f --description 'Will generate a zip file containing a summary of all the differential expressed genes in accessible datasets' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dumpForNIF' -s l -l limit -r -f --description 'will impose a limit on how many datasets to process' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listGEOData' --description 'Grab information on GEO data sets not yet in the system, working backwards in time' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listGEOData' --description 'Grab information on GEO data sets not yet in the system, working backwards in time' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -o date -r -f --description 'A release date to stop the search in format yyyy.MM.dd e.g. 2010.01.12' @@ -575,7 +580,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -o ou complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -o platforms -f --description 'Fetch a list of all platforms instead of experiments (date and gselimit ignored)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -o startat -r -f --description 'Attempt to '"'"'fast-rewind'"'"' to the given GSE ID and continue retreiving from there ' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listGEOData' -o startdate -r -f --description 'Attempt to '"'"'fast-rewind'"'"' to the given date (yyyy.MM.dd) and continue retreiving from there ' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformMapSummary' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformMapSummary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -584,13 +589,13 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from platformMapSummary' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'viewExpDesigns' --description 'Dump a view of experimental design(s)' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'viewExpDesigns' --description 'Dump a view of experimental design(s)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from viewExpDesigns' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from viewExpDesigns' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyAltsUpdate' --description 'Populate the '"'"'alternative'"'"' information for Affymetrix platforms' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyAltsUpdate' --description 'Populate the '"'"'alternative'"'"' information for Affymetrix platforms' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyAltsUpdate' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from affyAltsUpdate' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blackList' --description 'Add GEO entities (series or platforms) to the blacklist' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blackList' --description 'Add GEO entities (series or platforms) to the blacklist' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -o accession -l accession -r -f --description 'Accession of the entity to blacklist' @@ -599,61 +604,61 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -o file complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -o undo -f --description 'Remove items from blacklist instead of adding. File can contain just one column of IDs, or you can provide -accession' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -o pp -f --description 'Special: proactively blacklist GEO datasets for blacklisted platforms (cannot be combined with other options except -a)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from blackList' -s a -r -f --description 'A comma-delimited of GPL IDs to check. Combine with -pp, not relevant to any other option' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findObsoleteTerms' --description 'Check for characteristics using obsolete terms as values (excluding GO), prints to sdout' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findObsoleteTerms' --description 'Check for characteristics using obsolete terms as values (excluding GO), prints to sdout' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from findObsoleteTerms' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from findObsoleteTerms' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updatePubMeds' --description 'Refresh stored information on publications' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updatePubMeds' --description 'Refresh stored information on publications' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updatePubMeds' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updatePubMeds' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updatePubMeds' -o pmids -r -f --description 'Pubmed ids, comma-delimited; default is to do all in DB' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'ctdDownload' --description 'Creates a .tsv file of lines of evidence from CTD, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'ctdDownload' --description 'Creates a .tsv file of lines of evidence from CTD, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from ctdDownload' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from ctdDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePhenotypes' --description 'Use to remove all evidence from an external database, usually to reimport them after' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePhenotypes' --description 'Use to remove all evidence from an external database, usually to reimport them after' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePhenotypes' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePhenotypes' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from deletePhenotypes' -s d -r -f --description 'External database name (e.g. '"'"'GWAS_Catalog'"'"', '"'"'DGA'"'"' etc.)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dgaDownload' --description 'Creates a .tsv file of lines of evidence from DGA, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dgaDownload' --description 'Creates a .tsv file of lines of evidence from DGA, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dgaDownload' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from dgaDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'evidenceImport' --description 'Import gene-phenotype information from any of the supported sources (via files created with the appropriate source-specific CLI)' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'evidenceImport' --description 'Import gene-phenotype information from any of the supported sources (via files created with the appropriate source-specific CLI)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from evidenceImport' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from evidenceImport' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from evidenceImport' -s f -r -f --description 'The file' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from evidenceImport' -s c -f --description 'Create in database; default is false (prints to stdout)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'gwasDownload' --description 'Creates a .tsv file of lines of evidence from GWAS publications, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'gwasDownload' --description 'Creates a .tsv file of lines of evidence from GWAS publications, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from gwasDownload' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from gwasDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadEvidenceForClassifier' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadEvidenceForClassifier' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadEvidenceForClassifier' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadEvidenceForClassifier' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'omimDownload' --description 'Creates a .tsv file of lines of evidence from OMIM, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'omimDownload' --description 'Creates a .tsv file of lines of evidence from OMIM, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from omimDownload' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from omimDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rgdDownload' --description 'Creates a .tsv file of lines of evidence from RGD, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rgdDownload' --description 'Creates a .tsv file of lines of evidence from RGD, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rgdDownload' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from rgdDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'sfariDownload' --description 'Creates a .tsv file of lines of evidence from SFARI, to be used with evidenceImport to import into Phenocarta. Requires input files be downloaded manually first.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'sfariDownload' --description 'Creates a .tsv file of lines of evidence from SFARI, to be used with evidenceImport to import into Phenocarta. Requires input files be downloaded manually first.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from sfariDownload' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from sfariDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addExternalDatabase' --description 'Add a new external database.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addExternalDatabase' --description 'Add a new external database.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addExternalDatabase' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addExternalDatabase' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addExternalDatabase' -s n -l name -r -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from addExternalDatabase' -s t -l type -r -f -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'geneUpdate' --description 'Load/update gene information from NCBI' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'geneUpdate' --description 'Load/update gene information from NCBI' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from geneUpdate' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from geneUpdate' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from geneUpdate' -s f -l file -r --description 'Optional path to the gene_info and gene2accession files' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from geneUpdate' -o taxon -r -f --description 'Specific taxon for which to update genes' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from geneUpdate' -o nodownload -f --description 'Set to suppress NCBI file download' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from geneUpdate' -o restart -r -f --description 'Enter the NCBI ID of the gene you want to start on (implies -nodownload, and assumes you have the right -taxon option, if any)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadGenesFromFile' --description 'loading genes from a non-NCBI files; only used for species like salmon' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadGenesFromFile' --description 'loading genes from a non-NCBI files; only used for species like salmon' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadGenesFromFile' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadGenesFromFile' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadGenesFromFile' -s f -r -f --description 'Tab delimited format containing gene symbol, gene name, uniprot id in that order' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadGenesFromFile' -s t -r -f --description 'Taxon common name e.g. '"'"'salmonoid'"'"'; does not have to be a species ' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'searchIndex' --description 'Create or update the searchable indexes for a Gemma production system' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'searchIndex' --description 'Create or update the searchable indexes for a Gemma production system' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -s g -f --description 'Index genes' @@ -665,7 +670,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -s q complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -s x -f --description 'Index datasets groups' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -s y -f --description 'Index gene sets' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from searchIndex' -o threads -r -f --description 'Number of threads to use for batch processing.' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateExternalDatabase' --description 'Update an external database and optionally perform a release.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateExternalDatabase' --description 'Update an external database and optionally perform a release.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalDatabase' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalDatabase' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalDatabase' -s n -l name -r -f --description 'External database name' @@ -676,28 +681,28 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalData complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalDatabase' -o releaseUrl -l release-url -r -f --description 'Release URL (optional)' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalDatabase' -o releaseNote -l release-note -r -f --description 'Note to include in the audit event related to the new release' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateExternalDatabase' -o lastUpdated -l last-updated -r -f --description 'Moment the release was performed if known, otherwise the current time will be used' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateGOAnnots' --description 'Update GO annotations' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateGOAnnots' --description 'Update GO annotations' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateGOAnnots' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateGOAnnots' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateGOAnnots' -s f -l file -r --description 'Optional location of the gene2go.gz file' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateMultifunc' --description 'Update or create gene multifunctionality metrics' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateMultifunc' --description 'Update or create gene multifunctionality metrics' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateMultifunc' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateMultifunc' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateMultifunc' -s t -l taxon -r -f --description 'Taxon to process' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fetchMeshTerms' --description 'Gets MESH headings for a set of pubmed ids' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fetchMeshTerms' --description 'Gets MESH headings for a set of pubmed ids' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fetchMeshTerms' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fetchMeshTerms' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fetchMeshTerms' -s f -l file -r complete -c gemma-cli-staging -n '__fish_seen_subcommand_from fetchMeshTerms' -s m -f --description 'Use major subjects only' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listExternalDatabases' --description 'Print an overview of all external databases used by Gemma' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listExternalDatabases' --description 'Print an overview of all external databases used by Gemma' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listExternalDatabases' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listExternalDatabases' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listExternalDatabases' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from listExternalDatabases' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadTaxa' --description 'Populate taxon tables' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadTaxa' --description 'Populate taxon tables' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadTaxa' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from loadTaxa' -s h -l help -f --description 'Print this message' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'migrateFactorValues' --description 'Perform the migration of old-style characteristics to statements' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'migrateFactorValues' --description 'Perform the migration of old-style characteristics to statements' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValues' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValues' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValues' -o migrationFile -r --description 'File containing factor value migrations' @@ -707,7 +712,7 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValue complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValues' -o noop -f --description 'Only validate migrations; no statements will be saved' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValues' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from migrateFactorValues' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'orderVectorsByDesign' --description 'Experimental: reorder the vectors by experimental design, to save computation later.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'orderVectorsByDesign' --description 'Experimental: reorder the vectors by experimental design, to save computation later.' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesign' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesign' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesign' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -719,10 +724,13 @@ complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesi complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesign' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesign' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from orderVectorsByDesign' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedLoad' --description 'Loads PubMed records into the database from XML files' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedLoad' --description 'Loads PubMed records into the database from XML files' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedLoad' -f complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedLoad' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedLoad' -s d -l dir -r -f --description 'Directory of PubMed XML files to load' -complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedSearchAndSave' --description 'perform pubmed searches from a list of terms, and persist the results in the database' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedSearchAndSave' --description 'perform pubmed searches from a list of terms, and persist the results in the database' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedSearchAndSave' -s h -l help -f --description 'Print this message' complete -c gemma-cli-staging -n '__fish_seen_subcommand_from pubmedSearchAndSave' -s d -l persist -f --description 'Persist the results. Otherwise just search.' +complete -c gemma-cli-staging -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateGene2Cs' --description 'Update the GENE2CS table' +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateGene2Cs' -f +complete -c gemma-cli-staging -n '__fish_seen_subcommand_from updateGene2Cs' -s h -l help -f --description 'Print this message' diff --git a/gemma-cli/src/main/config/fish/completions/gemma-cli.fish b/gemma-cli/src/main/config/fish/completions/gemma-cli.fish index c549103885..e9e353e0af 100644 --- a/gemma-cli/src/main/config/fish/completions/gemma-cli.fish +++ b/gemma-cli/src/main/config/fish/completions/gemma-cli.fish @@ -1,14 +1,14 @@ -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s h -l help --description 'Show help' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ha -l help-all --description 'Show complete help with all available CLI commands' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s c -l completion --description 'Generate a completion script' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ce -l completion-executable -r --description 'Name of the executable to generate completion for (defaults to gemma-cli)' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o cs -l completion-shell -r --description 'Indicate which shell to generate completion for. Only fish and bash are supported' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o version -l version --description 'Show Gemma version' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o logger -l logger -r --description 'Configure a specific logger verbosity (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.\nFor example, '"'"'--logger ubic.gemma=5'"'"', '"'"'--logger org.hibernate.SQL=5'"'"' or '"'"'--logger org.hibernate.SQL=debug'"'"'. ' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s v -l verbosity -r --description 'Set verbosity level for all loggers (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o testdb -l testdb --description 'Use the test database as described by gemma.testdb.* configuration' -complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o profiling -l profiling --description 'Enable profiling' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addGEOData' --description 'Load data from GEO' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s h -l help --description 'Show help' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ha -l help-all --description 'Show complete help with all available CLI commands' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s c -l completion --description 'Generate a completion script' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o ce -l completion-executable -r --description 'Name of the executable to generate completion for (defaults to gemma-cli)' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o cs -l completion-shell -r --description 'Indicate which shell to generate completion for. Only fish and bash are supported' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o version -l version --description 'Show Gemma version' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o logger -l logger -r --description 'Configure a specific logger verbosity (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.\nFor example, '"'"'--logger ubic.gemma=5'"'"', '"'"'--logger org.hibernate.SQL=5'"'"' or '"'"'--logger org.hibernate.SQL=debug'"'"'. ' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -s v -l verbosity -r --description 'Set verbosity level for all loggers (0=silent, 5=very verbose; default is custom, see log4j.properties). You can also use the following: off, fatal, error, warn, info, debug, trace.' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o testdb -l testdb --description 'Use the test database as described by gemma.testdb.* configuration' +complete -c 'gemma-cli' -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -o profiling -l profiling --description 'Enable profiling' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addGEOData' --description 'Load data from GEO' complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -f complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -s f -l file -r --description 'Optional path to file with list of experiment accessions to load' @@ -23,14 +23,14 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -o softfile -r complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -o allowsuper -f --description 'Allow sub/super series to be loaded' complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from addGEOData' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addTSVData' --description 'Load an experiment from a tab-delimited file instead of GEO' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addTSVData' --description 'Load an experiment from a tab-delimited file instead of GEO' complete -c gemma-cli -n '__fish_seen_subcommand_from addTSVData' -f complete -c gemma-cli -n '__fish_seen_subcommand_from addTSVData' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from addTSVData' -s f -l file -r --description 'the list of experiments in flat file' complete -c gemma-cli -n '__fish_seen_subcommand_from addTSVData' -s d -l dir -r -f --description 'The folder for containing the experiment files' complete -c gemma-cli -n '__fish_seen_subcommand_from addTSVData' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from addTSVData' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyFromCel' --description 'Reanalyze Affymetrix data from CEL files, if available; affy-power-tools must be configured.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyFromCel' --description 'Reanalyze Affymetrix data from CEL files, if available; affy-power-tools must be configured.' complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -f complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -44,7 +44,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -o batchForma complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -o aptFile -r --description 'File output from apt-probeset-summarize; use if you want to override usual GEO download behaviour; ensure you used the right official CDF/MPS configuration' complete -c gemma-cli -n '__fish_seen_subcommand_from affyFromCel' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'coexpAnalyze' --description 'Analyze expression data sets for coexpressed genes' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'coexpAnalyze' --description 'Analyze expression data sets for coexpressed genes' complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -f complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -83,7 +83,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -o noqc -f - complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -o delete -f --description 'Delete analyses for selected experiments, instead of doing analysis; supersedes all other options' complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' complete -c gemma-cli -n '__fish_seen_subcommand_from coexpAnalyze' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'corrMat' --description 'Create or update sample correlation matrices for expression experiments' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'corrMat' --description 'Create or update sample correlation matrices for expression experiments' complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -f complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -96,7 +96,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -s q -l expressio complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from corrMat' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteDiffEx' --description 'Delete differential expression analyses for experiment(s) from the system' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteDiffEx' --description 'Delete differential expression analyses for experiment(s) from the system' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -f complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -108,7 +108,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -s x -l excl complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteDiffEx' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteExperiments' --description 'Delete experiments or platforms from the system' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deleteExperiments' --description 'Delete experiments or platforms from the system' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -f complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -121,7 +121,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -s q -l complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from deleteExperiments' -s a -l array -r -f --description 'Delete platform(s) instead; you must delete associated experiments first; other options are ignored' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'diffExAnalyze' --description 'Analyze expression data sets for differentially expressed genes.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'diffExAnalyze' --description 'Analyze expression data sets for differentially expressed genes.' complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -f complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -145,7 +145,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -o redo -f complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -o delete -f --description 'Instead of running the analysis on the given experiments, remove the old analyses. Use with care!' complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -o nobayes -f --description 'Do not apply empirical-Bayes moderated statistics. Default is to use eBayes' complete -c gemma-cli -n '__fish_seen_subcommand_from diffExAnalyze' -o nofiles --description 'Don'"'"'t create archive files after analysis. Default is to make them' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fillBatchInfo' --description 'Populate the batch information for experiments (if possible)' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fillBatchInfo' --description 'Populate the batch information for experiments (if possible)' complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -f complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -158,12 +158,12 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -s q -l exp complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from fillBatchInfo' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findDatasetPubs' --description 'Identify experiments that have no publication in Gemma and try to fill it in.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findDatasetPubs' --description 'Identify experiments that have no publication in Gemma and try to fill it in.' complete -c gemma-cli -n '__fish_seen_subcommand_from findDatasetPubs' -f complete -c gemma-cli -n '__fish_seen_subcommand_from findDatasetPubs' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from findDatasetPubs' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from findDatasetPubs' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'generateDataFile' --description 'Generate analysis text files (diff expression)' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'generateDataFile' --description 'Generate analysis text files (diff expression)' complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -f complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -176,7 +176,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -s q -l complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from generateDataFile' -s w -l forceWrite -f --description 'Overwrites exsiting files if this option is set' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'getDataMatrix' --description 'Prints preferred data matrix to a file; gene information is included if available.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'getDataMatrix' --description 'Prints preferred data matrix to a file; gene information is included if available.' complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -f complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -190,12 +190,12 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -o batchFor complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -s o -l outputFileName -r --description 'File name. If omitted, the file name will be based on the short name of the experiment.' complete -c gemma-cli -n '__fish_seen_subcommand_from getDataMatrix' -o filter -f --description 'Filter expression matrix under default parameters' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'importDesign' --description 'Import an experimental design' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'importDesign' --description 'Import an experimental design' complete -c gemma-cli -n '__fish_seen_subcommand_from importDesign' -f complete -c gemma-cli -n '__fish_seen_subcommand_from importDesign' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from importDesign' -s e -l experiment -r -f --description 'Expression experiment short name' complete -c gemma-cli -n '__fish_seen_subcommand_from importDesign' -s f -l designFile -r --description 'Experimental design description file' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePrivate' --description 'Make experiments private' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePrivate' --description 'Make experiments private' complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -f complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -207,7 +207,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -s x -l exclu complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from makePrivate' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makeProcessedData' --description 'Performs preprocessing. Optionally can do only selected processing steps including batch correction, rank computation and diagnostic computation' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makeProcessedData' --description 'Performs preprocessing. Optionally can do only selected processing steps including batch correction, rank computation and diagnostic computation' complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -f complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -224,7 +224,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -o mdat complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -o diagupdate -f --description 'Only update the diagnostics without recomputing data (PCA, M-V, sample correlation, GEEQ; may be combined with other options)' complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -o rankupdate -f --description 'Only update the expression intensity rank information (may be combined with other options)' complete -c gemma-cli -n '__fish_seen_subcommand_from makeProcessedData' -o ignoreqm -f --description 'Ignore mismatch between raw quantitations and that inferred from data' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePublic' --description 'Make experiments public' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePublic' --description 'Make experiments public' complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -f complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -236,7 +236,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -s x -l exclud complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from makePublic' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pca' --description 'Run PCA (using SVD) on data sets' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pca' --description 'Run PCA (using SVD) on data sets' complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -f complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -249,7 +249,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -s q -l expressionQue complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from pca' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'printExperimentalDesign' --description 'Prints experimental design to a file in a R-friendly format' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'printExperimentalDesign' --description 'Prints experimental design to a file in a R-friendly format' complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' -f complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -262,7 +262,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' - complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from printExperimentalDesign' -s o -l outFilePrefix -r --description 'File prefix for saving the output (short name will be appended)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedAssociateToExperiments' --description 'Set or update the primary publication for experiments by fetching from GEO' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedAssociateToExperiments' --description 'Set or update the primary publication for experiments by fetching from GEO' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -f complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -276,7 +276,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperimen complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -o pubmedIDFile -r --description 'A text file which contains the list of pubmed IDs associated with each experiment ID. If the pubmed ID is not found, it will try to use the existing pubmed ID associated with the experiment. Each row has two columns: pubmedId and experiment shortName, e.g. 22438826GSE27715' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedAssociateToExperiments' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'refreshExperiment' --description 'Refresh the given experiments on the Gemma Website' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'refreshExperiment' --description 'Refresh the cache for experiments on the Gemma Website' complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -f complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -288,10 +288,10 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s x -l complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s v -l refreshVectors -f --description 'Refresh raw and processed data vectors' -complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s r -l refreshReports -f --description 'Refresh experiment reports (i.e. batch information, diff ex. analyses, etc.)' +complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s v -l refreshVectors -f --description 'Refresh cache of raw and processed data vectors' +complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -s r -l refreshReports -f --description 'Refresh cache of experiment reports (i.e. batch information, diff ex. analyses, etc.)' complete -c gemma-cli -n '__fish_seen_subcommand_from refreshExperiment' -o threads -r -f --description 'Number of threads to use for batch processing.' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'replaceData' --description 'Replace expression data for non-Affymetrix and non-RNA-seq data sets' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'replaceData' --description 'Replace expression data for non-Affymetrix and non-RNA-seq data sets' complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -f complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -305,7 +305,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -o batchForma complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -o file -r --description 'Path to file with tab-delimited data, first column = probe ids, first row = sample IDs (e.g. GEO GSM#)' complete -c gemma-cli -n '__fish_seen_subcommand_from replaceData' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqBatchInfo' --description 'Load RNASeq batch information; header files expected to be in structure like ${gemma.fastq.headers.dir}/GSExxx/GSMxxx/SRRxxx.fastq.header' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqBatchInfo' --description 'Load RNASeq batch information; header files expected to be in structure like ${gemma.fastq.headers.dir}/GSExxx/GSMxxx/SRRxxx.fastq.header' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -f complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -318,7 +318,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -s q -l e complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqBatchInfo' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqDataAdd' --description 'Add expression quantifiation to an RNA-seq experiment' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rnaseqDataAdd' --description 'Add expression quantifiation to an RNA-seq experiment' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -f complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -337,7 +337,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -s a -r -f complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -o rlen -r -f --description 'Information on read length given as a string like '"'"'100:paired'"'"', '"'"'36:unpaired'"'"' or simply '"'"'36'"'"' if pairedness is unknown' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -o log2cpm -f --description 'Just compute log2cpm from the existing stored count data (backfill); batchmode OK, no other options needed' complete -c gemma-cli -n '__fish_seen_subcommand_from rnaseqDataAdd' -o multiqc -r -f --description 'File containing a MultiQC report' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'runGeeq' --description 'Generate or update GEEQ scores' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'runGeeq' --description 'Generate or update GEEQ scores' complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -f complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -353,7 +353,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -o auto -f --desc complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -o mdate -r -f --description 'Constrain to run only on entities with analyses older than the given date. For example, to run only on entities that have not been analyzed in the last 10 days, use '"'"'-10d'"'"'. If there is no record of when the analysis was last run, it will be run.' complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' complete -c gemma-cli -n '__fish_seen_subcommand_from runGeeq' -s m -l mode -r -f --description 'If specified, switches the scoring mode. By default the mode is set to '"'"'all'"'"'\n Possible values are:\n all - runs all scoring\n batch- recalculates batch related scores - info, confound and batch effect\n reps - recalculates score for replicates\n pub - recalculates score for publication' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'splitExperiment' --description 'Split an experiment into parts based on an experimental factor' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'splitExperiment' --description 'Split an experiment into parts based on an experimental factor' complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -f complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -366,7 +366,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -s q -l e complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from splitExperiment' -o factor -r -f --description 'ID numbers, categories or names of the factor to use, with spaces replaced by underscores (must not be '"'"'batch'"'"')' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'switchExperimentPlatform' --description 'Switch an experiment to a different array design (usually a merged one)' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'switchExperimentPlatform' --description 'Switch an experiment to a different array design (usually a merged one)' complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -f complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -378,13 +378,18 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -s a -l array -r -f --description 'Array design name (or short name) - no need to specifiy if the platforms used by the EE are merged' +complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -s a -l array -r -f --description 'Array design short name to be switched to - no need to specify if the platforms used by the EE are merged' complete -c gemma-cli -n '__fish_seen_subcommand_from switchExperimentPlatform' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateEe2c' --description 'Update the EXPRESSION_EXPERIMENT2CHARACTERISTIC table' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateEe2Ad' --description 'Update the EXPRESSION_EXPERIMENT2ARRAY_DESIGN table' +complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2Ad' -f +complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2Ad' -s h -l help -f --description 'Print this message' +complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2Ad' -o mdate -r -f --description 'Constrain to run only on entities with analyses older than the given date. For example, to run only on entities that have not been analyzed in the last 10 days, use '"'"'-10d'"'"'. If there is no record of when the analysis was last run, it will be run.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateEe2c' --description 'Update the EXPRESSION_EXPERIMENT2CHARACTERISTIC table' complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2c' -f complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2c' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2c' -o truncate -l truncate -f --description 'Truncate the table before updating it' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'vectorMerge' --description 'For experiments that used multiple array designs, merge the expression profiles' +complete -c gemma-cli -n '__fish_seen_subcommand_from updateEe2c' -o mdate -r -f --description 'Constrain to run only on entities with analyses older than the given date. For example, to run only on entities that have not been analyzed in the last 10 days, use '"'"'-10d'"'"'. If there is no record of when the analysis was last run, it will be run.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'vectorMerge' --description 'For experiments that used multiple array designs, merge the expression profiles' complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -f complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -397,7 +402,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -s q -l expre complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from vectorMerge' -o force -l force -f --description 'Ignore other reasons for skipping experiments (e.g., trouble) and overwrite existing data (see documentation for this tool to see exact behavior if not clear)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'adATcleanup' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'adATcleanup' complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -f complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -406,7 +411,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -o mdate -r - complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from adATcleanup' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addPlatformSequences' --description 'Attach sequences to array design, from a file or fetching from BLAST database.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addPlatformSequences' --description 'Attach sequences to array design, from a file or fetching from BLAST database.' complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -f complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -420,7 +425,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -s y complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -s s -l sequence -r -f --description 'A single accession to update' complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -o force -f --description 'Force overwriting of existing sequences; If biosequences are encountered that already have sequences filled in, they will be overwritten; default is to leave them.' complete -c gemma-cli -n '__fish_seen_subcommand_from addPlatformSequences' -s t -r -f --description 'Taxon common name (e.g., human) for sequences (only required if array design is '"'"'naive'"'"')' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyCollapse' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyCollapse' complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -f complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -430,7 +435,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -o auto -f - complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from affyCollapse' -o affyProbeFile -r --description 'Affymetrix probe file to use as input' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blatPlatform' --description 'Run BLAT on the sequences for a platform; the results are persisted in the DB.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blatPlatform' --description 'Run BLAT on the sequences for a platform; the results are persisted in the DB.' complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -f complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -443,7 +448,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -o sensitive complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -s t -r -f --description 'Taxon common name (e.g., human); if platform name not given (analysis will be restricted to sequences on that platform for taxon given), blat will be run for all ArrayDesigns from that taxon (overrides -a and -b)' complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -s s -l scoreThresh -r -f --description 'Threshold (0-1.0) for acceptance of BLAT alignments [Default = 0.7]' complete -c gemma-cli -n '__fish_seen_subcommand_from blatPlatform' -s b -l blatfile -r --description 'Blat result file in PSL format (if supplied, BLAT will not be run; will not work with settings that indicate multiple platforms to run); -t option overrides' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePlatformElements' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePlatformElements' complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -f complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -452,7 +457,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -o complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from deletePlatformElements' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'detachSequences' --description 'Remove all associations that a platform has with sequences, for cases where imported data had wrong associations. Also can be used to delete sequences associated with a platform (use very carefully as sequences can be shared by platforms)' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'detachSequences' --description 'Remove all associations that a platform has with sequences, for cases where imported data had wrong associations. Also can be used to delete sequences associated with a platform (use very carefully as sequences can be shared by platforms)' complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -f complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -462,14 +467,14 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -o auto - complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from detachSequences' -o delete -f --description 'Delete sequences instead of detaching them - use with care' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'genericPlatform' --description 'Update a '"'"'platform'"'"' based on a list of NCBI IDs' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'genericPlatform' --description 'Update a '"'"'platform'"'"' based on a list of NCBI IDs' complete -c gemma-cli -n '__fish_seen_subcommand_from genericPlatform' -f complete -c gemma-cli -n '__fish_seen_subcommand_from genericPlatform' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from genericPlatform' -s t -l taxon -r -f --description 'Taxon of the genes' complete -c gemma-cli -n '__fish_seen_subcommand_from genericPlatform' -s a -l platform -r -f --description 'Platform short name (existing or new to add)' complete -c gemma-cli -n '__fish_seen_subcommand_from genericPlatform' -s f -l geneListFile -r --description 'File with list of NCBI IDs of genes to add to platform (one per line)' complete -c gemma-cli -n '__fish_seen_subcommand_from genericPlatform' -o nodb -f --description 'Dry run: Do not update the database nor delete any flat files' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePlatformAnnotFiles' --description 'Generate annotation files for platforms.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'makePlatformAnnotFiles' --description 'Generate annotation files for platforms.' complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -f complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -483,7 +488,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s t -l taxon -r -f --description 'Taxon short name e.g. '"'"'mouse'"'"' (use with --genefile, or alone to process all known genes for the taxon, or with --batch to process all arrays for the taxon.' complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -o nogo -l nogo -f --description 'Skip GO annotations' complete -c gemma-cli -n '__fish_seen_subcommand_from makePlatformAnnotFiles' -s k -l dontDeleteOtherFiles --description 'Keep other files associatedwith the platform such as data set flat files and DEA results. Use this option if the annotations haven'"'"'t changed; default is to delete them' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mapPlatformToGenes' --description 'Process the BLAT results for an array design to map them onto genes' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mapPlatformToGenes' --description 'Process the BLAT results for an array design to map them onto genes' complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -f complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -505,7 +510,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -o ncb complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -o source -r -f --description 'Source database name (GEO etc); required if using -import' complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -o nodb -f --description 'Don'"'"'t save the results to the database, print to stdout instead (not with -import)' complete -c gemma-cli -n '__fish_seen_subcommand_from mapPlatformToGenes' -o probes -r -f --description 'Comma-delimited list of probe names to process (for testing); implies -nodb' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mergePlatforms' --description 'Make a new array design that combines the reporters from others.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'mergePlatforms' --description 'Make a new array design that combines the reporters from others.' complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -f complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -518,7 +523,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -s o -l ot complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -s n -l name -r -f --description 'Name for new platform, if the given platform is not already a merged design' complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -s s -l shortname -r -f --description 'Short name for new platform, if the given platform is not already a merged design' complete -c gemma-cli -n '__fish_seen_subcommand_from mergePlatforms' -o add -f --description 'If the given platform is already a merged design, add the -o designs to it. Recommended unless there is a specific reason to create a new design.' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformRepeatScan' --description 'Run RepeatMasker on sequences for an Array design' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformRepeatScan' --description 'Run RepeatMasker on sequences for an Array design' complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -f complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -527,7 +532,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -o mda complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from platformRepeatScan' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformSubsumptionTest' --description 'Test microarray designs to see if one subsumes other(s) (in terms of probe sequences), and if so update their information' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformSubsumptionTest' --description 'Test microarray designs to see if one subsumes other(s) (in terms of probe sequences), and if so update their information' complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' -f complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -538,7 +543,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' - complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' -s o -l other -r -f --description 'Short name(s) of platforms to compare to the first one, comma-delimited' complete -c gemma-cli -n '__fish_seen_subcommand_from platformSubsumptionTest' -o all -f --description 'Test all platforms listed against all (not just to the first one)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'probeRename' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'probeRename' complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -f complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -547,7 +552,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -o mdate -r - complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from probeRename' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'seqCleanup' --description 'Examines biosequences for array designs in the database and removes duplicates.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'seqCleanup' --description 'Examines biosequences for array designs in the database and removes duplicates.' complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -f complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -558,14 +563,14 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -o batchFormat complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -o dryrun -f --description 'Set to run without any database modifications' complete -c gemma-cli -n '__fish_seen_subcommand_from seqCleanup' -s b -l file --description 'File with list of biosequence ids to check; default: check all on provided platforms' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dumpForNIF' --description 'Generate views of the database in flat files' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dumpForNIF' --description 'Generate views of the database in flat files' complete -c gemma-cli -n '__fish_seen_subcommand_from dumpForNIF' -f complete -c gemma-cli -n '__fish_seen_subcommand_from dumpForNIF' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from dumpForNIF' -s d -l dataset -f --description 'Will generate a zip file containing a summary of all accessible datasets in gemma' complete -c gemma-cli -n '__fish_seen_subcommand_from dumpForNIF' -s t -l tissue -f --description 'Will generate a zip file containing a summary of all the tissues in accessible datasets' complete -c gemma-cli -n '__fish_seen_subcommand_from dumpForNIF' -s x -l diffexpression -f --description 'Will generate a zip file containing a summary of all the differential expressed genes in accessible datasets' complete -c gemma-cli -n '__fish_seen_subcommand_from dumpForNIF' -s l -l limit -r -f --description 'will impose a limit on how many datasets to process' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listGEOData' --description 'Grab information on GEO data sets not yet in the system, working backwards in time' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listGEOData' --description 'Grab information on GEO data sets not yet in the system, working backwards in time' complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -f complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -o date -r -f --description 'A release date to stop the search in format yyyy.MM.dd e.g. 2010.01.12' @@ -575,7 +580,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -o output -r complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -o platforms -f --description 'Fetch a list of all platforms instead of experiments (date and gselimit ignored)' complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -o startat -r -f --description 'Attempt to '"'"'fast-rewind'"'"' to the given GSE ID and continue retreiving from there ' complete -c gemma-cli -n '__fish_seen_subcommand_from listGEOData' -o startdate -r -f --description 'Attempt to '"'"'fast-rewind'"'"' to the given date (yyyy.MM.dd) and continue retreiving from there ' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformMapSummary' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'platformMapSummary' complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -f complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -s a -l array -r -f --description 'Array design name (or short name); or comma-delimited list' @@ -584,13 +589,13 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -o mda complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -o auto -f --description 'Attempt to process entities that need processing based on workflow criteria.' complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from platformMapSummary' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'viewExpDesigns' --description 'Dump a view of experimental design(s)' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'viewExpDesigns' --description 'Dump a view of experimental design(s)' complete -c gemma-cli -n '__fish_seen_subcommand_from viewExpDesigns' -f complete -c gemma-cli -n '__fish_seen_subcommand_from viewExpDesigns' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyAltsUpdate' --description 'Populate the '"'"'alternative'"'"' information for Affymetrix platforms' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'affyAltsUpdate' --description 'Populate the '"'"'alternative'"'"' information for Affymetrix platforms' complete -c gemma-cli -n '__fish_seen_subcommand_from affyAltsUpdate' -f complete -c gemma-cli -n '__fish_seen_subcommand_from affyAltsUpdate' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blackList' --description 'Add GEO entities (series or platforms) to the blacklist' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'blackList' --description 'Add GEO entities (series or platforms) to the blacklist' complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -f complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -o accession -l accession -r -f --description 'Accession of the entity to blacklist' @@ -599,61 +604,61 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -o file -r --de complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -o undo -f --description 'Remove items from blacklist instead of adding. File can contain just one column of IDs, or you can provide -accession' complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -o pp -f --description 'Special: proactively blacklist GEO datasets for blacklisted platforms (cannot be combined with other options except -a)' complete -c gemma-cli -n '__fish_seen_subcommand_from blackList' -s a -r -f --description 'A comma-delimited of GPL IDs to check. Combine with -pp, not relevant to any other option' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findObsoleteTerms' --description 'Check for characteristics using obsolete terms as values (excluding GO), prints to sdout' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'findObsoleteTerms' --description 'Check for characteristics using obsolete terms as values (excluding GO), prints to sdout' complete -c gemma-cli -n '__fish_seen_subcommand_from findObsoleteTerms' -f complete -c gemma-cli -n '__fish_seen_subcommand_from findObsoleteTerms' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updatePubMeds' --description 'Refresh stored information on publications' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updatePubMeds' --description 'Refresh stored information on publications' complete -c gemma-cli -n '__fish_seen_subcommand_from updatePubMeds' -f complete -c gemma-cli -n '__fish_seen_subcommand_from updatePubMeds' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from updatePubMeds' -o pmids -r -f --description 'Pubmed ids, comma-delimited; default is to do all in DB' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'ctdDownload' --description 'Creates a .tsv file of lines of evidence from CTD, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'ctdDownload' --description 'Creates a .tsv file of lines of evidence from CTD, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli -n '__fish_seen_subcommand_from ctdDownload' -f complete -c gemma-cli -n '__fish_seen_subcommand_from ctdDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePhenotypes' --description 'Use to remove all evidence from an external database, usually to reimport them after' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'deletePhenotypes' --description 'Use to remove all evidence from an external database, usually to reimport them after' complete -c gemma-cli -n '__fish_seen_subcommand_from deletePhenotypes' -f complete -c gemma-cli -n '__fish_seen_subcommand_from deletePhenotypes' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from deletePhenotypes' -s d -r -f --description 'External database name (e.g. '"'"'GWAS_Catalog'"'"', '"'"'DGA'"'"' etc.)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dgaDownload' --description 'Creates a .tsv file of lines of evidence from DGA, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'dgaDownload' --description 'Creates a .tsv file of lines of evidence from DGA, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli -n '__fish_seen_subcommand_from dgaDownload' -f complete -c gemma-cli -n '__fish_seen_subcommand_from dgaDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'evidenceImport' --description 'Import gene-phenotype information from any of the supported sources (via files created with the appropriate source-specific CLI)' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'evidenceImport' --description 'Import gene-phenotype information from any of the supported sources (via files created with the appropriate source-specific CLI)' complete -c gemma-cli -n '__fish_seen_subcommand_from evidenceImport' -f complete -c gemma-cli -n '__fish_seen_subcommand_from evidenceImport' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from evidenceImport' -s f -r -f --description 'The file' complete -c gemma-cli -n '__fish_seen_subcommand_from evidenceImport' -s c -f --description 'Create in database; default is false (prints to stdout)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'gwasDownload' --description 'Creates a .tsv file of lines of evidence from GWAS publications, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'gwasDownload' --description 'Creates a .tsv file of lines of evidence from GWAS publications, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli -n '__fish_seen_subcommand_from gwasDownload' -f complete -c gemma-cli -n '__fish_seen_subcommand_from gwasDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadEvidenceForClassifier' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadEvidenceForClassifier' complete -c gemma-cli -n '__fish_seen_subcommand_from loadEvidenceForClassifier' -f complete -c gemma-cli -n '__fish_seen_subcommand_from loadEvidenceForClassifier' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'omimDownload' --description 'Creates a .tsv file of lines of evidence from OMIM, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'omimDownload' --description 'Creates a .tsv file of lines of evidence from OMIM, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli -n '__fish_seen_subcommand_from omimDownload' -f complete -c gemma-cli -n '__fish_seen_subcommand_from omimDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rgdDownload' --description 'Creates a .tsv file of lines of evidence from RGD, to be used with evidenceImport to import into Phenocarta.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'rgdDownload' --description 'Creates a .tsv file of lines of evidence from RGD, to be used with evidenceImport to import into Phenocarta.' complete -c gemma-cli -n '__fish_seen_subcommand_from rgdDownload' -f complete -c gemma-cli -n '__fish_seen_subcommand_from rgdDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'sfariDownload' --description 'Creates a .tsv file of lines of evidence from SFARI, to be used with evidenceImport to import into Phenocarta. Requires input files be downloaded manually first.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'sfariDownload' --description 'Creates a .tsv file of lines of evidence from SFARI, to be used with evidenceImport to import into Phenocarta. Requires input files be downloaded manually first.' complete -c gemma-cli -n '__fish_seen_subcommand_from sfariDownload' -f complete -c gemma-cli -n '__fish_seen_subcommand_from sfariDownload' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addExternalDatabase' --description 'Add a new external database.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'addExternalDatabase' --description 'Add a new external database.' complete -c gemma-cli -n '__fish_seen_subcommand_from addExternalDatabase' -f complete -c gemma-cli -n '__fish_seen_subcommand_from addExternalDatabase' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from addExternalDatabase' -s n -l name -r -f complete -c gemma-cli -n '__fish_seen_subcommand_from addExternalDatabase' -s t -l type -r -f -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'geneUpdate' --description 'Load/update gene information from NCBI' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'geneUpdate' --description 'Load/update gene information from NCBI' complete -c gemma-cli -n '__fish_seen_subcommand_from geneUpdate' -f complete -c gemma-cli -n '__fish_seen_subcommand_from geneUpdate' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from geneUpdate' -s f -l file -r --description 'Optional path to the gene_info and gene2accession files' complete -c gemma-cli -n '__fish_seen_subcommand_from geneUpdate' -o taxon -r -f --description 'Specific taxon for which to update genes' complete -c gemma-cli -n '__fish_seen_subcommand_from geneUpdate' -o nodownload -f --description 'Set to suppress NCBI file download' complete -c gemma-cli -n '__fish_seen_subcommand_from geneUpdate' -o restart -r -f --description 'Enter the NCBI ID of the gene you want to start on (implies -nodownload, and assumes you have the right -taxon option, if any)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadGenesFromFile' --description 'loading genes from a non-NCBI files; only used for species like salmon' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadGenesFromFile' --description 'loading genes from a non-NCBI files; only used for species like salmon' complete -c gemma-cli -n '__fish_seen_subcommand_from loadGenesFromFile' -f complete -c gemma-cli -n '__fish_seen_subcommand_from loadGenesFromFile' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from loadGenesFromFile' -s f -r -f --description 'Tab delimited format containing gene symbol, gene name, uniprot id in that order' complete -c gemma-cli -n '__fish_seen_subcommand_from loadGenesFromFile' -s t -r -f --description 'Taxon common name e.g. '"'"'salmonoid'"'"'; does not have to be a species ' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'searchIndex' --description 'Create or update the searchable indexes for a Gemma production system' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'searchIndex' --description 'Create or update the searchable indexes for a Gemma production system' complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -f complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -s g -f --description 'Index genes' @@ -665,7 +670,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -s q -f --des complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -s x -f --description 'Index datasets groups' complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -s y -f --description 'Index gene sets' complete -c gemma-cli -n '__fish_seen_subcommand_from searchIndex' -o threads -r -f --description 'Number of threads to use for batch processing.' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateExternalDatabase' --description 'Update an external database and optionally perform a release.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateExternalDatabase' --description 'Update an external database and optionally perform a release.' complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -f complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -s n -l name -r -f --description 'External database name' @@ -676,28 +681,28 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -o complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -o releaseUrl -l release-url -r -f --description 'Release URL (optional)' complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -o releaseNote -l release-note -r -f --description 'Note to include in the audit event related to the new release' complete -c gemma-cli -n '__fish_seen_subcommand_from updateExternalDatabase' -o lastUpdated -l last-updated -r -f --description 'Moment the release was performed if known, otherwise the current time will be used' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateGOAnnots' --description 'Update GO annotations' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateGOAnnots' --description 'Update GO annotations' complete -c gemma-cli -n '__fish_seen_subcommand_from updateGOAnnots' -f complete -c gemma-cli -n '__fish_seen_subcommand_from updateGOAnnots' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from updateGOAnnots' -s f -l file -r --description 'Optional location of the gene2go.gz file' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateMultifunc' --description 'Update or create gene multifunctionality metrics' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateMultifunc' --description 'Update or create gene multifunctionality metrics' complete -c gemma-cli -n '__fish_seen_subcommand_from updateMultifunc' -f complete -c gemma-cli -n '__fish_seen_subcommand_from updateMultifunc' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from updateMultifunc' -s t -l taxon -r -f --description 'Taxon to process' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fetchMeshTerms' --description 'Gets MESH headings for a set of pubmed ids' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'fetchMeshTerms' --description 'Gets MESH headings for a set of pubmed ids' complete -c gemma-cli -n '__fish_seen_subcommand_from fetchMeshTerms' -f complete -c gemma-cli -n '__fish_seen_subcommand_from fetchMeshTerms' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from fetchMeshTerms' -s f -l file -r complete -c gemma-cli -n '__fish_seen_subcommand_from fetchMeshTerms' -s m -f --description 'Use major subjects only' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listExternalDatabases' --description 'Print an overview of all external databases used by Gemma' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'listExternalDatabases' --description 'Print an overview of all external databases used by Gemma' complete -c gemma-cli -n '__fish_seen_subcommand_from listExternalDatabases' -f complete -c gemma-cli -n '__fish_seen_subcommand_from listExternalDatabases' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from listExternalDatabases' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from listExternalDatabases' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadTaxa' --description 'Populate taxon tables' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'loadTaxa' --description 'Populate taxon tables' complete -c gemma-cli -n '__fish_seen_subcommand_from loadTaxa' -f complete -c gemma-cli -n '__fish_seen_subcommand_from loadTaxa' -s h -l help -f --description 'Print this message' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'migrateFactorValues' --description 'Perform the migration of old-style characteristics to statements' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'migrateFactorValues' --description 'Perform the migration of old-style characteristics to statements' complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -f complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -o migrationFile -r --description 'File containing factor value migrations' @@ -707,7 +712,7 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -o mi complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -o noop -f --description 'Only validate migrations; no statements will be saved' complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from migrateFactorValues' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'orderVectorsByDesign' --description 'Experimental: reorder the vectors by experimental design, to save computation later.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'orderVectorsByDesign' --description 'Experimental: reorder the vectors by experimental design, to save computation later.' complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -f complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -s e -l experiment -r -f --description 'Expression experiment short name. Most tools recognize comma-delimited values given on the command line, and if this option is omitted (and none other provided), the tool will be applied to all expression experiments.' @@ -719,10 +724,13 @@ complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -s x complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -s q -l expressionQuery -r -f --description 'Use a query string for defining which expression experiments to use' complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -o batchFormat -r -f --description 'Format to use to the batch summary' complete -c gemma-cli -n '__fish_seen_subcommand_from orderVectorsByDesign' -o batchOutputFile -r --description 'Output file to use for the batch summary (default is standard output)' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedLoad' --description 'Loads PubMed records into the database from XML files' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedLoad' --description 'Loads PubMed records into the database from XML files' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedLoad' -f complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedLoad' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedLoad' -s d -l dir -r -f --description 'Directory of PubMed XML files to load' -complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2c updateExternalDatabase updateGOAnnots updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedSearchAndSave' --description 'perform pubmed searches from a list of terms, and persist the results in the database' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'pubmedSearchAndSave' --description 'perform pubmed searches from a list of terms, and persist the results in the database' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedSearchAndSave' -s h -l help -f --description 'Print this message' complete -c gemma-cli -n '__fish_seen_subcommand_from pubmedSearchAndSave' -s d -l persist -f --description 'Persist the results. Otherwise just search.' +complete -c gemma-cli -n 'not __fish_seen_subcommand_from adATcleanup addExternalDatabase addGEOData addPlatformSequences addTSVData affyAltsUpdate affyCollapse affyFromCel blackList blatPlatform coexpAnalyze corrMat ctdDownload deleteDiffEx deleteExperiments deletePhenotypes deletePlatformElements detachSequences dgaDownload diffExAnalyze dumpForNIF evidenceImport fetchMeshTerms fillBatchInfo findDatasetPubs findObsoleteTerms geneUpdate generateDataFile genericPlatform getDataMatrix gwasDownload importDesign listExternalDatabases listGEOData loadEvidenceForClassifier loadGenesFromFile loadTaxa makePlatformAnnotFiles makePrivate makeProcessedData makePublic mapPlatformToGenes mergePlatforms migrateFactorValues omimDownload orderVectorsByDesign pca platformMapSummary platformRepeatScan platformSubsumptionTest printExperimentalDesign probeRename pubmedAssociateToExperiments pubmedLoad pubmedSearchAndSave refreshExperiment replaceData rgdDownload rnaseqBatchInfo rnaseqDataAdd runGeeq searchIndex seqCleanup sfariDownload splitExperiment switchExperimentPlatform updateEe2Ad updateEe2c updateExternalDatabase updateGOAnnots updateGene2Cs updateMultifunc updatePubMeds vectorMerge viewExpDesigns' -f -a 'updateGene2Cs' --description 'Update the GENE2CS table' +complete -c gemma-cli -n '__fish_seen_subcommand_from updateGene2Cs' -f +complete -c gemma-cli -n '__fish_seen_subcommand_from updateGene2Cs' -s h -l help -f --description 'Print this message' From 00d772551ce3bea6cf9586e34e365d523856e3aa Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Tue, 6 Aug 2024 17:09:32 -0700 Subject: [PATCH 99/99] Update for next development version --- gemma-cli/pom.xml | 2 +- gemma-core/pom.xml | 2 +- gemma-groovy-support/pom.xml | 2 +- gemma-rest/pom.xml | 2 +- gemma-web/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gemma-cli/pom.xml b/gemma-cli/pom.xml index 69186e606a..c1447ed235 100644 --- a/gemma-cli/pom.xml +++ b/gemma-cli/pom.xml @@ -3,7 +3,7 @@ gemma gemma - 1.31.10-SNAPSHOT + 1.31.10 4.0.0 gemma-cli diff --git a/gemma-core/pom.xml b/gemma-core/pom.xml index 22bf36a417..1313c92842 100644 --- a/gemma-core/pom.xml +++ b/gemma-core/pom.xml @@ -3,7 +3,7 @@ gemma gemma - 1.31.10-SNAPSHOT + 1.31.10 4.0.0 gemma-core diff --git a/gemma-groovy-support/pom.xml b/gemma-groovy-support/pom.xml index 7c79009cc4..ecf4976358 100644 --- a/gemma-groovy-support/pom.xml +++ b/gemma-groovy-support/pom.xml @@ -6,7 +6,7 @@ gemma gemma - 1.31.10-SNAPSHOT + 1.31.10 gemma-groovy-support diff --git a/gemma-rest/pom.xml b/gemma-rest/pom.xml index 4a323be3f7..f379817c46 100644 --- a/gemma-rest/pom.xml +++ b/gemma-rest/pom.xml @@ -5,7 +5,7 @@ gemma gemma - 1.31.10-SNAPSHOT + 1.31.10 4.0.0 diff --git a/gemma-web/pom.xml b/gemma-web/pom.xml index 5afb3db1fe..a2a454494a 100644 --- a/gemma-web/pom.xml +++ b/gemma-web/pom.xml @@ -3,7 +3,7 @@ gemma gemma - 1.31.10-SNAPSHOT + 1.31.10 4.0.0 gemma-web diff --git a/pom.xml b/pom.xml index 468a903740..7a72b975f0 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ Gemma gemma gemma - 1.31.10-SNAPSHOT + 1.31.10 2005 The Gemma Project for meta-analysis of genomics data https://gemma.msl.ubc.ca