Description Usage Arguments Value Author(s) Examples
Merge two CrisprSet objects sharing a reference and target location
1 2 3 4 5 | mergeCrisprSets(x, y, ...)
## S4 method for signature 'CrisprSet,CrisprSet'
mergeCrisprSets(x, y, ..., x.samples = NULL,
y.samples = NULL, names = NULL, order = NULL)
|
x |
A CrisprSet object |
y |
A second CrisprSet object |
... |
extra arguments |
x.samples |
A subset of column names or indices to keep from CrispRSet x (Default: NULL, i.e. keep all) |
y.samples |
A subset of column names or indices to keep from CrispRSet y (Default: NULL, i.e. keep all) |
names |
New names for the merged CrisprSet object (Default: NULL) |
order |
A list of sample names, matching the names in x and y, specifying the order of the samples in the new CrisprSet. (Not implemented yet) |
A merged CrisprSet object
Helen Lindsay
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Load the metadata table
md_fname <- system.file("extdata", "gol_F1_metadata_small.txt", package = "CrispRVariants")
md <- read.table(md_fname, sep = "\t", stringsAsFactors = FALSE)
# Get bam filenames and their full paths
bam_fnames <- sapply(md$bam.filename, function(fn){
system.file("extdata", fn, package = "CrispRVariants")})
reference <- Biostrings::DNAString("GGTCTCTCGCAGGATGTTGCTGG")
gd <- GenomicRanges::GRanges("18", IRanges::IRanges(4647377, 4647399),
strand = "+")
crispr_set1 <- readsToTarget(bam_fnames[c(1:4)], target = gd,
reference = reference, names = md$experiment.name[1:4], target.loc = 17)
crispr_set2 <- readsToTarget(bam_fnames[c(5:8)], target = gd,
reference = reference, names = md$experiment.name[5:8], target.loc = 17)
mergeCrisprSets(crispr_set1,crispr_set2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.