Skip to content

Commit

Permalink
Merge pull request #48 from suzannejin/master
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
suzannejin authored Sep 10, 2024
2 parents 0f0760e + 2f5b9c3 commit d7e629e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 26 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Description: The bioinformatic evaluation of gene co-expression often begins wit
License: GPL-2
LazyData: true
VignetteBuilder: knitr
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Encoding: UTF-8
Depends:
methods,
Expand Down
2 changes: 1 addition & 1 deletion R/3-shared-updateCutoffs.R
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ getPermutedTheta <-
#'
#' @param values A numeric vector.
#' @param cutoff A numeric value.
#' @direct A logical value. If \code{TRUE}, direct relationship is considered.
#' @param direct A logical value. If \code{TRUE}, direct relationship is considered.
#' @return The number of values greater or less than the threshold.
countValuesBeyondThreshold <- function(values, cutoff, direct){
if (direct){
Expand Down
36 changes: 25 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,22 @@ There are a few proportionality statistics available. Select one with the 'metri
```{r, eval = FALSE}
pr <- propr(
counts, # rows as samples, like it should be
metric = "rho", # or "phi", "phs", "cor", "vlr"
ivar = "clr", # or can use "iqlr" instead
metric = "rho", # or "phi", "phs", "vlr"
ivar = "clr", # or can use another gene as reference, by giving the name or index
alpha = NA, # use to handle zeros
p = 100 # used for updateCutoffs
p = 100 # used for permutation tests
)
```

You can determine the "signficance" of proportionality using a built-in permutation procedure. It tells estimates the false discovery rate (FDR) for any cutoff. This method can take a while to run, but is parallelizable.
You can determine the "signficance" of proportionality using a built-in permutation procedure. It estimates the false discovery rate (FDR) for any cutoff. This method can take a while to run, but is parallelizable.

```{r, eval = FALSE}
pr <- updateCutoffs(
pr,
cutoff = seq(0, 1, .05), # cutoffs at which to estimate FDR
ncores = 1 # parallelize here
number_of_cutoffs = 100, # number of cutoffs to estimate FDR
custom_cutoffs = NULL, # or specify custom cutoffs
tails = 1, # 1 or 2-tailed test
ncores = 4 # parallelize here
)
```

Expand All @@ -67,7 +69,8 @@ There are many ways to calculate partial correlations, with or without shrinkage
pr <- propr(
counts, # rows as samples, like it should be
metric = "pcor.bshrink", # partial correlation without shrinkage "pcor" is also available
p = 100 # used for updateCutoffs
ivar = "clr", # "clr" is recommended
p = 100 # used for permutation tests
)
```

Expand All @@ -76,9 +79,11 @@ You can also determine the "significance" of logratio partial correlations with
```{r, eval = FALSE}
pr <- updateCutoffs(
pr,
cutoff = seq(0, 1, .05), # cutoffs at which to estimate FDR
ncores = 1 # parallelize here
)
number_of_cutoffs = 100, # number of cutoffs to estimate FDR
custom_cutoffs = NULL, # or specify custom cutoffs
tails = 1, # 1 or 2-tailed test
ncores = 4 # parallelize here
)
```


Expand All @@ -91,7 +96,7 @@ pd <- propd(
counts,
group, # a vector of 2 or more groups
alpha = NA, # whether to handle zeros
p = 100, # used for updateCutoffs
p = 100, # used for permutation tests
weighted = TRUE # whether to weight log-ratios
)
```
Expand Down Expand Up @@ -128,6 +133,15 @@ Both functions return S4 objects. This package includes several helper functions

Use `getResults` to pipe to `ggplot2` for visualization.

We also provide accesory functions to get the significant pairs.
```{r, eval = FALSE}
?getSignificantResultsFDR
?getSignificantResultsFstat
?getAdjacencyFDR
?getAdjacencyFstat
?getCutoffFDR
?getCutoffFstat
```

## Ratio Methods

Expand Down
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,24 @@ the ‘metric’ argument.
``` r
pr <- propr(
counts, # rows as samples, like it should be
metric = "rho", # or "phi", "phs", "cor", "vlr"
ivar = "clr", # or can use "iqlr" instead
metric = "rho", # or "phi", "phs", "vlr"
ivar = "clr", # or can use another gene as reference, by giving the name or index
alpha = NA, # use to handle zeros
p = 100 # used for updateCutoffs
p = 100 # used for permutation tests
)
```

You can determine the “signficance” of proportionality using a built-in
permutation procedure. It tells estimates the false discovery rate (FDR)
for any cutoff. This method can take a while to run, but is
parallelizable.
permutation procedure. It estimates the false discovery rate (FDR) for
any cutoff. This method can take a while to run, but is parallelizable.

``` r
pr <- updateCutoffs(
pr,
cutoff = seq(0, 1, .05), # cutoffs at which to estimate FDR
ncores = 1 # parallelize here
number_of_cutoffs = 100, # number of cutoffs to estimate FDR
custom_cutoffs = NULL, # or specify custom cutoffs
tails = 1, # 1 or 2-tailed test
ncores = 4 # parallelize here
)
```

Expand All @@ -117,7 +118,8 @@ by compositional bias is “pcor.bshrink”.
pr <- propr(
counts, # rows as samples, like it should be
metric = "pcor.bshrink", # partial correlation without shrinkage "pcor" is also available
p = 100 # used for updateCutoffs
ivar = "clr", # "clr" is recommended
p = 100 # used for permutation tests
)
```

Expand All @@ -127,9 +129,11 @@ correlations with the built-in permutation approach.
``` r
pr <- updateCutoffs(
pr,
cutoff = seq(0, 1, .05), # cutoffs at which to estimate FDR
ncores = 1 # parallelize here
)
number_of_cutoffs = 100, # number of cutoffs to estimate FDR
custom_cutoffs = NULL, # or specify custom cutoffs
tails = 1, # 1 or 2-tailed test
ncores = 4 # parallelize here
)
```

## Differential Proportionality
Expand All @@ -142,7 +146,7 @@ pd <- propd(
counts,
group, # a vector of 2 or more groups
alpha = NA, # whether to handle zeros
p = 100, # used for updateCutoffs
p = 100, # used for permutation tests
weighted = TRUE # whether to weight log-ratios
)
```
Expand Down Expand Up @@ -182,6 +186,17 @@ functions that work for both the `propr` and `propd` output.

Use `getResults` to pipe to `ggplot2` for visualization.

We also provide accesory functions to get the significant pairs.

``` r
?getSignificantResultsFDR
?getSignificantResultsFstat
?getAdjacencyFDR
?getAdjacencyFstat
?getCutoffFDR
?getCutoffFstat
```

## Ratio Methods

COMING SOON!!
2 changes: 2 additions & 0 deletions man/countValuesBeyondThreshold.Rd

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

0 comments on commit d7e629e

Please sign in to comment.