Skills

Bioconductor Crisprbase

Provides S4 classes for general nucleases, CRISPR nucleases, CRISPR nickases, and base...

Install

npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-crisprbase -g -a claude-code -y
Category
Engineering
Updated
5mo ago
License
See repository
Context cost
Lightabout 1,329 tokens
Runs scripts
No, instructions only

What it does

Provides S4 classes for general nucleases, CRISPR nucleases, CRISPR nickases, and base editors.Several CRISPR-specific genome arithmetic functions are implemented to help extract genomic coordinates of spacer and protospacer sequences. Commonly-used CRISPR nuclease objects are provided that can be readily used in other packages. Both DNA- and RNA-targeting nucleases are supported.

crisprBase

Workflows

Standard Workflow

Define and manipulate S4 classes representing restriction enzymes, CRISPR nucleases, base editors, and nickases.

library(crisprBase)

# 1. Define SpCas9 Nuclease (3' PAM)
SpCas9 <- CrisprNuclease(
  "SpCas9", 
  targetType = "DNA",
  pams = c("(3/3)NGG", "(3/3)NAG", "(3/3)NGA"),
  weights = c(1, 0.2593, 0.0694),
  pam_side = "3prime", 
  spacer_length = 20
)

# 2. Define AsCas12a Nuclease (5' PAM)
AsCas12a <- CrisprNuclease(
  "AsCas12a", 
  targetType = "DNA",
  pams = "TTTV(18/23)",
  pam_side = "5prime", 
  spacer_length = 23
)

# 3. Define a Cytosine Base Editor (BE4max) with custom editing weights
weightsFile <- system.file("be/b4max.csv", package = "crisprBase", mustWork = TRUE)
ws <- t(read.csv(weightsFile))
ws <- as.data.frame(ws)
colnames(ws) <- ws["Position", ]
ws <- ws[-c(match("Position", rownames(ws))), , drop = FALSE]
ws <- as.matrix(ws)

BE4max <- BaseEditor(
  SpCas9, 
  baseEditorName = "BE4max",
  editingStrand = "original", 
  editingWeights = ws, 
  scale = TRUE
)

# 4. Define CRISPR Nickases (Cas9D10A)
Cas9D10A <- CrisprNickase(
  "Cas9D10A", 
  nickingStrand = "opposite", 
  pams = c("(3)NGG", "(3)NAG", "(3)NGA"),
  weights = c(1, 0.2593, 0.0694),
  pam_side = "3prime", 
  spacer_length = 20
)

Note on inputs/outputs: Input is nuclease specifications and weight files; output is S4 objects representing custom CRISPR nucleases, base editors, and nickases.

Read the whole SKILL.md on GitHub

More in Engineering