Commit 7a6dd7d5 authored by Ilya Korsunsky's avatar Ilya Korsunsky
Browse files

removed tibble dependency

parent 6f1049f6
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -19,8 +19,9 @@ test_that('presto::wilcoxauc gives same results as stats::wilcox.test', {
        return(res)
        return(res)
    })
    })
    res_base_r <- Reduce(rbind, lapply(names(res_base_r), function(group) {
    res_base_r <- Reduce(rbind, lapply(names(res_base_r), function(group) {
        res_base_r[[group]] %>% data.frame() %>% 
        .res <- res_base_r[[group]] %>% data.frame() 
            tibble::rownames_to_column('feature') %>% 
        .res$feature <- row.names(.res)
        .res <- .res %>%     
            dplyr::mutate(group = group)
            dplyr::mutate(group = group)
    })) %>% 
    })) %>% 
        dplyr::select(feature, group, statistic, p.value)
        dplyr::select(feature, group, statistic, p.value)
+6 −5
Original line number Original line Diff line number Diff line
@@ -86,7 +86,8 @@ head(wilcoxauc(object_seurat, 'cell_type'))


```
```


Seurat supports multiple assay types. This can be specified with `seurat_assay`.
Seurat supports multiple assay types. This can be specified with 
`seurat_assay`.


```{r}
```{r}
head(wilcoxauc(object_seurat, 'cell_type', seurat_assay = 'RNA'))
head(wilcoxauc(object_seurat, 'cell_type', seurat_assay = 'RNA'))
@@ -155,8 +156,8 @@ head(wilcoxauc(exprs, y))


## Top markers
## Top markers


We often find it helpful to summarize what the most distinguishing features are
We often find it helpful to summarize what the most distinguishing features
in group. 
are in each group. 


```{r}
```{r}
res <- wilcoxauc(exprs, y)
res <- wilcoxauc(exprs, y)
@@ -196,8 +197,8 @@ head(wilcoxauc(exprs_sparse, y))
## groups_use
## groups_use


Sometimes, you don't want to test all groups in the dataset against all other 
Sometimes, you don't want to test all groups in the dataset against all other 
groups. For instance, I want to compare only observations in group 'A' to those
groups. For instance, I want to compare only observations in group 'A' to
in group 'B'. This is achieved with the groups_use argument. 
those in group 'B'. This is achieved with the groups_use argument. 


```{r}
```{r}
res_AB <- wilcoxauc(exprs, y, groups_use = c('A', 'B'))
res_AB <- wilcoxauc(exprs, y, groups_use = c('A', 'B'))