Skip to content

Commit

Permalink
Merge branch 'hotfix-1.29.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Dec 6, 2022
2 parents 47bbafe + 5186dad commit 1b7fc73
Show file tree
Hide file tree
Showing 102 changed files with 264 additions and 1,195 deletions.
2 changes: 1 addition & 1 deletion gemma-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>gemma</artifactId>
<groupId>gemma</groupId>
<version>1.29.0</version>
<version>1.29.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gemma-cli</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ protected void doWork() throws Exception {
}



}

@Override
Expand All @@ -114,8 +113,7 @@ public String getShortDesc() {

private void audit( ArrayDesign arrayDesign, String message ) {
super.getArrayDesignReportService().generateArrayDesignReport( arrayDesign.getId() );
AuditEventType eventType = ArrayDesignSequenceRemoveEvent.Factory.newInstance();
auditTrailService.addUpdateEvent( arrayDesign, eventType, message );
auditTrailService.addUpdateEvent( arrayDesign, ArrayDesignSequenceRemoveEvent.class, message );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ protected void buildOptions( Options options ) {
super.buildOptions( options );

Option blatResultOption = Option.builder( "b" ).hasArg().argName( "PSL file" ).desc(
"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" )
"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" )
.longOpt( "blatfile" )
.build();

Expand All @@ -80,13 +80,13 @@ protected void buildOptions( Options options ) {
options.addOption( Option.builder( "sensitive" ).desc( "Run on more sensitive server, if available" ).build() );

Option taxonOption = Option.builder( "t" ).hasArg().argName( "taxon" ).desc(
"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)" )
"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)" )
.build();

options.addOption( taxonOption );
// this.addThreadsOption( options );
// this.addThreadsOption( options );
options.addOption( blatScoreThresholdOption );
options.addOption( blatResultOption );
}
Expand Down Expand Up @@ -143,7 +143,7 @@ protected void doWork() throws Exception {

for ( ArrayDesign arrayDesign : this.getArrayDesignsToProcess() ) {
if ( !this.shouldRun( skipIfLastRunLaterThan, arrayDesign, ArrayDesignSequenceAnalysisEvent.class ) ) {
AbstractCLI.log.warn( arrayDesign + " does not meet criteria to be processed");
AbstractCLI.log.warn( arrayDesign + " does not meet criteria to be processed" );
return;
}

Expand Down Expand Up @@ -204,8 +204,7 @@ public String getShortDesc() {

private void audit( ArrayDesign arrayDesign, String note ) {
getArrayDesignReportService().generateArrayDesignReport( arrayDesign.getId() );
AuditEventType eventType = ArrayDesignSequenceAnalysisEvent.Factory.newInstance();
auditTrailService.addUpdateEvent( arrayDesign, eventType, note );
auditTrailService.addUpdateEvent( arrayDesign, ArrayDesignSequenceAnalysisEvent.class, note );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,52 +83,52 @@ protected void buildOptions( Options options ) {
super.buildOptions( options );

options.addOption( Option.builder( "i" ).hasArg().argName( "value" ).desc(
"Sequence identity threshold, default = " + ProbeMapperConfig.DEFAULT_IDENTITY_THRESHOLD )
"Sequence identity threshold, default = " + ProbeMapperConfig.DEFAULT_IDENTITY_THRESHOLD )
.longOpt( "identityThreshold" ).build() );

options.addOption( Option.builder( "s" ).hasArg().argName( "value" )
.desc( "Blat score threshold, default = " + ProbeMapperConfig.DEFAULT_SCORE_THRESHOLD )
.longOpt( "scoreThreshold" ).build() );

options.addOption( Option.builder( "o" ).hasArg().argName( "value" ).desc(
"Minimum fraction of probe overlap with exons, default = "
+ ProbeMapperConfig.DEFAULT_MINIMUM_EXON_OVERLAP_FRACTION )
"Minimum fraction of probe overlap with exons, default = "
+ ProbeMapperConfig.DEFAULT_MINIMUM_EXON_OVERLAP_FRACTION )
.longOpt( "overlapThreshold" )
.build() );

options.addOption( Option.builder( "usePred" ).desc(
"Allow mapping to predicted genes (overrides Acembly, Ensembl and Nscan; default="
+ ProbeMapperConfig.DEFAULT_ALLOW_PREDICTED + ")" )
"Allow mapping to predicted genes (overrides Acembly, Ensembl and Nscan; default="
+ ProbeMapperConfig.DEFAULT_ALLOW_PREDICTED + ")" )
.build() );

options.addOption( Option.builder( ArrayDesignProbeMapperCli.CONFIG_OPTION ).hasArg().argName( "configstring" ).desc(
"String describing which tracks to search, for example 'rkenmias' for all, 'rm' to limit search to Refseq with mRNA evidence. If this option is not set,"
+ " all will be used except as listed below and in combination with the 'usePred' option:\n "
"String describing which tracks to search, for example 'rkenmias' for all, 'rm' to limit search to Refseq with mRNA evidence. If this option is not set,"
+ " all will be used except as listed below and in combination with the 'usePred' option:\n "

+ ArrayDesignProbeMapperCli.OPTION_REFSEQ
+ " - search refseq track for genes (best to leave on)\n"
+ ArrayDesignProbeMapperCli.OPTION_REFSEQ
+ " - search refseq track for genes (best to leave on)\n"

+ ArrayDesignProbeMapperCli.OPTION_KNOWNGENE
+ " - search knownGene track for genes (best to leave on, but track may be missing for some organisms)\n"
+ ArrayDesignProbeMapperCli.OPTION_KNOWNGENE
+ " - search knownGene track for genes (best to leave on, but track may be missing for some organisms)\n"

+ ArrayDesignProbeMapperCli.OPTION_MICRORNA + " - search miRNA track for genes (Default = false)\n"
+ ArrayDesignProbeMapperCli.OPTION_MICRORNA + " - search miRNA track for genes (Default = false)\n"

+ ArrayDesignProbeMapperCli.OPTION_EST + " - search EST track for transcripts (Default=false)\n"
+ ArrayDesignProbeMapperCli.OPTION_EST + " - search EST track for transcripts (Default=false)\n"

+ ArrayDesignProbeMapperCli.OPTION_MRNA
+ " - search mRNA track for transcripts (Default=false)\n"
+ ArrayDesignProbeMapperCli.OPTION_MRNA
+ " - search mRNA track for transcripts (Default=false)\n"

+ ArrayDesignProbeMapperCli.OPTION_ENSEMBL + " - search Ensembl track for predicted genes (Default=false) \n" )
+ ArrayDesignProbeMapperCli.OPTION_ENSEMBL + " - search Ensembl track for predicted genes (Default=false) \n" )
.build() );

options.addOption( Option.builder( ArrayDesignProbeMapperCli.MIRNA_ONLY_MODE_OPTION ).desc(
"Only seek miRNAs; this is the same as '-config " + ArrayDesignProbeMapperCli.OPTION_MICRORNA
+ "; overrides -config." )
"Only seek miRNAs; this is the same as '-config " + ArrayDesignProbeMapperCli.OPTION_MICRORNA
+ "; overrides -config." )
.build() );

Option taxonOption = Option.builder( "t" ).hasArg().argName( "taxon" ).desc(
"Taxon common name (e.g., human); if using '-import', this taxon will be assumed; otherwise analysis will be run for all"
+ " ArrayDesigns from that taxon (overrides -a)" )
"Taxon common name (e.g., human); if using '-import', this taxon will be assumed; otherwise analysis will be run for all"
+ " ArrayDesigns from that taxon (overrides -a)" )
.build();

options.addOption( taxonOption );
Expand All @@ -138,10 +138,10 @@ protected void buildOptions( Options options ) {
options.addOption( force );

Option directAnnotation = Option.builder( "import" ).desc(
"Import annotations from a file rather than our own analysis. You must provide the taxon option. "
+ "File format: 2 columns with column 1= probe name in Gemma, "
+ "column 2=sequence name (not required, and not used for direct gene-based annotation)"
+ " column 3 = gene symbol (will be matched to that in Gemma)" )
"Import annotations from a file rather than our own analysis. You must provide the taxon option. "
+ "File format: 2 columns with column 1= probe name in Gemma, "
+ "column 2=sequence name (not required, and not used for direct gene-based annotation)"
+ " column 3 = gene symbol (will be matched to that in Gemma)" )
.hasArg().argName( "file" )
.build();

Expand Down Expand Up @@ -356,7 +356,7 @@ boolean needToRun( Date skipIfLastRunLaterThan, ArrayDesign arrayDesign,
// return false;
AbstractCLI.log
.warn( arrayDesign + ": Sequences were updated more recently than the last repeat masking but requirement temporarily waived" );
// return false;
// return false;
}

if ( lastSequenceAnalysis != null && lastSequenceUpdate.getDate()
Expand All @@ -381,8 +381,8 @@ boolean needToRun( Date skipIfLastRunLaterThan, ArrayDesign arrayDesign,
if ( isNotMerged && lastRepeatMask == null ) {
AbstractCLI.log
.warn( arrayDesign + "Repeat masking missing but requirement temporarily waived" );
// AbstractCLI.log.warn( arrayDesign + ": Must do repeat mask analysis before probe mapping" );
// return false;
// AbstractCLI.log.warn( arrayDesign + ": Must do repeat mask analysis before probe mapping" );
// return false;
}

if ( skipIfLastRunLaterThan != null && lastProbeMapping != null && lastProbeMapping.getDate()
Expand Down Expand Up @@ -440,7 +440,7 @@ protected void doWork() throws Exception {
}
arrayDesignProbeMapperService
.processArrayDesign( arrayDesign, taxon, f, this.sourceDatabase, this.ncbiIds );
this.audit( arrayDesign, "Imported from " + f, new AnnotationBasedGeneMappingEvent() );
this.audit( arrayDesign, "Imported from " + f, AnnotationBasedGeneMappingEvent.class );
} catch ( IOException e ) {
addErrorObject( arrayDesign, e.getMessage(), e );
}
Expand All @@ -460,13 +460,13 @@ protected void doWork() throws Exception {
if ( useDB ) {

if ( this.mirnaOnlyModeOption ) {
this.audit( arrayDesign, "Run in miRNA-only mode.", new AlignmentBasedGeneMappingEvent() );
this.audit( arrayDesign, "Run in miRNA-only mode.", AlignmentBasedGeneMappingEvent.class );
} else if ( configOption != null ) {
this.audit( arrayDesign, "Run with configuration=" + this.configOption,
new AlignmentBasedGeneMappingEvent() );
AlignmentBasedGeneMappingEvent.class );
} else {
this.audit( arrayDesign, "Run with default parameters",
new AlignmentBasedGeneMappingEvent() );
AlignmentBasedGeneMappingEvent.class );
}
updateMergedOrSubsumed( arrayDesign );
}
Expand Down Expand Up @@ -497,7 +497,7 @@ public String getShortDesc() {
return "Process the BLAT results for an array design to map them onto genes";
}

private void audit( ArrayDesign arrayDesign, String note, ArrayDesignGeneMappingEvent eventType ) {
private void audit( ArrayDesign arrayDesign, String note, Class<? extends ArrayDesignGeneMappingEvent> eventType ) {
getArrayDesignReportService().generateArrayDesignReport( arrayDesign.getId() );
auditTrailService.addUpdateEvent( arrayDesign, eventType, note );
}
Expand Down Expand Up @@ -527,7 +527,7 @@ private void configure( ArrayDesign arrayDesign ) {
* Hackery to work around rn6+ problems
*/
boolean isRat;
if ( this.taxon == null) {
if ( this.taxon == null ) {
assert arrayDesign != null;
Taxon t = getArrayDesignService().getTaxon( arrayDesign.getId() );
isRat = t.getCommonName().equals( "rat" );
Expand Down Expand Up @@ -614,8 +614,7 @@ private void processArrayDesign( Date skipIfLastRunLaterThan, ArrayDesign design
}
arrayDesignProbeMapperService.processArrayDesign( design, this.config, this.useDB );
addSuccessObject( design, "Successfully processed " + design );
ArrayDesignGeneMappingEvent eventType = new AlignmentBasedGeneMappingEvent();
this.audit( design, "Part of a batch job", eventType );
this.audit( design, "Part of a batch job", AlignmentBasedGeneMappingEvent.class );

updateMergedOrSubsumed( design );

Expand All @@ -638,7 +637,7 @@ private void updateMergedOrSubsumed( ArrayDesign design ) {
Collection<ArrayDesign> toUpdate = getRelatedDesigns( design );
for ( ArrayDesign ad : toUpdate ) {
log.info( "Marking subsumed or merged design as completed, updating report: " + ad );
this.audit( ad, "Parent design was processed (merged or subsumed by this)", AlignmentBasedGeneMappingEvent.Factory.newInstance() );
this.audit( ad, "Parent design was processed (merged or subsumed by this)", AlignmentBasedGeneMappingEvent.class );
arrayDesignProbeMapperService.deleteOldFiles( ad );
getArrayDesignReportService().generateArrayDesignReport( ad.getId() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ private void rename( ArrayDesign arrayDesign, InputStream newIdFile ) {

private void audit( ArrayDesign arrayDesign, String note ) {
super.getArrayDesignReportService().generateArrayDesignReport( arrayDesign.getId() );
AuditEventType eventType = ArrayDesignProbeRenamingEvent.Factory.newInstance();
auditTrailService.addUpdateEvent( arrayDesign, eventType, note );
auditTrailService.addUpdateEvent( arrayDesign, ArrayDesignProbeRenamingEvent.class, note );
}

private Map<String, String> parseIdFile( InputStream newIdFile ) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ public String getShortDesc() {
}

private void audit( ArrayDesign arrayDesign, String note ) {
AuditEventType eventType = ArrayDesignRepeatAnalysisEvent.Factory.newInstance();
auditTrailService.addUpdateEvent( arrayDesign, eventType, note );
auditTrailService.addUpdateEvent( arrayDesign, ArrayDesignRepeatAnalysisEvent.class, note );
}

private void processArrayDesign( ArrayDesign design ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ protected void processOptions( CommandLine commandLine ) {
private void audit( ArrayDesign arrayDesign, String note ) {
// minor : don't add audit event if no sequences were changed, or --force.
this.getArrayDesignReportService().generateArrayDesignReport( arrayDesign.getId() );
AuditEventType eventType = ArrayDesignSequenceUpdateEvent.Factory.newInstance();
auditTrailService.addUpdateEvent( arrayDesign, eventType, note );
auditTrailService.addUpdateEvent( arrayDesign, ArrayDesignSequenceUpdateEvent.class, note );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ protected void processOptions( CommandLine commandLine ) {
}

private void audit( ArrayDesign arrayDesign, String note ) {
AuditEventType eventType = ArrayDesignSubsumeCheckEvent.Factory.newInstance();
auditTrailService.addUpdateEvent( arrayDesign, eventType, note );
auditTrailService.addUpdateEvent( arrayDesign, ArrayDesignSubsumeCheckEvent.class, note );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected void buildOptions( Options options ) {
}

private void audit( ExpressionExperiment ee ) {
auditTrailService.addUpdateEvent( ee, null, "Generated sample correlation matrix" );
auditTrailService.addUpdateEvent( ee, "Generated sample correlation matrix" );
addSuccessObject( ee, "Successfully processed " + ee.getShortName() );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,11 @@ private void processExperiment( ExpressionExperiment ee ) {
ee = this.eeService.thawLite( ee );

AuditTrailService ats = this.getBean( AuditTrailService.class );
AuditEventType type = CommentedEvent.Factory.newInstance();

expressionDataFileService.writeOrLocateCoexpressionDataFile( ee, force_write );
expressionDataFileService.writeOrLocateDiffExpressionDataFiles( ee, force_write );

ats.addUpdateEvent( ee, type, "Generated Flat data files for downloading" );
ats.addUpdateEvent( ee, CommentedEvent.class, "Generated Flat data files for downloading" );
addSuccessObject( ee, "Success: generated data file for " + ee.getShortName() + " ID=" + ee.getId() );

} catch ( Exception e ) {
Expand Down
Loading

0 comments on commit 1b7fc73

Please sign in to comment.