From ed226a3adc502694cc3ef9c30f3d2d5dae431935 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Tue, 30 Apr 2024 15:21:36 +0200 Subject: [PATCH] fix: lookup #18 (#19) * fix: lookup of samples in 'write_coldata' not necessary * fix: output in format string --- workflow/Snakefile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index ab5ef02..7bc92d7 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -144,17 +144,9 @@ rule write_coldata: output: coldata="de_analysis/coldata.tsv", run: - df = pd.DataFrame( - OrderedDict( - [ - ("sample", samples), - ("condition", condition), - ("condition2", condition2), - ("batch", batch_effect), - ] - ) - ) - df.to_csv(output.coldata, sep="\t", index=False) + with open(f"{output}", "w") as outfile: + outstring = "\t".join(samples.head()) + outfile.write(outstring) rule write_de_params: