Skip to content

Commit 9f08089

Browse files
committed
fix barcode reading (fix does not affect any results in practice)
1 parent 726ca1d commit 9f08089

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

misc/assess_barcode_quality.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def assess_single_barcode_mode(
132132
# Process input file
133133
with open(input_file) as f:
134134
for line in f:
135-
if line.startswith('#'):
135+
if line.startswith('#') or line.startswith('read_id\t'):
136136
continue
137137

138138
cols = line.strip().split('\t')
@@ -237,7 +237,7 @@ def assess_split_barcode_mode(
237237

238238
with open(input_file) as f:
239239
for line in f:
240-
if line.startswith('#'):
240+
if line.startswith('#') or line.startswith('read_id\t'):
241241
continue
242242

243243
cols = line.strip().split('\t')

misc/inject_bam_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def load_barcoded_reads(barcoded_reads_path: str) -> dict[str, tuple[str, str]]:
2828
barcode_dict: dict[str, tuple[str, str]] = {}
2929
with open(barcoded_reads_path) as f:
3030
for line in f:
31-
if line.startswith("#"):
31+
if line.startswith("#") or line.startswith("read_id\t"):
3232
continue
3333
tokens = line.strip().split("\t")
3434
if len(tokens) < 3:

src/parallel_workers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def load_barcode_dict(sample, chr_id):
9999
if os.path.exists(barcode_file):
100100
logger.debug(f"Loading barcodes from {barcode_file}")
101101
for line in open(barcode_file):
102-
if line.startswith("#"):
102+
if line.startswith("#") or line.startswith("read_id\t"):
103103
continue
104104
parts = line.strip().split('\t')
105105
if len(parts) >= 3:

src/string_pools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def load_barcode_pool(self, barcode_file: str):
305305
umis = set()
306306
with open(barcode_file, 'r') as f:
307307
for line in f:
308-
if line.startswith('#'):
308+
if line.startswith('#') or line.startswith('read_id\t'):
309309
continue
310310
parts = line.strip().split('\t')
311311
if len(parts) >= 2 and parts[1]:

src/table_splitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def process_table_for_chromosomes(worker_id, input_tsvs, my_chromosomes, bam_fil
179179

180180
try:
181181
for line in file_handle:
182-
if line.startswith("#") or not line.strip():
182+
if line.startswith("#") or line.startswith("read_id\t") or not line.strip():
183183
continue
184184

185185
total_reads_processed += 1

0 commit comments

Comments
 (0)