Technical and biological sources of noise confound multiplexed enhancer AAV screening.
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 106 lines · 2.7 KB · CC-BY-4.0
- #!/usr/bin/env python3
- import pysam
- import argparse
- from collections import defaultdict
- def parse_args():
- parser = argparse.ArgumentParser(
- description="Extract CB, UMI, and 8bp barcodes from reads in a BAM file"
- )
- parser.add_argument(
- "-b", "--bam",
- required=True,
- help="Input filtered BAM file"
- )
- parser.add_argument(
- "-o", "--out",
- required=True,
- help="Output TSV file"
- )
- parser.add_argument(
- "-k", "--barcode_length",
- type=int,
- default=8,
- help="Barcode length (default: 8)"
- )
- parser.add_argument(
- "--whitelist",
- default=None,
- help="Optional file with valid barcodes (one per line)"
- )
- parser.add_argument(
- "--debug",
- action="store_true",
- help="Print first 10 reads and kmers for debugging"
- )
- return parser.parse_args()
- def load_whitelist(path):
- with open(path) as f:
- return set(line.strip().upper() for line in f if line.strip())
- def extract_kmers(seq, k):
- """Return all k-length substrings (kmers) from a sequence"""
- return {seq[i:i+k] for i in range(len(seq) - k + 1)}
- def main():
- args = parse_args()
- whitelist = None
- if args.whitelist:
- whitelist = load_whitelist(args.whitelist)
- bam = pysam.AlignmentFile(args.bam, "rb")
- counts = defaultdict(int)
- debug_count = 0
- for read in bam.fetch(until_eof=True):
- # Skip unmapped / secondary / supplementary reads
- if read.is_unmapped or read.is_secondary or read.is_supplementary:
- continue
- # Get CB / UB tags
- try:
- cb = read.get_tag("CB").replace("-1", "")
- umi = read.get_tag("UB")
- except KeyError:
- continue
- seq = read.query_sequence
- if seq is None:
- continue
- seq = seq.upper()
- kmers = extract_kmers(seq, args.barcode_length)
- if whitelist is not None:
- kmers = kmers & whitelist
- for bc in kmers:
- counts[(cb, umi, bc)] += 1
- # Optional debugging: print first 10 reads
- if args.debug and debug_count < 10:
- print(f"Read: {seq}")
- print(f"CB: {cb}, UMI: {umi}, kmers: {kmers}")
- debug_count += 1
- bam.close()
- # Write output TSV
- with open(args.out, "w") as out:
- out.write("CB\tUMI\tbarcode8bp\tread_count\n")
- for (cb, umi, bc), n in counts.items():
- out.write(f"{cb}\t{umi}\t{bc}\t{n}\n")
- print(f"Done! Output written to {args.out}")
- if __name__ == "__main__":
- main()
extract_cb_umi_barcode_from_bam.py, under CC-BY-4.0 · at the source
Overview
and 15 other authors
Nick Pena1, Christine Rimorin1, Dana Rocha1, Nadiya V Shapovalova1, Michael Tieu1, Natalie Weed1, Thomas Zhou1, Rebecca Hodge1, Shenqin Yao1, Jay Shendure2,3,4,5,6, Kimberly A Smith1, Ed S Lein1,7, Bosiljka Tasic1, Boaz P Levi1, Jonathan T Ting1,8,9- Allen Institute for Brain Science, Seattle, WA USA
- Department of Genome Sciences, University of Washington, Seattle, WA USA
- Seattle Hub for Synthetic Biology, Seattle, WA USA
- Brotman Baty Institute for Precision Medicine, Seattle, WA USA
- Howard Hughes Medical Institute, Seattle, WA USA
- Allen Discovery Center for Cell Lineage Tracing, Seattle, WA USA
- Department of Neurological Surgery, University of Washington, Seattle, WA USA
- Department of Neurobiology & Biophysics, University of Washington, Seattle, WA USA
- Washington National Biomedical Research Center, Seattle, WA USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above.
Zenodo 18753067
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
4 files
- barcode_counts/
extract_cb_umi_barcode_f , Python, 106 linesrom_bam.py - barcode_counts/
extract_cb_umi_from_bam. , Python, 55 linespy - barcode_counts/
filter_and_correct_barco , Python, 280 linesdes_v3.py - README.txt, Text, 237 lines
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: Zenodo 18753067
Read it in the paper: doi.org/10.1038/s41467-026-72147-8.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 3 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- geo:GSE312364, at NCBI GEO; found in “Data availability”
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to a dataset: NCBI GEO GSE312364
- it points to the authors' code: Zenodo 18753067
Read it in the paper: doi.org/10.1038/s41467-026-72147-8.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 35 authors, 4 keywords, 8 MeSH terms, 1 funder, 57 references, 3 RRIDs.
Cite
This paper
Hunker, A. C., Mich, J. K., Taskin, N., Torkelson, A., Cardenas, T., Lalanne, J.-B., Mahoney, J. T., Bertagnolli, D., Chakka, A. B., Chakrabarty, R., Donadio, N. P., Ferrer, R., Gasperini, M., Goldy, J., Guzman, J., Jin, K., Khem, S., Kutsal, R., Martinez, R. A., . . . Ting, J. T. (2026). Technical and biological sources of noise confound multiplexed enhancer AAV screening. Nature communications, 17(1), 3738. https://
BibTeX
@article{hunker2026techn
author = {Hunker, Avery C and Mich, John K and Taskin, Naz and Torkelson, Amy and Cardenas, Trangthanh and Lalanne, Jean-Benoît and Mahoney, Joseph T and Bertagnolli, Darren and Chakka, Anish Bhaswanth and Chakrabarty, Rushil and Donadio, Nicholas P and Ferrer, Rebecca and Gasperini, Molly and Goldy, Jeff and Guzman, Junitta and Jin, Kelly and Khem, Shannon and Kutsal, Rana and Martinez, Refugio A and Newman, Dakota and Pena, Nick and Rimorin, Christine and Rocha, Dana and Shapovalova, Nadiya V and Tieu, Michael and Weed, Natalie and Zhou, Thomas and Hodge, Rebecca and Yao, Shenqin and Shendure, Jay and Smith, Kimberly A and Lein, Ed S and Tasic, Bosiljka and Levi, Boaz P and Ting, Jonathan T},
title = {{Technical and biological sources of noise confound multiplexed enhancer AAV screening}},
journal = {Nature communications},
year = {2026},
month = apr,
volume = {17},
number = {1},
pages = {3738},
publisher = {Nature Portfolio},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42049725},
pmcid = {PMC13125632}
}
RIS
TY - JOUR
AU - Hunker, Avery C
AU - Mich, John K
AU - Taskin, Naz
AU - Torkelson, Amy
AU - Cardenas, Trangthanh
AU - Lalanne, Jean-Benoît
AU - Mahoney, Joseph T
AU - Bertagnolli, Darren
AU - Chakka, Anish Bhaswanth
AU - Chakrabarty, Rushil
AU - Donadio, Nicholas P
AU - Ferrer, Rebecca
AU - Gasperini, Molly
AU - Goldy, Jeff
AU - Guzman, Junitta
AU - Jin, Kelly
AU - Khem, Shannon
AU - Kutsal, Rana
AU - Martinez, Refugio A
AU - Newman, Dakota
AU - Pena, Nick
AU - Rimorin, Christine
AU - Rocha, Dana
AU - Shapovalova, Nadiya V
AU - Tieu, Michael
AU - Weed, Natalie
AU - Zhou, Thomas
AU - Hodge, Rebecca
AU - Yao, Shenqin
AU - Shendure, Jay
AU - Smith, Kimberly A
AU - Lein, Ed S
AU - Tasic, Bosiljka
AU - Levi, Boaz P
AU - Ting, Jonathan T
TI - Technical and biological sources of noise confound multiplexed enhancer AAV screening
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 3738
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Technical and biological sources of noise confound multiplexed enhancer AAV screening",
"container-title": "Nature communications",
"author": [
{
"family": "Hunker",
"given": "Avery C"
},
{
"family": "Mich",
"given": "John K"
},
{
"family": "Taskin",
"given": "Naz"
},
{
"family": "Torkelson",
"given": "Amy"
},
{
"family": "Cardenas",
"given": "Trangthanh"
},
{
"family": "Lalanne",
"given": "Jean-Benoît"
},
{
"family": "Mahoney",
"given": "Joseph T"
},
{
"family": "Bertagnolli",
"given": "Darren"
},
{
"family": "Chakka",
"given": "Anish Bhaswanth"
},
{
"family": "Chakrabarty",
"given": "Rushil"
},
{
"family": "Donadio",
"given": "Nicholas P"
},
{
"family": "Ferrer",
"given": "Rebecca"
},
{
"family": "Gasperini",
"given": "Molly"
},
{
"family": "Goldy",
"given": "Jeff"
},
{
"family": "Guzman",
"given": "Junitta"
},
{
"family": "Jin",
"given": "Kelly"
},
{
"family": "Khem",
"given": "Shannon"
},
{
"family": "Kutsal",
"given": "Rana"
},
{
"family": "Martinez",
"given": "Refugio A"
},
{
"family": "Newman",
"given": "Dakota"
},
{
"family": "Pena",
"given": "Nick"
},
{
"family": "Rimorin",
"given": "Christine"
},
{
"family": "Rocha",
"given": "Dana"
},
{
"family": "Shapovalova",
"given": "Nadiya V"
},
{
"family": "Tieu",
"given": "Michael"
},
{
"family": "Weed",
"given": "Natalie"
},
{
"family": "Zhou",
"given": "Thomas"
},
{
"family": "Hodge",
"given": "Rebecca"
},
{
"family": "Yao",
"given": "Shenqin"
},
{
"family": "Shendure",
"given": "Jay"
},
{
"family": "Smith",
"given": "Kimberly A"
},
{
"family": "Lein",
"given": "Ed S"
},
{
"family": "Tasic",
"given": "Bosiljka"
},
{
"family": "Levi",
"given": "Boaz P"
},
{
"family": "Ting",
"given": "Jonathan T"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "3738",
"DOI": "10.1038/
"PMID": "42049725",
"PMCID": "PMC13125632",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
28
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.xgen.2025.100879 [code]
- Evaluating methods for the prediction of cell-type-specific enhancers in the mammalian cortex.Journal: Cell genomicsIn common: pysam, genetics / omics, mouse, 4 references, 5 authors
- [2] doi:10.1038/s41593-024-01774-5 [code]
- Integrated multimodal cell atlas of Alzheimer's disease.Journal: Nature neuroscienceIn common: pysam, genetics / omics, 3 references, 5 authors
- [3] doi:10.1038/s41586-025-09644-1 [code]
- Continuous cell-type diversification in mouse visual cortex development.Journal: NatureIn common: genetics / omics, mouse, 4 references, 5 authors
- [4] doi:10.1016/j.neuron.2025.04.035 [code]
- Enhancer AAV toolbox for accessing and perturbing striatal cell types and circuits.Journal: NeuronIn common: mouse, 12 references, 2 authors
- [5] doi:10.1038/s41586-021-03813-8 [code]
- Human neocortical expansion involves glutamatergic neuron diversification.Journal: NatureIn common: genetics / omics, mouse, 3 references, 5 authors
- [6] doi:10.1038/s41586-021-03465-8 [code]
- Comparative cellular analysis of motor cortex in human, marmoset and mouse.Journal: NatureIn common: pysam, genetics / omics, mouse, 5 references, 4 authors
- [7] doi:10.1038/s41586-023-06812-z [code]
- A high-resolution transcriptomic and spatial atlas of cell types in the whole mouse brain.Journal: NatureIn common: genetics / omics, mouse, 3 references, 4 authors
- [8] doi:10.1038/s41586-025-09296-1 [code]
- Transcriptomic and spatial organization of telencephalic GABAergic neurons.Journal: NatureIn common: genetics / omics, mouse, 2 references, 4 authors
- [9] doi:10.1038/s42003-026-09558-2 [code]
- HCN channels reveal conserved and divergent physiology in supragranular pyramidal neurons in primate species.Journal: Communications biologyIn common: genetics / omics, 5 references, 3 authors
- [10] doi:10.64898/2026.01.08.698257 [code]
- Human Neocortical Glutamatergic Neurons Revealed Through Multimodal ProfilingJournal: bioRxiv (preprint)In common: genetics / omics, 4 references, 3 authors
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 3 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:eba93e256be49cc8…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41467-026-72147-8)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-72147-8.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-72147-8
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-72147-8"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-72147-8.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
