mergeCrisprSets: Merge two CrisprSets

Description Usage Arguments Value Author(s) Examples

Description

Merge two CrisprSet objects sharing a reference and target location

Usage

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)

Arguments

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)

Value

A merged CrisprSet object

Author(s)

Helen Lindsay

Examples

 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)

markrobinsonuzh/CrispRVariants documentation built on May 21, 2019, 12:23 p.m.