Skip to content

Commit

Permalink
plotting functions work with CIRI2
Browse files Browse the repository at this point in the history
  • Loading branch information
retaj committed Mar 9, 2017
1 parent 125c8ab commit 66e6fdd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
9 changes: 8 additions & 1 deletion R/visualize.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,14 @@ setMethod("uniqReadsQC",
signature("RangedSummarizedExperiment"),
definition=function(se, sample) {

if (sample != "all" & !(sample %in% colnames(se))) stop(sample, ' is not a valid sample.')
# this makes sense only for find_circ analyses,
# CIRI does not report unique reads
if (!("circ.uniq" %in% names(assays(se)))) {
stop('circ.uniq assay does not exist')
}
if (sample != "all" & !(sample %in% colnames(se))) {
stop(sample, ' is not a valid sample.')
}

SMPL <- sample
if (sample == "all") {
Expand Down
14 changes: 7 additions & 7 deletions inst/scripts/test_load_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ cdata <- data.frame(sample=c("riboz", "RNaseR"),
filename=c("inst/extdata/ciri_demo_hek/HEK_riborezo_CIRI_sites.txt",
"inst/extdata/ciri_demo_hek/HEK_RNaseR_CIRI_sites.txt"))

colData <- cdata
keep.linear <- TRUE
wobble <- 1
subs <- "all"
qualfilter <- FALSE
keepCols <- 1:12
# colData <- cdata
# keep.linear <- TRUE
# wobble <- 1
# subs <- "all"
# qualfilter <- FALSE
# keepCols <- 1:12


circs.se <- summarizeCircs(colData = cdata, keep.linear = FALSE, wobble = 1, subs = "all", qualfilter = FALSE, keepCols = 1:12)
Expand All @@ -31,7 +31,7 @@ circs.se <- annotateCircs(se = circs.se, annot.list = annot.list, assembly = "hg

histogram(circs.se, 0.5)
annotPie(circs.se, 0.02)
uniqReadsQC(circs.se, "D0")
uniqReadsQC(circs.se, "all")

# development
#library(data.table)
Expand Down

0 comments on commit 66e6fdd

Please sign in to comment.