Commit c463ae9a authored by tekath's avatar tekath
Browse files

DTUrtle 1.0.2 - minor changes.

parent 982f6006
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Package: DTUrtle
Type: Package
URL: https://github.com/TobiTekath/DTUrtle, https://tobitekath.github.io/DTUrtle
Title: Differential Transcript Usage analysis of bulk and single-cell RNA-seq data
Version: 1.0.1
Version: 1.0.2
Authors@R: c(person(given = "Tobias", family = "Tekath", role = c("aut", "cre"), email = "tobias.tekath@wwu.de", comment = c(ORCID = "0000-0002-9315-5452")))
Description: Easily perform and visualize Differential Transcript Usage (DTU) analysis for bulk or single-cell RNA-seq data, utilizing transcript level quantification counts.
License: GPL (>= 3) + file LICENSE
+4 −0
Original line number Diff line number Diff line
@@ -256,6 +256,7 @@ check_unique_by_partition <- function(df, partitioning, columns=NULL){
    for(part in partitioning){
        dat <- df[part, cols, drop=FALSE]
        cols <- cols[apply(dat, 2, function(x){all(x == x[1])})]
        cols <- cols[!is.na(cols)]
        if(length(cols)==0){
            return(NULL)
        }
@@ -286,12 +287,15 @@ get_by_partition <- function(df, partitioning, FUN, columns=NULL, simplify=TRUE,
    if(!is.null(columns)){
        assertthat::assert_that(all(columns %in% colnames(df)))
        df <- df[,columns,drop=FALSE]
        factor_columns <- which(sapply(df,is.factor))
        df[,factor_columns,drop=FALSE] <- apply(df[,factor_columns,drop=FALSE], 2, as.character)
    }
    if(!BiocParallel::bpisup(BPPARAM)){
        BiocParallel::bpstart(BPPARAM)
    }
    ret <- BiocParallel::bpaggregate(df, by=list(rep(names(partitioning), lengths(partitioning))), FUN=FUN,  simplify=simplify, drop=TRUE, BPPARAM = BPPARAM)
    BiocParallel::bpstop(BPPARAM)
    ret[,factor_columns,drop=FALSE] <- apply(ret[,factor_columns,drop=FALSE], 2, as.factor)
    return(ret)
}

+4 −0
Original line number Diff line number Diff line
@@ -796,6 +796,10 @@ plot_transcripts_view <- function(dturtle, genes=NULL, gtf, genome, one_to_one=N
    BiocParallel::bpprogressbar(BPPARAM) <- TRUE
  }

  if(!is.null(savepath) && !dir.exists(savepath)){
    dir.create(file.path(savepath), recursive = TRUE)
  }

  message("Creating ", length(valid_genes), " plots:")
  if(!BiocParallel::bpisup(BPPARAM)){
    BiocParallel::bpstart(BPPARAM)