Technical and biological sources of noise confound multiplexed enhancer AAV screening.
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: 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 Publishing Group},
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 Publishing Group
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 Publishing Group",
"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.1126/sciadv.adz6517 [code]
- Corticosterone-linked microglial activity underpins sexually dimorphic neuroplasticity after ketamine anesthesia.Journal: Science advancesIn common: mouse, 1 reference, 2 authors
- [2] doi:10.1038/s41592-026-03076-z [code]
- Neuropixels Opto: combining high-resolution electrophysiology and optogenetics.Journal: Nature methodsIn common: mouse, 3 references, author Jonathan T Ting
- [3] doi:10.1016/j.crmeth.2026.101309
- CBLN2 promoter enables genetic access to wide-field neurons of the tree shrew superior colliculus.Journal: Cell reports methodsIn common: 6 references
- [4] doi:10.1038/s41592-026-03057-2 [code]
- CREsted: modeling genomic and synthetic cell-type-specific enhancers across tissues and species.Journal: Nature methodsIn common: pysam, genetics / omics, mouse, 4 references
- [5] doi:10.1172/jci196689 [code]
- AAV-mediated gene therapy demonstrates phenotypic rescue in a mouse model of Cockayne syndrome.Journal: The Journal of clinical investigationIn common: mouse, 5 references
- [6] doi:10.1038/s41593-026-02253-9 [code]
- Genoarchitecture and input-output organization of the mouse basal ganglia and thalamic parafascicular nucleus.Journal: Nature neuroscienceIn common: mouse, 2 references, author Shenqin Yao
- [7] doi:10.1186/s13059-026-04177-w [code]
- Genomic sequence evolution underlying human neocortical interareal diversification.Journal: Genome biologyIn common: pysam, genetics / omics, mouse, 4 references
- [8] doi:10.1038/s41593-026-02376-z [code]
- A framework for comparative analysis of human and mouse cortical neuron dendrites in corresponding brain regions.Journal: Nature neuroscienceIn common: mouse, 5 references
- [9] doi:10.1016/j.celrep.2026.117073 [code]
- Single-cell epigenomics uncovers heterochromatin instability and transcription factor dysfunction during mouse brain aging.Journal: Cell reportsIn common: pysam, genetics / omics, mouse, 3 references
- [10] doi:10.1038/s41586-026-10512-9 [code]
- Astrocyte glucocorticoid receptor signalling restricts neuronal plasticity.Journal: NatureIn common: pysam, mouse, 3 references
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:9d2a9cbcf71dca49…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
