|
@@ -19,6 +19,7 @@ from igf_airflow.utils.dag9_tenx_single_cell_immune_profiling_utils import load_
|
|
|
from igf_airflow.utils.dag9_tenx_single_cell_immune_profiling_utils import task_branch_function
|
|
|
from igf_airflow.utils.dag9_tenx_single_cell_immune_profiling_utils import upload_analysis_file_to_box
|
|
|
from igf_airflow.utils.dag9_tenx_single_cell_immune_profiling_utils import convert_bam_to_cram_func
|
|
|
+from igf_airflow.utils.dag9_tenx_single_cell_immune_profiling_utils import run_picard_for_cellranger
|
|
|
|
|
|
## ARGS
|
|
|
default_args = {
|
|
@@ -551,9 +552,19 @@ with dag:
|
|
|
task_id='run_picard_alignment_summary',
|
|
|
dag=dag,
|
|
|
queue='hpc_4G',
|
|
|
- python_callable=None,
|
|
|
- params={'cellranger_xcom_key':'cellranger_output',
|
|
|
- 'cellranger_xcom_pull_task':'run_cellranger'})
|
|
|
+ python_callable=run_picard_for_cellranger,
|
|
|
+ params={'xcom_pull_files_key':'cellranger_output',
|
|
|
+ 'xcom_pull_task':'run_cellranger',
|
|
|
+ 'analysis_description_xcom_pull_task':'fetch_analysis_info',
|
|
|
+ 'analysis_description_xcom_key':'analysis_description',
|
|
|
+ 'use_ephemeral_space':True,
|
|
|
+ 'load_metrics_to_cram':True,
|
|
|
+ 'output_prefix':None,
|
|
|
+ 'java_param':'-Xmx4g',
|
|
|
+ 'picard_command':'CollectAlignmentSummaryMetrics',
|
|
|
+ 'picard_option':{},
|
|
|
+ 'analysis_files_xcom_key':'picard_alignment_summary',
|
|
|
+ 'bam_files_xcom_key':None})
|
|
|
## PIPELINE
|
|
|
decide_analysis_branch >> run_picard_alignment_summary
|
|
|
## TASK
|
|
@@ -562,7 +573,19 @@ with dag:
|
|
|
task_id='run_picard_qual_summary',
|
|
|
dag=dag,
|
|
|
queue='hpc_4G',
|
|
|
- python_callable=None)
|
|
|
+ python_callable=run_picard_for_cellranger,
|
|
|
+ params={'xcom_pull_files_key':'cellranger_output',
|
|
|
+ 'xcom_pull_task':'run_cellranger',
|
|
|
+ 'analysis_description_xcom_pull_task':'fetch_analysis_info',
|
|
|
+ 'analysis_description_xcom_key':'analysis_description',
|
|
|
+ 'use_ephemeral_space':True,
|
|
|
+ 'load_metrics_to_cram':True,
|
|
|
+ 'output_prefix':None,
|
|
|
+ 'java_param':'-Xmx4g',
|
|
|
+ 'picard_command':'QualityScoreDistribution',
|
|
|
+ 'picard_option':{},
|
|
|
+ 'analysis_files_xcom_key':'picard_qual_summary',
|
|
|
+ 'bam_files_xcom_key':None})
|
|
|
## PIPELINE
|
|
|
run_picard_alignment_summary >> run_picard_qual_summary
|
|
|
## TASK
|
|
@@ -571,7 +594,19 @@ with dag:
|
|
|
task_id='run_picard_rna_summary',
|
|
|
dag=dag,
|
|
|
queue='hpc_4G',
|
|
|
- python_callable=None)
|
|
|
+ python_callable=run_picard_for_cellranger,
|
|
|
+ params={'xcom_pull_files_key':'cellranger_output',
|
|
|
+ 'xcom_pull_task':'run_cellranger',
|
|
|
+ 'analysis_description_xcom_pull_task':'fetch_analysis_info',
|
|
|
+ 'analysis_description_xcom_key':'analysis_description',
|
|
|
+ 'use_ephemeral_space':True,
|
|
|
+ 'load_metrics_to_cram':True,
|
|
|
+ 'output_prefix':None,
|
|
|
+ 'java_param':'-Xmx4g',
|
|
|
+ 'picard_command':'CollectRnaSeqMetrics',
|
|
|
+ 'picard_option':{},
|
|
|
+ 'analysis_files_xcom_key':'picard_rna_summary',
|
|
|
+ 'bam_files_xcom_key':None})
|
|
|
## PIPELINE
|
|
|
run_picard_qual_summary >> run_picard_rna_summary
|
|
|
## TASK
|
|
@@ -580,10 +615,43 @@ with dag:
|
|
|
task_id='run_picard_gc_summary',
|
|
|
dag=dag,
|
|
|
queue='hpc_4G',
|
|
|
- python_callable=None)
|
|
|
+ python_callable=run_picard_for_cellranger,
|
|
|
+ params={'xcom_pull_files_key':'cellranger_output',
|
|
|
+ 'xcom_pull_task':'run_cellranger',
|
|
|
+ 'analysis_description_xcom_pull_task':'fetch_analysis_info',
|
|
|
+ 'analysis_description_xcom_key':'analysis_description',
|
|
|
+ 'use_ephemeral_space':True,
|
|
|
+ 'load_metrics_to_cram':True,
|
|
|
+ 'output_prefix':None,
|
|
|
+ 'java_param':'-Xmx4g',
|
|
|
+ 'picard_command':'CollectGcBiasMetrics',
|
|
|
+ 'picard_option':{},
|
|
|
+ 'analysis_files_xcom_key':'picard_gc_summary',
|
|
|
+ 'bam_files_xcom_key':None})
|
|
|
## PIPELINE
|
|
|
run_picard_rna_summary >> run_picard_gc_summary
|
|
|
## TASK
|
|
|
+ picard_base_dist_summary = \
|
|
|
+ PythonOperator(
|
|
|
+ task_id='run_picard_gc_summary',
|
|
|
+ dag=dag,
|
|
|
+ queue='hpc_4G',
|
|
|
+ python_callable=run_picard_for_cellranger,
|
|
|
+ params={'xcom_pull_files_key':'cellranger_output',
|
|
|
+ 'xcom_pull_task':'run_cellranger',
|
|
|
+ 'analysis_description_xcom_pull_task':'fetch_analysis_info',
|
|
|
+ 'analysis_description_xcom_key':'analysis_description',
|
|
|
+ 'use_ephemeral_space':True,
|
|
|
+ 'load_metrics_to_cram':True,
|
|
|
+ 'output_prefix':None,
|
|
|
+ 'java_param':'-Xmx4g',
|
|
|
+ 'picard_command':'CollectBaseDistributionByCycle',
|
|
|
+ 'picard_option':{},
|
|
|
+ 'analysis_files_xcom_key':'picard_base_summary',
|
|
|
+ 'bam_files_xcom_key':None})
|
|
|
+ ## PIPELINE
|
|
|
+ run_picard_gc_summary >> picard_base_dist_summary
|
|
|
+ ## TASK
|
|
|
run_samtools_stats = \
|
|
|
PythonOperator(
|
|
|
task_id='run_samtools_stats',
|