OSCR

Technical and biological sources of noise confound multiplexed enhancer AAV screening.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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

  1. #!/usr/bin/env python3
  2. import pysam
  3. import argparse
  4. from collections import defaultdict
  5. def parse_args():
  6. parser = argparse.ArgumentParser(
  7. description="Extract CB, UMI, and 8bp barcodes from reads in a BAM file"
  8. )
  9. parser.add_argument(
  10. "-b", "--bam",
  11. required=True,
  12. help="Input filtered BAM file"
  13. )
  14. parser.add_argument(
  15. "-o", "--out",
  16. required=True,
  17. help="Output TSV file"
  18. )
  19. parser.add_argument(
  20. "-k", "--barcode_length",
  21. type=int,
  22. default=8,
  23. help="Barcode length (default: 8)"
  24. )
  25. parser.add_argument(
  26. "--whitelist",
  27. default=None,
  28. help="Optional file with valid barcodes (one per line)"
  29. )
  30. parser.add_argument(
  31. "--debug",
  32. action="store_true",
  33. help="Print first 10 reads and kmers for debugging"
  34. )
  35. return parser.parse_args()
  36. def load_whitelist(path):
  37. with open(path) as f:
  38. return set(line.strip().upper() for line in f if line.strip())
  39. def extract_kmers(seq, k):
  40. """Return all k-length substrings (kmers) from a sequence"""
  41. return {seq[i:i+k] for i in range(len(seq) - k + 1)}
  42. def main():
  43. args = parse_args()
  44. whitelist = None
  45. if args.whitelist:
  46. whitelist = load_whitelist(args.whitelist)
  47. bam = pysam.AlignmentFile(args.bam, "rb")
  48. counts = defaultdict(int)
  49. debug_count = 0
  50. for read in bam.fetch(until_eof=True):
  51. # Skip unmapped / secondary / supplementary reads
  52. if read.is_unmapped or read.is_secondary or read.is_supplementary:
  53. continue
  54. # Get CB / UB tags
  55. try:
  56. cb = read.get_tag("CB").replace("-1", "")
  57. umi = read.get_tag("UB")
  58. except KeyError:
  59. continue
  60. seq = read.query_sequence
  61. if seq is None:
  62. continue
  63. seq = seq.upper()
  64. kmers = extract_kmers(seq, args.barcode_length)
  65. if whitelist is not None:
  66. kmers = kmers & whitelist
  67. for bc in kmers:
  68. counts[(cb, umi, bc)] += 1
  69. # Optional debugging: print first 10 reads
  70. if args.debug and debug_count < 10:
  71. print(f"Read: {seq}")
  72. print(f"CB: {cb}, UMI: {umi}, kmers: {kmers}")
  73. debug_count += 1
  74. bam.close()
  75. # Write output TSV
  76. with open(args.out, "w") as out:
  77. out.write("CB\tUMI\tbarcode8bp\tread_count\n")
  78. for (cb, umi, bc), n in counts.items():
  79. out.write(f"{cb}\t{umi}\t{bc}\t{n}\n")
  80. print(f"Done! Output written to {args.out}")
  81. if __name__ == "__main__":
  82. main()

extract_cb_umi_barcode_from_bam.py, under CC-BY-4.0 · at the source

Overview

Authors: Avery C Hunker1, John K Mich1, Naz Taskin1, Amy Torkelson1, Trangthanh Cardenas1, Jean-Benoît Lalanne2, Joseph T Mahoney1, Darren Bertagnolli1, Anish Bhaswanth Chakka1, Rushil Chakrabarty1, Nicholas P Donadio1, Rebecca Ferrer1, Molly Gasperini3, Jeff Goldy1, Junitta Guzman1, Kelly Jin1, Shannon Khem1, Rana Kutsal1, Refugio A Martinez1, Dakota Newman1
and 15 other authorsNick 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
  1. Allen Institute for Brain Science, Seattle, WA USA
  2. Department of Genome Sciences, University of Washington, Seattle, WA USA
  3. Seattle Hub for Synthetic Biology, Seattle, WA USA
  4. Brotman Baty Institute for Precision Medicine, Seattle, WA USA
  5. Howard Hughes Medical Institute, Seattle, WA USA
  6. Allen Discovery Center for Cell Lineage Tracing, Seattle, WA USA
  7. Department of Neurological Surgery, University of Washington, Seattle, WA USA
  8. Department of Neurobiology & Biophysics, University of Washington, Seattle, WA USA
  9. Washington National Biomedical Research Center, Seattle, WA USA
Institutions: Allen Institute for Brain Science (United States); University of Washington (United States); Howard Hughes Medical Institute (United States); Brotman Baty Institute (United States)
Journal: Nature communications, volume 17, issue 1, article 3738
Dates: received 29 May 2025; accepted 8 April 2026; published online 28 April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-72147-8 · PMID 42049725 · PMCID PMC13125632 · OpenAlex W4406457060
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), human (organism), mouse (organism), clinical / translational (subfield)
Methods: Evoked potentials
Keywords: Genetic vectors, Expression systems, Gene expression profiling, High-throughput screening
MeSH: Dependovirus*, Enhancer Elements, Genetic*, Genetic Vectors*, Animals, Brain, HEK293 Cells, Humans, Mice (* major topic)
Topic: Photoacoustic and Ultrasonic Imaging (Biomedical Engineering, Engineering), according to OpenAlex
Funding: National Institutes of Health (1uf1mh128339-01)
Citations: cited by 2 papers (Europe PMC); 60 references in the paper

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

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: pysam (2 files)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
4 files
At the source:

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

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:

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://doi.org/10.1038/s41467-026-72147-8

BibTeX

@article{hunker2026technical,
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/s41467-026-72147-8},
url = {https://doi.org/10.1038/s41467-026-72147-8},
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/04/28
VL - 17
IS - 1
SP - 3738
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-72147-8
UR - https://doi.org/10.1038/s41467-026-72147-8
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-72147-8",
"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": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "3738",
"DOI": "10.1038/s41467-026-72147-8",
"PMID": "42049725",
"PMCID": "PMC13125632",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-72147-8",
"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 advances
In 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 methods
In 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 methods
In 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 methods
In 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 investigation
In 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 neuroscience
In 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 biology
In 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 neuroscience
In 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 reports
In common: pysam, genetics / omics, mouse, 3 references
[10] doi:10.1038/s41586-026-10512-9 [code]
Astrocyte glucocorticoid receptor signalling restricts neuronal plasticity.
Journal: Nature
In 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.

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: 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.