Skip to content

Commit 5afcaeb

Browse files
committed
Removing all references for image pipeline jobs (SCP-6122)
1 parent 5e25663 commit 5afcaeb

16 files changed

+4
-4540
lines changed

app/lib/image_pipeline_service.rb

Lines changed: 0 additions & 186 deletions
This file was deleted.

app/models/batch_api_client.rb

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ class BatchApiClient
1919
ingest_subsample: %w[Cluster AnnData],
2020
differential_expression: %w[Cluster AnnData],
2121
ingest_differential_expression: ['Differential Expression'],
22-
render_expression_arrays: %w[Cluster],
23-
image_pipeline: %w[Cluster],
2422
ingest_anndata: %w[AnnData],
2523
ingest_dot_plot_genes: ['Expression Matrix', 'MM Coordinate Matrix', 'AnnData'],
2624
scvi_label_transfer: %w[AnnData]
@@ -470,8 +468,6 @@ def create_instance_policy(machine_type: DEFAULT_MACHINE_TYPE, boot_disk_size_gb
470468
# - +GOOGLE_PROJECT_ID+: Name of the GCP project this pipeline is running in
471469
# - +SENTRY_DSN+: Sentry Data Source Name (DSN); URL to send Sentry logs to
472470
# - +BARD_HOST_URL+: URL for Bard host that proxies Mixpanel
473-
# - +NODE_TLS_REJECT_UNAUTHORIZED+: Configure node behavior for self-signed certificates (for :image_pipeline)
474-
# - +STAGING_INTERNAL_IP+: Bypasses firewall for staging runs (for :image_pipeline)
475471
#
476472
# * *params*
477473
# - +action+ (Symbol) => ingest action being performed
@@ -494,18 +490,7 @@ def set_environment_variables(action: nil)
494490
vars.delete('DATABASE_HOST')
495491
vars.delete('DATABASE_NAME')
496492
end
497-
if action == :image_pipeline
498-
vars.merge({
499-
# For staging runs
500-
'NODE_TLS_REJECT_UNAUTHORIZED' => '0',
501-
502-
# For staging runs. More context is in "Networking" section at:
503-
# https://github.com/broadinstitute/single_cell_portal_core/pull/1632
504-
'STAGING_INTERNAL_IP' => ENV['APP_INTERNAL_IP']
505-
})
506-
else
507-
vars
508-
end
493+
vars
509494
end
510495

511496
# Determine command line to pass to ingest based off of file & action requested
@@ -574,9 +559,6 @@ def format_command_line(study_file:, action:, user_metrics_uuid:, params_object:
574559
'--differential-expression-file', study_file.gs_url, '--study-accession', study.accession,
575560
'--method', de_info.computational_method, action_cli_opt
576561
]
577-
when 'image_pipeline'
578-
# image_pipeline is node-based, so python command line to this point no longer applies
579-
command_line = %w[node expression-scatter-plots.js]
580562
when 'scvi_label_transfer'
581563
command_line = %w[python multiome_label_transfer.py]
582564
end
@@ -686,8 +668,6 @@ def label_for_action(action)
686668
'ingest_pipeline'
687669
when /differential/
688670
'differential_expression'
689-
when 'render_expression_arrays'
690-
'data_cache_pipeline'
691671
else
692672
action
693673
end

app/models/image_pipeline_parameters.rb

Lines changed: 0 additions & 51 deletions
This file was deleted.

app/models/ingest_job.rb

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class IngestJob
1515
# valid ingest actions to perform
1616
VALID_ACTIONS = %i[
1717
ingest_expression ingest_cluster ingest_cell_metadata ingest_anndata ingest_differential_expression ingest_subsample
18-
ingest_dot_plot_genes differential_expression render_expression_arrays
18+
ingest_dot_plot_genes differential_expression
1919
].freeze
2020

2121
# Mappings between actions & models (for cleaning up data on re-parses)
@@ -31,14 +31,14 @@ class IngestJob
3131
# non-standard job actions where data is not being read from a file to insert into MongoDB
3232
# these jobs usually process files and write objects back to the bucket, and as such have special pre/post-processing
3333
# steps that need to be accounted for
34-
SPECIAL_ACTIONS = %i[differential_expression render_expression_arrays image_pipeline].freeze
34+
SPECIAL_ACTIONS = %i[differential_expression].freeze
3535

3636
# main processes that extract or ingest data for core visualizations (scatter, violin, dot, etc)
3737
CORE_ACTIONS = %w[ingest_anndata ingest_expression ingest_cell_metadata ingest_cluster]
3838

3939
# jobs that need parameters objects in order to launch correctly
4040
PARAMS_OBJ_REQUIRED = %i[
41-
differential_expression render_expression_arrays image_pipeline ingest_anndata ingest_dot_plot_genes
41+
differential_expression ingest_anndata ingest_dot_plot_genes
4242
].freeze
4343

4444
# Name of pipeline submission running in GCP (from [BatchApiClient#run_job])
@@ -525,10 +525,6 @@ def set_study_state_after_ingest
525525
create_differential_expression_results
526526
when :ingest_differential_expression
527527
create_author_differential_expression_results
528-
when :render_expression_arrays
529-
launch_image_pipeline_job
530-
when :image_pipeline
531-
set_has_image_cache
532528
when :ingest_anndata
533529
set_anndata_file_info
534530
launch_anndata_subparse_jobs if study_file.is_viz_anndata?
@@ -817,19 +813,6 @@ def read_differential_expression_manifest(info_obj, cluster)
817813
raw_manifest.read.split("\n").map { |line| line.split("\t") }
818814
end
819815

820-
# launch an image pipeline job once :render_expression_arrays completes
821-
def launch_image_pipeline_job
822-
Rails.logger.info "Launching image_pipeline job in #{study.accession} for cluster file: #{study_file.name}"
823-
ImagePipelineService.run_image_pipeline_job(study, study_file, user:, data_cache_perftime: get_total_runtime_ms)
824-
end
825-
826-
# set flags to denote when a cluster has image data
827-
def set_has_image_cache
828-
Rails.logger.info "Setting image_pipeline flags in #{study.accession} for cluster: #{study_file.name}"
829-
cluster_group = ClusterGroup.find_by(study_id: study.id, study_file_id: study_file.id)
830-
cluster_group.update(has_image_cache: true) if cluster_group.present?
831-
end
832-
833816
# preprocess all dot plot gene entries for a qualifying study
834817
# will check feature flag first to allow for selective automation & runtime configuration
835818
def launch_dot_plot_preprocess_job
@@ -1066,14 +1049,6 @@ def get_job_analytics
10661049
if params_object.de_type == 'pairwise'
10671050
job_props.merge!( { pairwiseGroups: [params_object.group1, params_object.group2]})
10681051
end
1069-
when :image_pipeline
1070-
data_cache_perftime = params_object.data_cache_perftime
1071-
job_props.merge!(
1072-
{
1073-
'perfTime:dataCache' => data_cache_perftime,
1074-
'perfTime:full' => data_cache_perftime + job_perftime
1075-
}
1076-
)
10771052
when :ingest_anndata
10781053
job_props.merge!(
10791054
{
@@ -1291,16 +1266,6 @@ def generate_success_email_array
12911266
if params_object.de_type == 'pairwise'
12921267
message << "Pairwise selections: #{params_object.group1} vs. #{params_object.group2}"
12931268
end
1294-
when :render_expression_arrays
1295-
matrix_name = params_object.matrix_file_path.split('/').last
1296-
matrix = study.expression_matrices.find_by(name: matrix_name)
1297-
genes = Gene.where(study_id: study.id, study_file_id: matrix.id).count
1298-
message << "Image Pipeline data pre-rendering completed for \"#{params_object.cluster_name}\""
1299-
message << "Gene-level files created: #{genes}"
1300-
when :image_pipeline
1301-
complete_pipeline_runtime = TimeDifference.between(*get_image_pipeline_timestamps).humanize
1302-
message << "Image Pipeline image rendering completed for \"#{params_object.cluster}\""
1303-
message << "Complete runtime (data cache & image rendering): #{complete_pipeline_runtime}"
13041269
when :ingest_dot_plot_genes
13051270
cluster_group = params_object.cluster_group
13061271
genes = DotPlotGene.where(study:, study_file:, cluster_group:).count

0 commit comments

Comments
 (0)