Skip to content

Commit

Permalink
Merge pull request #2119 from broadinstitute/jb-anndata-parse-email-b…
Browse files Browse the repository at this point in the history
…ugfix

Ignore differential expression jobs when computing ingestSummary event (SCP-5778)
  • Loading branch information
bistline authored Sep 3, 2024
2 parents 20fdea2 + 71015e4 commit a0ceb25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/models/delete_queue_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def perform
delete_user_annotations(study:, study_file: object)
delete_parsed_data(object.id, study.id, ClusterGroup, CellMetadatum, Gene, DataArray)
delete_fragment_files(study:, study_file: object)
delete_differential_expression_results(study:, study_file: object)
# reset default options/counts
study.reload
study.cell_count = study.all_cells_array.size
Expand Down Expand Up @@ -225,7 +226,7 @@ def delete_differential_expression_results(study:, study_file:)
when 'Cluster'
cluster = ClusterGroup.find_by(study:, study_file: study_file)
results = DifferentialExpressionResult.where(study:, cluster_group: cluster)
when 'Expression Matrix', 'MM Coordinate Matrix'
when 'Expression Matrix', 'MM Coordinate Matrix', 'AnnData'
results = DifferentialExpressionResult.where(study:, matrix_file_id: study_file.id)
when 'Differential Expression'
results = DifferentialExpressionResult.where(study_file: object)
Expand Down
2 changes: 1 addition & 1 deletion app/models/ingest_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ def report_anndata_summary
# discard the job that corresponds with this ingest process
still_processing = remaining_jobs.reject do |job|
ingest_job = DelayedJobAccessor.dump_job_handler(job).object
ingest_job.params_object.associated_file == fragment
ingest_job.params_object.is_a?(AnnDataIngestParameters) && ingest_job.params_object.associated_file == fragment
end.any?

# only continue if there are no more jobs and a summary has not been sent yet
Expand Down

0 comments on commit a0ceb25

Please sign in to comment.