AlignmentsExperimentSet-class: An S4 class to represent alignments from multiple experiments

Description Usage Arguments Value Slots View alignments Coercion based on events Examples

Description

Class AlignmentsExperimentSet holds data from multiple alignments for many experiments. Allows to examine alignments in great detail.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
AlignmentsExperimentSet(...)

## S4 method for signature 'AlignmentsExperimentSet'
length(x)

## S4 method for signature 'AlignmentsExperimentSet'
fwdReads(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
fwdReads(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
rveReads(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
rveReads(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
fwdReadsType(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
fwdReadsType(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
rveReadsType(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
rveReadsType(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
unassignedData(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
unassignedData(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
readCounts(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
readCounts(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
experimentData(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
experimentData(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
barcodeData(x)

## S4 replacement method for signature 'AlignmentsExperimentSet'
barcodeData(x) <- value

## S4 method for signature 'AlignmentsExperimentSet'
unassignedCount(x)

## S4 method for signature 'AlignmentsExperimentSet'
assignedCount(x)

## S4 method for signature 'AlignmentsExperimentSet'
names(x)

## S4 method for signature 'AlignmentsExperimentSet'
c(x, ...)

## S4 method for signature 'AlignmentsExperimentSet,numeric,missing,missing'
x[i, j, ...,
  drop = TRUE]

## S3 method for class 'AlignmentsExperimentSet'
as.list(x, ...)

## S4 method for signature 'AlignmentsExperimentSet'
x$name

## S4 method for signature 'AlignmentsExperimentSet'
writeAlignments(x, file = "",
  aln_format = "txt")

## S4 method for signature 'AlignmentsExperimentSet'
lookupAlignment(x, ID, read_id = 1)

## S4 method for signature 'AlignmentsExperimentSet'
extractEvents(object,
  use_parallel = FALSE)

Arguments

...

pass any number of AlignmentsExperimentSet objects, make sure experiment IDs can be unique after merging

x, object

(AlignmentsExperimentSet)

value

Represents assignment values for setter methods.

i, j, name, drop

(numeric, missing, character, missing) AlignmentsExperimentSet object can be subsetted using names of the experiments eg. x$name or x[i], resulting in AlignmentsExperimentSet object that has only one experiment. During this subsetting, values of unassignedData and barcodeData are dropped.

file

(connection or string) Destination file. When empty, defaults to standard output.

aln_format

("txt" or "fasta") Specifies format of the file.

ID

(string) Experiment Identifier

read_id

(numeric) Read Identifier. Reads are sorted by frequency. Defaults to 1, most abundant read.

use_parallel

(boolean) When using extractEvents you can use multicore back-end through register as this is very slow function (despite vectorization).

Value

depending on the function used

Slots

fwdReads,rveReads

(list) Named list where each element is of class PairwiseAlignmentsSingleSubject. Names correspond to the experiment ID. Contains alignments of reads against amplicons.

fwdReadsType,rveReadsType

(list) Named list where each element is of logical vector, so far TRUE corresponds to HDR events. Names correspond to the experiment ID. Contains type of read - HDR/NHEJ.

readCounts

(list) Named list where each element is numeric vector that describes how many reads are compressed into unique representation before alignment in fwdReads and/or rveReads.

unassignedData

(data.frame) Contains reads that failed to be assigned to any of the experiments. Alignment of forward against reverse reads may give hint whether these reads are compromised in any way.

experimentData

(data.frame) Expands on configuration file and provides information about cut rates, frameshifts, PRIMER DIMER detection etc. Each row corresponds to experiment ID.

barcodeData

(data.frame) Information that is gathered on the barcode level is gathered in this data.frame, mainly quality filtering statistics.

View alignments

Write out all alignments in "fasta" or "txt" format.:
writeAlignments(x, file = "", aln_format = "txt")

Write out human readable alignments for given experiment and read_id.:
lookupAlignment(x, ID, read_id = 1)

Coercion based on events

Coerce to data.frame compatible with GRanges .:
as.data.frame(x)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
exampleAlignments <- Biostrings::pairwiseAlignment(
  Biostrings::DNAStringSet(c("ACTGACTG", "CGACGACG")), "ACGTACGTACGT")
new("AlignmentsExperimentSet",
     fwdReads = list(ID_1 = exampleAlignments, ID_2 = exampleAlignments),
     rveReads = list(ID_1 = exampleAlignments, ID_2 = exampleAlignments),
     fwdReadsType = list(ID_1 = c(FALSE, FALSE), ID_2 = c(FALSE, FALSE)),
     rveReadsType = list(ID_1 = c(FALSE, FALSE), ID_2 = c(FALSE, FALSE)),
     readCounts = list(ID_1 = c(2, 20), ID_2 = c(30, 100)),
     unassignedData = NULL,
     experimentData = data.frame(ID = c("ID_1", "ID_2"),
                                 Barcode = c("B1", "B1"),
                                 whatever = c(50, 100)),
     barcodeData = data.frame(Barcode = "B1", statistic1 = 100))
# Coercion
extractEvents(AlignmentsExperimentSet())
GenomicRanges::GRanges(extractEvents(AlignmentsExperimentSet()))

amplican documentation built on Nov. 8, 2020, 11:10 p.m.