From 4150e4bee92277c123302c2b9f2d017222392222 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Thu, 28 Mar 2024 10:00:10 +0000 Subject: [PATCH] number log files --- panpipes/panpipes/pipeline_deconvolution_spatial.py | 4 ++-- panpipes/panpipes/pipeline_preprocess_spatial.py | 6 +++--- panpipes/panpipes/pipeline_qc_spatial.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/panpipes/panpipes/pipeline_deconvolution_spatial.py b/panpipes/panpipes/pipeline_deconvolution_spatial.py index d0cd461a..f89a619c 100644 --- a/panpipes/panpipes/pipeline_deconvolution_spatial.py +++ b/panpipes/panpipes/pipeline_deconvolution_spatial.py @@ -45,7 +45,7 @@ def run_cell2location(input_spatial, outfile_spatial, sample_prefix, input_singl figdir = "./figures/Cell2Location/" + sample_prefix output_dir = "./cell2location.output/" + sample_prefix - log_file = "Cell2Location_" + sample_prefix + ".log" + log_file = "1_Cell2Location_" + sample_prefix + ".log" cmd = """ python %(py_path)s/run_cell2location.py --input_spatial %(input_spatial)s @@ -114,7 +114,7 @@ def run_tangram(input_spatial, outfile_spatial, sample_prefix, input_singlecell) figdir = "./figures/Tangram/" + sample_prefix output_dir = "./tangram.output/" + sample_prefix - log_file = "Tangram_" + sample_prefix + ".log" + log_file = "2_Tangram_" + sample_prefix + ".log" cmd = """ python %(py_path)s/run_tangram.py --input_spatial %(input_spatial)s diff --git a/panpipes/panpipes/pipeline_preprocess_spatial.py b/panpipes/panpipes/pipeline_preprocess_spatial.py index ac1821eb..2d9a5ff7 100644 --- a/panpipes/panpipes/pipeline_preprocess_spatial.py +++ b/panpipes/panpipes/pipeline_preprocess_spatial.py @@ -54,7 +54,7 @@ def gen_filter_jobs(): def filter_mudata(infile_path,outfile): print('processing file = %s' % str(infile_path)) log_file = os.path.basename(outfile) - log_file= "filtering."+log_file.replace("filtered.h5mu","") + ".log" + log_file= "1_filtering."+log_file.replace("filtered.h5mu","") + ".log" filter_dict = dictionary_stripper(PARAMS['filtering']) @@ -83,7 +83,7 @@ def run_plotqc_query(pqc_dict): @active_if(PARAMS['filtering_run']) @transform(filter_mudata, regex("./filtered.data/(.*)_filtered.h5(.*)"), - r"./logs/postfilterplot.\1.log") + r"./logs/2_postfilterplot.\1.log") def postfilterplot_spatial(filt_file,log_file): print(filt_file) print(log_file) @@ -105,7 +105,7 @@ def postfilterplot_spatial(filt_file,log_file): @transform(filter_mudata, regex("./filtered.data/(.*)_filtered.h5(.*)"), - r"./logs/preprocess.\1.log") + r"./logs/3_preprocess.\1.log") def spatial_preprocess(filt_file,log_file): if os.path.exists("figures/spatial") is False: os.mkdir("figures/spatial") diff --git a/panpipes/panpipes/pipeline_qc_spatial.py b/panpipes/panpipes/pipeline_qc_spatial.py index 1cd0b903..cb1051b2 100644 --- a/panpipes/panpipes/pipeline_qc_spatial.py +++ b/panpipes/panpipes/pipeline_qc_spatial.py @@ -108,7 +108,7 @@ def load_mudatas(spatial_path, outfile, --spatial_metadata %(spatial_metadata)s --spatial_transformation %(spatial_transformation)s """ - cmd += " > logs/make_mudatas_%(sample_id)s.log" + cmd += " > logs/1_make_mudatas_%(sample_id)s.log" print(cmd) job_kwargs["job_threads"] = PARAMS['resources_threads_medium'] P.run(cmd, **job_kwargs) @@ -121,7 +121,7 @@ def load_mudatas(spatial_path, outfile, @follows(mkdir("./figures")) @transform(load_mudatas, regex("./tmp/(.*)_raw.h5(.*)"), - r"./logs/spatialQC_\1.log") + r"./logs/2_spatialQC_\1.log") def spatialQC(infile,log_file): spatial_filetype = assays[infile] resources_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "resources") @@ -168,7 +168,7 @@ def run_plotqc_query(pqc_dict): @active_if(run_plotqc_query(PARAMS['plotqc'])) @transform(load_mudatas, regex("./tmp/(.*)_raw.h5(.*)"), - r"./logs/qcplot.\1.log") + r"./logs/3_qcplot.\1.log") def plotQC_spatial(unfilt_file,log_file): spatial_filetype = assays[unfilt_file] unfilt_file = unfilt_file.replace("_raw","_unfilt")