Skip to content

Commit

Permalink
Merge pull request #47 from bartongroup/development
Browse files Browse the repository at this point in the history
Critical bugfix #46
  • Loading branch information
fruce-ki authored Feb 16, 2018
2 parents fe87aca + ced1a71 commit 20018b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: rats
Version: 0.6.1
Date: 2018-02-15
Version: 0.6.2
Date: 2018-02-16
Title: Relative Abundance of Transcripts
Encoding: UTF-8
Authors: c(person("Kimon Froussios", role=c("aut"), email="k.froussios@dundee.ac.uk"),
Expand Down
5 changes: 3 additions & 2 deletions R/rats.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ call_DTU <- function(annot= NULL, TARGET_COL= "target_id", PARENT_COL= "parent_i

#---------- INTER-REPLICATE VARIABILITY BOOTSTRAP


if (rboot) {
if (verbose)
message("Bootstrapping replicates...")
Expand All @@ -263,14 +263,15 @@ call_DTU <- function(annot= NULL, TARGET_COL= "target_id", PARENT_COL= "parent_i
myprogress <- utils::txtProgressBar(min = 0, max = numpairs, initial = 0, char = "=", width = NA, style = 3, file = stderr())

repres <- lapply(1:numpairs, function(p) { # Single-threaded. Forking happens within calculate_DTU().

# Update progress.
if (verbose)
setTxtProgressBar(myprogress, p)

# Grab a replicate from each condition.
# Scale it up for the number of samples. A.K.A. "what if all my samples were identical and like this one".
counts_A <- as.data.table( count_data_A[[ names(count_data_A)[pairs[[p]][1]] ]] ) * resobj$Parameters$num_replic_A
counts_B <- as.data.table( count_data_A[[ names(count_data_B)[pairs[[p]][2]] ]] ) * resobj$Parameters$num_replic_B
counts_B <- as.data.table( count_data_B[[ names(count_data_B)[pairs[[p]][2]] ]] ) * resobj$Parameters$num_replic_B

# Do the work.
pout <- calculate_DTU(counts_A, counts_B, tx_filter, test_transc, test_genes, "short", abund_thresh, p_thresh, dprop_thresh, correction, threads)
Expand Down
2 changes: 1 addition & 1 deletion R/results.R
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ plot_overview <- function(dtuo, type="volcano") {
#' @param dtuo A DTU object.
#' @param type Type of plot. \itemize{
#' \item{"cormat" - Pairwise Pearson's correlation matrix among samples.}
#'
#' }
#' @return A ggplot2 object. Simply display it or you can also customize it.
#' @import data.table
#' @import ggplot2
Expand Down
4 changes: 4 additions & 0 deletions man/plot_diagnostics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20018b6

Please sign in to comment.