Skip to content

Commit

Permalink
Merge branch 'refs/heads/devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
sunset666 committed Jul 29, 2024
2 parents f95f58a + 2cc3ce4 commit fcaab2f
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@
[submodule "src/ingest-pipeline/airflow/dags/cwl/multiome-rna-atac-pipeline"]
path = src/ingest-pipeline/airflow/dags/cwl/multiome-rna-atac-pipeline
url = https://github.com/hubmapconsortium/multiome-rna-atac-pipeline
[submodule "src/ingest-pipeline/airflow/dags/cwl/deepcelltypes"]
path = src/ingest-pipeline/airflow/dags/cwl/deepcelltypes
url = https://github.com/hubmapconsortium/deepcelltypes
51 changes: 50 additions & 1 deletion src/ingest-pipeline/airflow/dags/codex_cytokit.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
illumination_first_stitching=steps_dir / 'illumination_first_stitching.cwl',
cytokit=steps_dir / 'run_cytokit.cwl',
ometiff_second_stitching=steps_dir / 'ometiff_second_stitching.cwl',
deepcelltypes=Path('deepcelltypes', 'run_deepcelltypes.cwl'),
sprm=Path('sprm', 'pipeline.cwl'),
create_vis_symlink_archive=Path('create-vis-symlink-archive', 'pipeline.cwl'),
ome_tiff_pyramid=Path('ome-tiff-pyramid', 'pipeline.cwl'),
Expand Down Expand Up @@ -215,7 +216,7 @@ def build_cwltool_cwl_ometiff_second_stitching(**kwargs):
python_callable=utils.pythonop_maybe_keep,
provide_context=True,
op_kwargs={
'next_op': 'prepare_cwl_sprm',
'next_op': 'prepare_cwl_deepcelltypes',
'bail_op': 'set_dataset_error',
'test_op': 'pipeline_exec_cwl_ometiff_second_stitching',
}
Expand All @@ -230,6 +231,52 @@ def build_cwltool_cwl_ometiff_second_stitching(**kwargs):
"""
)

prepare_cwl_deepcelltypes = DummyOperator(task_id='prepare_cwl_deepcelltypes')

def build_cwltool_cmd_deepcelltypes(**kwargs):
run_id = kwargs['run_id']
tmpdir = get_tmp_dir_path(run_id)
print('tmpdir: ', tmpdir)
parent_data_dir = get_parent_data_dir(**kwargs)
print('parent_data_dir: ', parent_data_dir)
data_dir = tmpdir / 'cwl_out'
print('data_dir: ', data_dir)

command = [
*get_cwltool_base_cmd(tmpdir),
cwl_workflows['deepcelltypes'],
'--data_dir',
data_dir / 'pipeline_output',
]

return join_quote_command_str(command)


t_build_cmd_deepcelltypes = PythonOperator(
task_id='build_cmd_deepcelltypes',
python_callable=build_cwltool_cmd_deepcelltypes,
provide_context=True,
)

t_pipeline_exec_cwl_deepcelltypes = BashOperator(
task_id='pipeline_exec_cwl_deepcelltypes',
bash_command=""" \
tmp_dir={{tmp_dir_path(run_id)}} ; \
cd ${tmp_dir}/cwl_out ; \
{{ti.xcom_pull(task_ids='build_cmd_deepcelltypes')}} >> ${tmp_dir}/session.log 2>&1 ; \
echo $?
"""
)

t_maybe_keep_cwl_deepcelltypes = BranchPythonOperator(
task_id='maybe_keep_cwl_deepcelltypes',
python_callable=utils.pythonop_maybe_keep,
provide_context=True,
op_kwargs={'next_op': 'prepare_cwl_sprm',
'bail_op': 'set_dataset_error',
'test_op': 'pipeline_exec_cwl_deepcelltypes'}
)

prepare_cwl_sprm = DummyOperator(task_id='prepare_cwl_sprm')

def build_cwltool_cmd_sprm(**kwargs):
Expand All @@ -249,6 +296,8 @@ def build_cwltool_cmd_sprm(**kwargs):
data_dir / 'pipeline_output/expr',
'--mask_dir',
data_dir / 'pipeline_output/mask',
'--cell_types_file',
data_dir / 'deepcelltypes_predictions.csv',
]

return join_quote_command_str(command)
Expand Down
1 change: 1 addition & 0 deletions src/ingest-pipeline/airflow/dags/cwl/deepcelltypes
Submodule deepcelltypes added at ca97c2
2 changes: 1 addition & 1 deletion src/ingest-pipeline/airflow/dags/cwl/sc-atac-seq-pipeline
Submodule sc-atac-seq-pipeline updated 37 files
+124 −9 bin/add_barcodes_to_reads.py
+118 −0 bin/add_clusters_to_h5ad.py
+23 −4 bin/adjust_barcodes.py
+4 −20 bin/convert_to_h5ad.py
+4 −2 bin/index_merged_bam.py
+40 −175 bin/run_ArchR_analysis_pt1.R
+187 −0 bin/run_ArchR_analysis_pt2.R
+7 −1 bin/sciseq_add_barcodes_to_read_ids.py
+1 −1 bulk_gather_sequence_bundles.cwl
+736,320 −0 data/atac_barcodes.txt
+736,320 −0 data/atac_barcodes_rev.txt
+736,320 −0 data/cellranger_barcodes.txt
+1 −0 docker/barcode-adj/Dockerfile
+2 −2 docker/pipeline-code/Dockerfile
+2 −2 install_R_packages.R
+1 −1 requirements.txt
+43 −55 sc_atac_seq_prep_process_analyze.cwl
+0 −1 sc_atac_seq_prep_process_analyze.json
+10 −1 steps/adjust-barcodes.cwl
+1 −1 steps/align_reads.cwl
+1 −1 steps/call_peaks.cwl
+1 −1 steps/concat-fastq.cwl
+2 −2 steps/convert_to_h5ad.cwl
+1 −1 steps/fastqc.cwl
+1 −1 steps/index_merged_bam.cwl
+1 −1 steps/merge_bam.cwl
+1 −1 steps/motif_and_tf_analysis.cwl
+1 −1 steps/qc_measures.cwl
+59 −0 steps/sc_atac_seq_analyze_steps/archr_clustering.cwl
+84 −0 steps/sc_atac_seq_analyze_steps/archr_fundamental.cwl
+33 −48 steps/sc_atac_seq_analyze_steps/archr_init_analyze.cwl
+19 −26 steps/sc_atac_seq_initial_analysis.cwl
+131 −0 steps/sc_atac_seq_prep_process_init.cwl
+1 −1 steps/sc_atac_seq_process_steps/create_fragment_file.cwl
+1 −1 steps/sc_atac_seq_process_steps/remove_blacklist.cwl
+1 −1 steps/sc_atac_seq_process_steps/sort_bam_file_tool.cwl
+1 −1 steps/write_genome_build.cwl
2 changes: 1 addition & 1 deletion src/ingest-pipeline/airflow/dags/launch_multi_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check_one_uuid(
- data type(s) of the dataset
- local directory full path of the dataset
"""
print(f"Starting uuid {uuid}")
print(f"Starting uuid {uuid} with avoid previous version {avoid_previous_version}")
my_callable = lambda **kwargs: uuid
ds_rslt = utils.pythonop_get_dataset_state(dataset_uuid_callable=my_callable, **kwargs)
if not ds_rslt:
Expand Down
2 changes: 0 additions & 2 deletions src/ingest-pipeline/misc/tools/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import pandas as pd
import requests

from hubmap_commons.type_client import TypeClient
from hubmap_commons.hm_auth import AuthHelper

# No trailing slashes in the following URLs!
Expand Down Expand Up @@ -612,7 +611,6 @@ def __init__(self, auth_tok=None, instance=None):
assert (instance is None
or instance in ['PROD', 'STAGE', 'TEST', 'DEV']), 'invalid instance'
self.instance = instance or 'PROD'
# self.type_client = TypeClient(ENDPOINTS[self.instance]['assay_info_url'])

def fetch_new_dataset_table(self):
"""
Expand Down

0 comments on commit fcaab2f

Please sign in to comment.