Skip to content

UPDATE the BED to cover the 5' base where the genome holds it - #21

Merged
emattei merged 1 commit into
mainfrom
feat/paired-5p
Nov 9, 2026
Merged

emattei merged 1 commit into
mainfrom
feat/paired-5p

Conversation

@emattei

@emattei emattei commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

A U6 construct starts its transcript with a G, so a library is often ordered
as G plus the protospacer. That G is there for the promoter, not the design
-- but a genome holding one pairs with it like any other base, and the site
is then ten long rather than nine. The tool had no way to say which sites
those were.

guide_mapping.bed's interval now covers what pairs. One base longer
where the guide's 5' base does; on the minus strand 5' is the higher
coordinate, so that moves end rather than start. Verified against the
reference bases on both strands: the widened interval reads G + the 9-mer.

guide_genome_annotation.tsv's start/end do not move. spacer is
what they span, target_site is derived from them, and guide_annotation
joins on guide_id plus the four site columns -- shifting them would break
that join for every downstream table. The cut site does not move either way:
Cas9 cuts 3 bases 5' of the PAM, at the other end of the protospacer.

A new paired_5p column says where the two differ. TRUE, FALSE, or
empty -- three states, because a library of bare protospacers has no such
base to ask about, and neither does a match sitting too close to a contig
end for the base under it to have been read. Empty is not no.

On 500 9-mers against chr21: 3,954 of 20,398 PAM-bearing sites pair, so the
BED holds 3,954 ten-base rows and 16,444 nine-base ones, and every row's
interval agrees with its table row to the base.

🤖 Generated with Claude Code

A U6 construct starts its transcript with a G, so a library is often
ordered as G plus the protospacer. The G is there for the promoter, but a
genome holding one pairs with it like any other base, and the site is
then ten long rather than nine.

The BED's interval now covers what pairs: one base longer where the 5'
base does, and on the minus strand that moves end rather than start. The
table's start and end stay on the declared protospacer, which spacer,
target_site and guide_annotation's join are all built on, and a new
paired_5p column says where the two differ. It has three states, so a
library of bare protospacers says nothing rather than no, and so does a
match that sat too close to a contig end to read the base under it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@emattei
emattei merged commit 3d95901 into main Nov 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant