Skip to content

Commit 05e95d2

Browse files
committed
Solved issue BU-ISCIII#312 warnings when running the install.sh
1 parent 8221d12 commit 05e95d2

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

wetlab/utils/collection_index.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_collection_index_name(input_file):
7373
collection_name = ""
7474
with open(input_file, encoding="utf-8") as fh:
7575
for line in fh:
76-
found_collection_name = re.search("^\[Name\]", line)
76+
found_collection_name = re.search(r"^\[Name\]", line)
7777
if found_collection_name:
7878
found_name = True
7979
continue
@@ -305,7 +305,7 @@ def store_collection_kits_file(collection_file):
305305
# fetch the file from user form and build the file name including
306306
# the date and time on now to store in database
307307

308-
split_filename = re.search("(.*)(\.\w+$)", collection_file.name)
308+
split_filename = re.search(r"(.*)(\.\w+$)", collection_file.name)
309309
f_name = split_filename[1]
310310
f_extension = split_filename[2]
311311
fs_index_lib = FileSystemStorage()

wetlab/utils/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def find_xml_tag_text(input_file, search_tag):
186186
fh = open(input_file, "r")
187187
search_line = "<" + search_tag + ">(.*)</" + search_tag + ">"
188188
for line in fh:
189-
found_tag = re.search("^\s+ %s" % search_line, line)
189+
found_tag = re.search(r"^\s+ %s" % search_line, line)
190190
if found_tag:
191191
fh.close()
192192
return found_tag.group(1)

wetlab/utils/crontab_process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def get_latest_run_procesing_log(conn, log_folder, experiment_name):
720720
continue
721721
file_remote = sfh.filename
722722
if file_remote.endswith(".log"):
723-
log_file = re.search(".*_Cycle(\d+)_.*", file_remote)
723+
log_file = re.search(r".*_Cycle(\d+)_.*", file_remote)
724724

725725
cycle_number = int(log_file.group(1))
726726
if cycle_number > max_cycle:

wetlab/utils/library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ def get_library_code_and_unique_id(sample_id, molecule_id):
804804
sample_id=sample_obj, molecule_id=molecule_obj
805805
).last()
806806
last_lib_prep_code_id = lib_prep_obj.get_lib_prep_code()
807-
split_code = re.search("(.*_)(\d+)$", last_lib_prep_code_id)
807+
split_code = re.search(r"(.*_)(\d+)$", last_lib_prep_code_id)
808808
index_val = int(split_code.group(2))
809809
new_index = str(index_val + 1).zfill(2)
810810
lib_prep_code_id = split_code.group(1) + new_index

wetlab/utils/samplesheet.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_adapters(file_lines):
106106
else:
107107
adapter2 = adapter_code
108108
break
109-
data_found = re.search("^\[Data]", line)
109+
data_found = re.search(r"^\[Data]", line)
110110
if data_found:
111111
break
112112

@@ -205,7 +205,7 @@ def get_reads(file_lines):
205205
continue
206206
if "[Settings]" in line:
207207
break
208-
if read_found and re.search("^\w+", line):
208+
if read_found and re.search(r"^\w+", line):
209209
reads.append(line.split(",")[0])
210210
return reads
211211

@@ -392,7 +392,7 @@ def get_projects_in_run(in_file: str) -> dict:
392392
continue
393393
else:
394394
# ignore the empty lines separated by commas
395-
valid_line = re.search("^\w+", line)
395+
valid_line = re.search(r"^\w+", line)
396396
if not valid_line:
397397
continue
398398
# store the project name and the user name (Description) inside projects dict
@@ -442,7 +442,7 @@ def get_index_library_name(in_file):
442442
def update_library_kit_field(library_file_name, library_kit_name, library_name):
443443
# result_directory='documents/wetlab/BaseSpaceMigrationFiles/'
444444
timestr = time.strftime("%Y%m%d-%H%M%S")
445-
tmp = re.search("(.*)\d{8}-\d+.*\.csv", library_file_name)
445+
tmp = re.search(r"(.*)\d{8}-\d+.*\.csv", library_file_name)
446446
absolute_path = str(settings.BASE_DIR + "/")
447447
out_file = str(
448448
absolute_path
@@ -517,7 +517,7 @@ def create_unique_sample_id_values(infile, index_file):
517517
continue
518518
if found_sample_line:
519519
# discard the empty lines or the lines that contains empty lines separated by comma
520-
if line == "\n" or re.search("^\W", line):
520+
if line == "\n" or re.search(r"^\W", line):
521521
continue
522522

523523
data_line = line.split(",")
@@ -592,7 +592,7 @@ def set_user_names_in_sample_sheet(in_file, user_names):
592592
continue
593593
if found_sample_line:
594594
# discard the empty lines or the lines that contains empty lines separated by comma
595-
if line == "\n" or re.search("^\W", line):
595+
if line == "\n" or re.search(r"^\W", line):
596596
continue
597597

598598
data_line = line.split(",")

0 commit comments

Comments
 (0)