Commit 1681204e authored by Ilya Korsunsky's avatar Ilya Korsunsky
Browse files

changed name to Presto

parent 57150900
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
Package: presto
Package: Presto
Title: Fast Functions for Differential Expression using Wilcox and AUC
Version: 0.99.0
Authors@R: c(
+1 −1
Original line number Diff line number Diff line
@@ -33,4 +33,4 @@ importFrom(stats,p.adjust)
importFrom(stats,pnorm)
importFrom(stats,wilcox.test)
importFrom(utils,head)
useDynLib(presto)
useDynLib(Presto)
+4 −4
Original line number Diff line number Diff line
#' presto
#' Presto
#' 
#' Fast differential expression
#' 
#' @name presto
#' @name Presto
#' @docType package
#' @useDynLib presto
#' @useDynLib Presto
#' @import Rcpp 
#' @importClassesFrom Matrix dgCMatrix dgTMatrix dgeMatrix TsparseMatrix
#' @importFrom methods as is
+41 −24
Original line number Diff line number Diff line
@@ -14,19 +14,11 @@ NULL


tidy_results <- function(wide_res, features, groups) {
    res <- Reduce(cbind,
        lapply(names(wide_res), function(label) {
            res <- wide_res[[label]]
            colnames(res) <- paste(label, groups, sep = '.')
            res
        })) %>% data.frame()
    res$feature <- features
    res %>% 
        reshape2::melt(id.vars = c('feature')) %>% 
        # tidyr::gather(key, val, -feature) %>% 
        tidyr::separate(.data$variable, c('metric', 'group'), '[[.]]') %>% 
        tidyr::spread(.data$metric, .data$value) %>% 
        dplyr::select(
    res <- Reduce(cbind, lapply(wide_res, as.numeric)) %>% data.frame() 
    colnames(res) <- names(wide_res)
    res$feature <- rep(features, length(groups))
    res$group <- rep(groups, length(features))
    res <- res %>% dplyr::select(
        .data$feature, 
        .data$group, 
        .data$avgExpr, 
@@ -38,6 +30,31 @@ tidy_results <- function(wide_res, features, groups) {
        .data$pct_in, 
        .data$pct_out
    )
    
    # res <- Reduce(cbind,
    #     lapply(names(wide_res), function(label) {
    #         res <- wide_res[[label]]
    #         colnames(res) <- paste(label, groups, sep = '.')
    #         res
    #     })) %>% data.frame()
    # res$feature <- features
    # res %>% 
    #     reshape2::melt(id.vars = c('feature')) %>% 
    #     # tidyr::gather(key, val, -feature) %>% 
    #     tidyr::separate(.data$variable, c('metric', 'group'), '[[.]]') %>% 
    #     tidyr::spread(.data$metric, .data$value) %>% 
    #     dplyr::select(
    #         .data$feature, 
    #         .data$group, 
    #         .data$avgExpr, 
    #         .data$logFC, 
    #         .data$statistic, 
    #         .data$auc, 
    #         .data$pval, 
    #         .data$padj, 
    #         .data$pct_in, 
    #         .data$pct_out
    #     )
}


+5 −5
Original line number Diff line number Diff line
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/presto-package.R
% Please edit documentation in R/Presto-package.R
\docType{package}
\name{presto}
\alias{presto}
\alias{presto-package}
\title{presto}
\name{Presto}
\alias{Presto}
\alias{Presto-package}
\title{Presto}
\description{
Fast differential expression
}
Loading