@@ -94,8 +94,10 @@ def get_wd_settings(rundir, run_info_root):
94
94
if l > wd_settings ['READ_LENGTH' ] ][0 ]
95
95
96
96
# Is it OK to start at START_POS or do we go from 0?
97
- if read_to_sample == 0 and \
98
- all_read_lens [read_to_sample ] > (wd_settings ['READ_LENGTH' ] + wd_settings ['START_POS' ]):
97
+ if ( read_to_sample == 0 and
98
+ all_read_lens [read_to_sample ] > (wd_settings ['READ_LENGTH' ] +
99
+ wd_settings ['START_POS' ])
100
+ ):
99
101
start_pos = wd_settings ['START_POS' ]
100
102
else :
101
103
start_pos = 0
@@ -105,7 +107,7 @@ def get_wd_settings(rundir, run_info_root):
105
107
wd_settings ['START_POS' ] = start_pos + sum ( all_read_lens [:read_to_sample ] )
106
108
else :
107
109
# We can't process this run
108
- print ("Cannot process run with short read lengths {}." . format ( all_read_lens ) , file = sys .stderr )
110
+ print (f "Cannot process run with short read lengths { all_read_lens } ." , file = sys .stderr )
109
111
return wd_settings
110
112
111
113
wd_settings ['END_POS' ] = wd_settings ['READ_LENGTH' ] + wd_settings ['START_POS' ]
@@ -136,7 +138,8 @@ def get_wd_settings(rundir, run_info_root):
136
138
mo = re .match (r'''\s*--tiles:.*]_(\d{4})['"]?$''' , l )
137
139
if mo :
138
140
tile = mo .group (1 )
139
- wd_settings ['TILE_MATCH' ] = dict ( T = tile ) if tile [0 ] == '1' else dict ( B = tile )
141
+ wd_settings ['TILE_MATCH' ] = ( dict ( T = tile ) if tile [0 ] == '1'
142
+ else dict ( B = tile ) )
140
143
except Exception :
141
144
#no matter
142
145
pass
@@ -166,9 +169,9 @@ else:
166
169
input :
167
170
summary = format ('QC/welldups/{TARGETS_TO_SAMPLE}summary.yml' )
168
171
169
- # For the early demultiplex barcode check. The idea is that if this file is non-empty then the driver
170
- # will trigger an alert message incorporating the text of the file, or if the file is missing it
171
- # will also send a warning.
172
+ # For the early demultiplex barcode check. The idea is that if this file is non-empty then the
173
+ # driver will trigger an alert message incorporating the text of the file, or if the file is
174
+ # missing it will also send a warning.
172
175
rule bc_main :
173
176
input :
174
177
summary = 'QC/bc_check/bc_check.msg'
@@ -278,8 +281,8 @@ rule bcl2fastq_bc_check:
278
281
threads : 2
279
282
shadow : "shallow"
280
283
shell :
281
- # Run do_demultiplex.sh for this lane. The silly stuff with f=0 is just to allow us to preserve
282
- # the log even if the demux fails.
284
+ # Run do_demultiplex.sh for this lane. The silly stuff with f=0 is just to allow us to
285
+ # preserve the log even if the demux fails.
283
286
"""export PROCESSING_THREADS={threads}
284
287
mkdir bc_check_tmp
285
288
lanedir=bc_check_tmp/QC/bc_check/lane{wildcards.l}
@@ -299,8 +302,8 @@ rule setup_bc_check:
299
302
input :
300
303
ssheet = RUNDIR + "/SampleSheet.csv"
301
304
shell :
302
- # If the override file is missing or empty this results in auto revcomp logic
303
- # I considered using TILE_MATCH to see which tile to sample but this is not
305
+ # If the override file is missing or empty we'll apply auto revcomp logic.
306
+ # I considered using TILE_MATCH to configure which single tile to sample but this is not
304
307
# a good idea - just leave it to bcl2fastq_setup.py to work out a sensible option.
305
308
"""revcomp=$(cat {RUNDIR}/pipeline/index_revcomp.lane{wildcards.l}.OVERRIDE 2>/dev/null || true)
306
309
bcl2fastq_setup.py --bc_check --lane {wildcards.l} --revcomp "${{revcomp:-auto}}" {RUNDIR} > {output}
0 commit comments