From fb1cc06f7cdb5508263caf5d77070fc6b673be5f Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Thu, 24 Oct 2024 13:38:47 -0400 Subject: [PATCH] fix: do not read entire files in memory --- workflow/rules/init.smk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/workflow/rules/init.smk b/workflow/rules/init.smk index 380271a..ce1a2ef 100644 --- a/workflow/rules/init.smk +++ b/workflow/rules/init.smk @@ -53,9 +53,8 @@ def append_files_in_list(flist, ofile): with open(ofile, "w") as outfile: for fname in flist: with open(fname) as infile: - l = infile.read() - l = l.strip() - outfile.write("%s\n" % (l)) + for line in infile: + outfile.write(line) return True