gRNAPlusPAM <- DNAString("ACGTACGTACGTACTGACGTCGG")
x <- DNAString("AAGCGCGATATGACGTACGTACGTACTGACGTCGG")
chrom.len <- nchar(as.character(x))
m <- matchPattern(gRNAPlusPAM, x)
names(m) <- "testing"
writeHits(gRNA = gRNAPlusPAM, seqname = "chr1",
matches = m, strand = "+", file = "exampleWriteHits.txt",
chrom.len = chrom.len, append = FALSE)
Run the code above in your browser using DataLab