File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ def run_demux(args):
34
34
if args .debug :
35
35
log .setLevel (logging .DEBUG )
36
36
run_uuid = str (uuid .uuid4 ())
37
- os .mkdir (args .out_fastq )
38
37
ss = SampleSheet (args .samplesheet , args .ont_barcodes )
39
38
version = pkg_resources .get_distribution ("bio-anglerfish" ).version
40
39
report = Report (args .run_name , run_uuid , version )
@@ -80,7 +79,12 @@ def run_demux(args):
80
79
adaptors_sorted [(entry .adaptor .name , entry .ont_barcode )].append (
81
80
(entry .sample_name , entry .adaptor , os .path .abspath (entry .fastq ))
82
81
)
83
-
82
+ if os .path .exists (args .out_fastq ):
83
+ raise FileExistsError (
84
+ f"Output folder '{ args .out_fastq } ' already exists. Please remove it or specify another --run_name"
85
+ )
86
+ else :
87
+ os .mkdir (args .out_fastq )
84
88
out_fastqs = []
85
89
for key , sample in adaptors_sorted .items ():
86
90
adaptor_name , ont_barcode = key
Original file line number Diff line number Diff line change @@ -269,6 +269,9 @@ def run(
269
269
)
270
270
utcnow = dt .datetime .now (dt .timezone .utc )
271
271
runname = utcnow .strftime (f"{ args .run_name } _%Y_%m_%d_%H%M%S" )
272
+ if run_name != "anglerfish" :
273
+ runname = args .run_name
274
+
272
275
assert os .path .exists (args .out_fastq ), f"Output folder '{ args .out_fastq } ' not found"
273
276
assert os .path .exists (
274
277
args .samplesheet
You can’t perform that action at this time.
0 commit comments