Skip to content

Commit e62a909

Browse files
authored
Merge pull request #1169 from fls-bioinformatics-core/10x-ocm-data-add-qc-protocol
Update 10x Chromium 3' OCM application support and add new QC protocol
2 parents 9de4534 + d4944b8 commit e62a909

8 files changed

Lines changed: 426 additions & 33 deletions

File tree

auto_process_ngs/applications.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,23 @@
136136
"assays": ["10x Chromium 3' (v4 GEM-X) sc GEX",],
137137
"tags": ["10x", "single_cell"]
138138
},
139-
# 10x Chromium 3' OCM single-cell
139+
# 10x Chromium 3' OCM single-cell & single-nuclei
140140
{
141141
"platforms": ["10x Chromium 3' OCM"],
142-
"libraries": ["scRNA-seq"],
142+
"libraries": ["scRNA-seq", "snRNA-seq"],
143143
"extensions": ["CSP", "CRISPR"],
144144
"alternative_extensions": {
145145
"Antibody Capture": "CSP",
146146
"Feature Barcode": "CSP",
147147
},
148148
"fastq_generation": "10x_chromium_sc",
149-
"qc_protocol": "10x_scRNAseq",
149+
"qc_protocol": "10x_OCM",
150150
"setup": {
151151
"templates": ["10x_multi_config(multiplexing=ocm)"],
152152
"directories": [],
153153
},
154-
"assays": ["10x Chromium 3' (v4 GEM-X) OCM sc GEX",],
154+
"assays": ["10x Chromium 3' (v4 GEM-X) OCM sc GEX",
155+
"10x Chromium 3' (v4 GEM-X) OCM sn GEX",],
155156
"tags": ["10x", "single_cell", "multiplex"]
156157
},
157158
# 10x Chromium 3' single-nuclei
@@ -167,19 +168,6 @@
167168
"assays": ["10x Chromium 3' (v4 GEM-X) sn GEX",],
168169
"tags": ["10x", "single_cell"]
169170
},
170-
# 10x Chromium 3' OCM single-nuclei
171-
{
172-
"platforms": ["10x Chromium 3' OCM"],
173-
"libraries": ["snRNA-seq"],
174-
"fastq_generation": "10x_chromium_sc",
175-
"qc_protocol": "10x_snRNAseq",
176-
"setup": {
177-
"templates": ["10x_multi_config(multiplexing=ocm)"],
178-
"directories": [],
179-
},
180-
"assays": ["10x Chromium 3' (v4 GEM-X) OCM sn GEX",],
181-
"tags": ["10x", "single_cell", "multiplex"]
182-
},
183171
# 10x Chromium 5'
184172
{
185173
"platforms": ["10x Chromium 5'"],

auto_process_ngs/mock.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ def create(path,exit_code=0,missing_fastqs=None,
18771877
'ATAC' (when mocking 'cellranger-arc')
18781878
multi_outputs (str): set type of
18791879
outputs for 'cellranger multi' (either
1880-
'cellplex' or 'flex')
1880+
'ocm', 'flex' or 'cellplex')
18811881
version (str): version of package to
18821882
report
18831883
"""
@@ -2491,14 +2491,16 @@ def main(self,args):
24912491
with open(web_summary_file,'wt') as fp:
24922492
fp.write("PLACEHOLDER FOR WEB_SUMMARY.HTML")
24932493
# Multiplexing outs
2494-
if self._multi_outputs == 'cellplex':
2494+
if self._multi_outputs == 'ocm':
2495+
multi_outputs = ("cells_per_tag.json",)
2496+
elif self._multi_outputs == 'flex':
2497+
multi_outputs = ("cells_per_tag.json",
2498+
"frp_gem_barcode_overlap.csv")
2499+
elif self._multi_outputs == 'cellplex':
24952500
multi_outputs = ("assignment_confidence_table.csv",
24962501
"cells_per_tag.json",
24972502
"tag_calls_per_cell.csv",
24982503
"tag_calls_summary.csv")
2499-
elif self._multi_outputs == 'flex':
2500-
multi_outputs = ("cells_per_tag.json",
2501-
"frp_gem_barcode_overlap.csv")
25022504
else:
25032505
multi_outputs = ()
25042506
for f in multi_outputs:

auto_process_ngs/qc/modules/cellranger_multi.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
#
33
# cellranger_multi: implements 'cellranger_multi' QC module
4-
# Copyright (C) University of Manchester 2024-2025 Peter Briggs
4+
# Copyright (C) University of Manchester 2024-2026 Peter Briggs
55

66
"""
77
Implements the 'cellranger_multi' QC module:
@@ -737,10 +737,11 @@ def finish(self):
737737
qc_files = [f for f in expected_outputs(config_csv, multi_id)]
738738
qc_files.append(os.path.join("outs",
739739
"config.csv"))
740-
qc_files.append(os.path.join("outs",
741-
"multi",
742-
"multiplexing_analysis",
743-
"tag_calls_summary.csv"))
740+
for f in ("tag_calls_summary.csv",
741+
"cells_per_tag.json",):
742+
qc_files.append(os.path.join("outs",
743+
"multi",
744+
"multiplexing_analysis", f))
744745
# Prefix dirs
745746
prefix = multi_dir
746747
if config.physical_sample:

auto_process_ngs/qc/protocols.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
#
33
# protocols: define and handle QC protocols
4-
# Copyright (C) University of Manchester 2022-2025 Peter Briggs
4+
# Copyright (C) University of Manchester 2022-2026 Peter Briggs
55
#
66

77
"""
@@ -242,6 +242,26 @@ class in the ``check_outputs`` method; new modules must be added
242242
]
243243
},
244244

245+
"10x_OCM": {
246+
"description": "10xGenomics OCM (on-chip multiplexing) data",
247+
"reads": {
248+
"seq_data": ('r2',),
249+
"index": ('r1',)
250+
},
251+
"qc_modules": [
252+
'fastqc',
253+
'fastq_screen',
254+
'sequence_lengths',
255+
'rseqc_genebody_coverage',
256+
'rseqc_infer_experiment',
257+
'qualimap_rnaseq',
258+
'cellranger_count(cellranger_use_multi_config=True;'
259+
'set_cell_count=false;'
260+
'set_metadata=False)',
261+
'cellranger_multi'
262+
]
263+
},
264+
245265
"10x_CellPlex": {
246266
"description": "10xGenomics CellPlex cell multiplexing data",
247267
"reads": {

auto_process_ngs/tenx/cellplex.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
#
33
# tenx/cellplex.py: utilities for handling 10xGenomics Cellplex data
4-
# Copyright (C) University of Manchester 2023-2025 Peter Briggs
4+
# Copyright (C) University of Manchester 2023-2026 Peter Briggs
55
#
66

77
"""
@@ -145,7 +145,8 @@ def _read_config_csv(self, strict=True):
145145
continue
146146
if current_section == "samples":
147147
if line.startswith('sample_id,cmo_ids') or \
148-
line.startswith('sample_id,probe_barcode_ids'):
148+
line.startswith('sample_id,probe_barcode_ids') or \
149+
line.startswith('sample_id,ocm_barcode_ids'):
149150
# Header line, skip
150151
continue
151152
else:

auto_process_ngs/tenx/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,8 @@ def make_multi_config_template(f, reference=None, fastq_dir=None,
543543
MULTIPLEXED_SAMPLE,BC001|BC002|...,DESCRIPTION
544544
"""))
545545
elif multiplexing == "ocm":
546-
fp.write(dedent("""[samples]
546+
fp.write(dedent("""
547+
[samples]
547548
sample_id,ocm_barcode_ids,description
548549
MULTIPLEXED_SAMPLE,OB1|OB2|...,DESCRIPTION
549550
"""))

0 commit comments

Comments
 (0)