Skip to content

Commit

Permalink
number log files
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahOuologuem committed Mar 28, 2024
1 parent 83fb562 commit 4150e4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions panpipes/panpipes/pipeline_deconvolution_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions panpipes/panpipes/pipeline_preprocess_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down Expand Up @@ -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)
Expand All @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions panpipes/panpipes/pipeline_qc_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 4150e4b

Please sign in to comment.