X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=rsem-gen-transcript-plots;h=01bc9bd6d60647b4cf7929ee2c9efad661a85e39;hp=552632a5534272dacba75f68accadbe24ffc7367;hb=672ce6113b1d773a4a6020b42cfb58a0a873fdec;hpb=5bb90b428311e169e8ca713ea3d6d33846c53f49 diff --git a/rsem-gen-transcript-plots b/rsem-gen-transcript-plots index 552632a..01bc9bd 100755 --- a/rsem-gen-transcript-plots +++ b/rsem-gen-transcript-plots @@ -76,7 +76,11 @@ generate_a_page <- function(tids, gene_id = NULL) { vec <- readdepth_uniq[[tids[i]]] stopifnot(!is.null(vec)) if (is.na(vec[[2]])) wiggle_uniq <- rep(0, vec[[1]]) else wiggle_uniq <- as.numeric(unlist(strsplit(vec[[2]], split = " "))) -# stopifnot(len == length(wiggle_uniq), len == sum(wiggle >= wiggle_uniq)) + stopifnot(len == length(wiggle_uniq)) + if (len != sum(wiggle >= wiggle_uniq)) { + cat("Warning: transcript ", tids[i], " has position(s) that read covarege with multireads is smaller than read covarge without multireads.\n", " The 1-based position(s) is(are) : ", which(wiggle < wiggle_uniq), ".\n", " This may be due to floating point arithmetics.\n", sep = "") + } + heights <- rbind(wiggle_uniq, wiggle - wiggle_uniq) barplot(heights, space = 0, border = NA, names.arg = 1:len, col = c("black", "red")) }