Skip to content

Commit 7dedae4

Browse files
committed
fix bugs during making IGV files
1 parent 272c5ea commit 7dedae4

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

workflow/rules/save_configs.smk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ rule save_reference_configs:
5252

5353
# optional genome‐browser track
5454
if params.sce2g_config["make_IGV_tracks"]:
55-
out["predictions_bedpe"] = os.path.join(params.IGV_dir,
55+
out["predictions_bedpe"] = os.path.join(params.igv_dir,
5656
biosample, model_name, f"scE2G_predictions_threshold{threshold}.tsv.gz")
57-
out["ATAC_bw"] = os.path.join(params.IGV_dir,
57+
out["ATAC_bw"] = os.path.join(params.igv_dir,
5858
biosample, "ATAC_norm.bw")
5959

6060
return pd.Series(out)

workflow/rules/sc_predictions.smk

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,27 @@ rule filter_sc_e2g_predictions:
9494
--output_file {output.thresholded}
9595
"""
9696

97+
rule write_sc_e2g_predictions_bedpe:
98+
input:
99+
thresholded = os.path.join(RESULTS_DIR, "{cluster}", "{model_name}", "scE2G_predictions_threshold{threshold}.tsv.gz")
100+
params:
101+
score_col = encode_e2g.config["final_score_col"],
102+
scripts_dir = os.path.join(config["encode_re2g_dir"], encode_e2g.SCRIPTS_DIR)
103+
output:
104+
bedpe = os.path.join(IGV_DIR, "{cluster}", "{model_name}", "scE2G_predictions_threshold{threshold}.bedpe")
105+
conda:
106+
"../envs/sc_e2g.yml"
107+
resources:
108+
mem_mb=encode_e2g.ABC.determine_mem_mb
109+
shell:
110+
"""
111+
python {params.scripts_dir}/model_application/process_model_output.py \
112+
--predictions_file {input.thresholded} \
113+
--score_column {params.score_col} \
114+
--bedpe_output {output.bedpe}
115+
"""
116+
117+
97118
def get_gex_file(wildcards):
98119
with checkpoints.features_required.get(sample=wildcards.cluster).output.to_generate.open() as f:
99120
val = f.read().strip()

0 commit comments

Comments
 (0)