Skip to content

Commit 06104dc

Browse files
committed
Merge branch 'master' of github.com:EdinburghGenomics/illuminatus
2 parents d34c149 + 9eab366 commit 06104dc

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

Diff for: Snakefile.read1qc

+14-11
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ def get_wd_settings(rundir, run_info_root):
9494
if l > wd_settings['READ_LENGTH'] ][0]
9595

9696
# 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+
):
99101
start_pos = wd_settings['START_POS']
100102
else:
101103
start_pos = 0
@@ -105,7 +107,7 @@ def get_wd_settings(rundir, run_info_root):
105107
wd_settings['START_POS'] = start_pos + sum( all_read_lens[:read_to_sample] )
106108
else:
107109
# 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)
109111
return wd_settings
110112

111113
wd_settings['END_POS'] = wd_settings['READ_LENGTH'] + wd_settings['START_POS']
@@ -136,7 +138,8 @@ def get_wd_settings(rundir, run_info_root):
136138
mo = re.match(r'''\s*--tiles:.*]_(\d{4})['"]?$''', l)
137139
if mo:
138140
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 ) )
140143
except Exception:
141144
#no matter
142145
pass
@@ -166,9 +169,9 @@ else:
166169
input:
167170
summary = format('QC/welldups/{TARGETS_TO_SAMPLE}summary.yml')
168171

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.
172175
rule bc_main:
173176
input:
174177
summary = 'QC/bc_check/bc_check.msg'
@@ -278,8 +281,8 @@ rule bcl2fastq_bc_check:
278281
threads: 2
279282
shadow: "shallow"
280283
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.
283286
"""export PROCESSING_THREADS={threads}
284287
mkdir bc_check_tmp
285288
lanedir=bc_check_tmp/QC/bc_check/lane{wildcards.l}
@@ -299,8 +302,8 @@ rule setup_bc_check:
299302
input:
300303
ssheet = RUNDIR + "/SampleSheet.csv"
301304
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
304307
# a good idea - just leave it to bcl2fastq_setup.py to work out a sensible option.
305308
"""revcomp=$(cat {RUNDIR}/pipeline/index_revcomp.lane{wildcards.l}.OVERRIDE 2>/dev/null || true)
306309
bcl2fastq_setup.py --bc_check --lane {wildcards.l} --revcomp "${{revcomp:-auto}}" {RUNDIR} > {output}

0 commit comments

Comments
 (0)