From 5ef589b9926e8c87fbcc3281ea95934dff8c6f21 Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Thu, 30 Nov 2023 11:29:51 +0000 Subject: [PATCH] fix for template --- .../dag34_cellranger_multi_scRNA_utils.py | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/igf_airflow/utils/dag34_cellranger_multi_scRNA_utils.py b/igf_airflow/utils/dag34_cellranger_multi_scRNA_utils.py index e4df26dd..52a57b3a 100644 --- a/igf_airflow/utils/dag34_cellranger_multi_scRNA_utils.py +++ b/igf_airflow/utils/dag34_cellranger_multi_scRNA_utils.py @@ -453,18 +453,33 @@ def prepare_and_run_scanpy_notebook( os.path.join( cellranger_output_dir, f'scanpy_{cellranger_group_id}.h5ad') + s_genes = scanpy_config.get('S_GENES') + if s_genes == '': + s_genes = None + g2m_genes = scanpy_config.get('G2M_GENES') + if g2m_genes == '': + g2m_genes = None input_params = { 'DATE_TAG': get_date_stamp(), 'PROJECT_IGF_ID': project_igf_id, 'ANALYSIS_NAME': analysis_name, 'SAMPLE_IGF_ID': cellranger_group_id, 'CELLRANGER_COUNT_DIR': cellranger_output_dir, - 'SCANPY_H5AD': scanpy_h5ad} + 'SCANPY_H5AD': scanpy_h5ad, + 'CELL_MARKER_LIST': scanpy_config.get('CELL_MARKER_LIST') or None, + 'CELL_MARKER_SPECIES': scanpy_config.get('CELL_MARKER_SPECIES') or None, + 'RUN_SCRUBLET': scanpy_config.get('RUN_SCRUBLET') or False, + 'CELL_MARKER_MODE': scanpy_config.get('CELL_MARKER_MODE') or 'NON-VDJ', + 'MITO_PREFIX': scanpy_config.get('MITO_PREFIX') or 'MT-', + 'RUN_CELLCYCLE_SCORE': scanpy_config.get('RUN_CELLCYCLE_SCORE') or False, + 'S_GENES':s_genes, + 'G2M_GENES': g2m_genes + } ## update input params - input_params.update(scanpy_config) - input_params = { - k.upper():v - for k,v in input_params.items()} + #input_params.update(scanpy_config) + # input_params = { + # k.upper():v + # for k,v in input_params.items()} ## check paths singularity_image = \ input_params.get("IMAGE_FILE")