Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
2ef285c
Adding necessary documents to making github.io page on my branch thro…
Feb 25, 2024
01e3f47
Including the pkgdown/favicon folder generated from the Package logo,…
Feb 25, 2024
c76b365
Small change to README.md to connect logo in it to the logo being use…
Feb 25, 2024
3937f16
Changing URL from my account to StatDivLab github.io
Feb 25, 2024
c0abc7c
Merge pull request #37 from MariaAVC/main
adw96 Feb 26, 2024
b07822d
Merge branch 'ailurophilia-main' into main
adw96 Mar 4, 2024
6b9c6c7
add test of use case; index version
adw96 Mar 4, 2024
81264be
updating `cluster` argument to be either a numeric, character, or fac…
svteichman Mar 10, 2024
e4ac3f9
start vignette for clustered data
svteichman Mar 11, 2024
32d610b
first draft of cluster vignette
svteichman Mar 13, 2024
cf850c4
remove ability of cluster to be input as the name of a variable in `d…
svteichman Mar 13, 2024
8bf29b8
Merge pull request #1 from svteichman/cluster
svteichman Mar 13, 2024
9331d3e
remove old code defining unused variable `cluster_name`
svteichman Mar 18, 2024
3990e3c
Merge pull request #2 from svteichman/cluster
svteichman Mar 18, 2024
2ef0c36
add parallel vignette
svteichman Mar 25, 2024
215b4ce
Adding `parallel` to suggests because it is used in a vignette
svteichman Mar 25, 2024
7522b31
add a check in vignette to check if we're on a windows machine
svteichman Mar 25, 2024
e4130a2
add comma to description
svteichman Mar 25, 2024
03d8b21
update vignette to only use results of mclapply if it is run
svteichman Mar 25, 2024
06e12eb
fix indentation in vignette
svteichman Mar 25, 2024
e73ad74
update `emuFit()` so that it won't run into error with `penalize = FA…
svteichman Apr 12, 2024
97788b7
Merge pull request #3 from svteichman/update_print
svteichman Apr 12, 2024
7b46b9b
add option to `emuFit()` to `return_nullB`, which is to return MLEs u…
svteichman Apr 12, 2024
e050e2b
add link in our README to github.io website in which documentation an…
svteichman Apr 18, 2024
7793922
minor edits; ready to merge
adw96 Apr 18, 2024
73e18f0
one more minor edit; ready to merge
adw96 Apr 18, 2024
26dc335
Merge pull request #42 from svteichman/parallel-vignette
adw96 Apr 18, 2024
f35152a
Merge branch 'statdivlab:main' into main
svteichman Apr 21, 2024
e9c77b2
make emuFit run with intercept only model
svteichman Apr 22, 2024
31c9cfa
add in ability to run intercept only model with X argument (not just …
svteichman Apr 22, 2024
4452777
trying to update git PAT to deal with actions issue
svteichman Apr 22, 2024
1b776a1
try to figure out actions issue
svteichman Apr 22, 2024
987175a
fix indentation in `score_test`
svteichman Apr 25, 2024
09f44a5
set score stat and p val under null information to `NA` instead of `0…
svteichman Apr 25, 2024
6404406
update the way score test coefficients are saved to allow for no ci's…
svteichman Apr 25, 2024
184e19c
if null fit cannot be optimized, return `NULL` for that score test an…
svteichman Apr 25, 2024
1332a46
fix error
svteichman Apr 25, 2024
db6f8ff
fix change made to `score_test` so that test can still be run when B0…
svteichman Apr 25, 2024
6b1f60e
try score stat, add warning if there is an error (presumably caused b…
svteichman Apr 25, 2024
05badb0
increase tolerance for test in "test-macro_fisher_null.R" to address …
svteichman Apr 26, 2024
600faec
increase tolerance in test in "test-macro_fisher_null.R" because this…
svteichman Apr 26, 2024
5cd5bf5
increase tolerance in test in "test-macro_fisher_null.R" because this…
svteichman Apr 26, 2024
63089bd
increase tolerance in test in "test-macro_fisher_null.R" because this…
svteichman Apr 26, 2024
8c5a3c7
include three vignettes that are ready for public use
svteichman Apr 26, 2024
88a0bb0
update phyloseq implementation to work with taxa as rows or columns
svteichman Apr 30, 2024
3300891
Merge pull request #46 from svteichman/update_readme
svteichman May 2, 2024
9b7013c
Merge branch 'main' into intercept-only
svteichman May 2, 2024
37a30c9
Merge pull request #50 from svteichman/intercept-only
svteichman May 2, 2024
8233b7c
Merge pull request #51 from svteichman/b0-convergence-failure
svteichman May 2, 2024
176b7dd
Merge pull request #53 from svteichman/fix_phyloseq_implementation
svteichman May 2, 2024
f15fe04
remove parallel vignette (it accidentally was committed at some point…
svteichman May 2, 2024
3feca52
Merge pull request #57 from svteichman/main
svteichman May 2, 2024
d25b707
first draft of cluster vignette
svteichman May 3, 2024
382aaca
add in object 'score_test_hyperparams' that is returned when score te…
svteichman May 13, 2024
e225cc7
minor edits to clustering vignette
adw96 May 16, 2024
e2650cc
add warning when estimation under the alternative fails, add warning …
svteichman May 16, 2024
9e8cb51
add optional argument B_null_list for user to input starting B estima…
svteichman May 16, 2024
2c2662e
fix a few tests
svteichman May 16, 2024
baf9a76
fix error in one of the added tests
svteichman May 16, 2024
dafe1a2
move code for simulating clustered data from cluster vignette to `sim…
svteichman May 16, 2024
e11bbb3
Merge pull request #58 from svteichman/cluster-vignette
svteichman May 16, 2024
5f80a15
Merge pull request #60 from svteichman/return-tau
svteichman May 17, 2024
134ba31
add update to re-order covariate data if it has different rownames to…
svteichman May 21, 2024
c1d693c
Merge pull request #62 from svteichman/add-rownames-warning
svteichman May 23, 2024
be9becf
update `simulate_data()` function so that it will work with `B` with …
svteichman Jun 10, 2024
8874bf6
set _R_CHECK_FORCE_SUGGESTS_ to false to avoid mac OS check failing d…
svteichman Jun 10, 2024
9b38c73
Merge pull request #63 from svteichman/update_simulate_data
svteichman Jun 10, 2024
4632b7c
add check to `emuFit()` to throw an error if any columns of `Y` (repr…
svteichman Jun 18, 2024
b67dc1e
start updating vignette
svteichman Jun 20, 2024
32d2419
update vignettes to remove a category with 0 counts across all samples
svteichman Jun 20, 2024
5f86d8b
Merge pull request #66 from svteichman/check_zero_categories
svteichman Jun 20, 2024
99f972a
Add z_hat nuisance parameters to output
gthopkins Jun 21, 2024
b2c8fc3
z_hat nuisance parameters provided whether or not penalty is applied
gthopkins Jun 24, 2024
2f79e2c
Merge pull request #68 from gthopkins/main
svteichman Jun 24, 2024
8d8b1ae
add option to set `constraint_fn` to a numeric, automatically choosin…
svteichman Jul 23, 2024
ae9a51d
move logo
svteichman Jul 23, 2024
ac21e07
Merge pull request #70 from svteichman/main
svteichman Jul 23, 2024
33443d3
Update emuFit.R
svteichman Jul 26, 2024
0f76c03
update "emuFit.Rd" based on fix to documentation to note that `verbos…
svteichman Jul 26, 2024
ea2cbbc
Merge pull request #72 from svteichman/main
svteichman Jul 26, 2024
fd56120
add in check for zero-comparison parameters when there is a single ca…
svteichman Aug 1, 2024
604bcb6
fix documentation of exactly what `remove_zero_comparison_pvals` does…
svteichman Aug 1, 2024
fad5171
change default of `remove_zero_comparison_pvals` from 0.05 to 0.01
svteichman Aug 2, 2024
f33d937
when `X` is created by `model.matrix()` use the attribute `assign` to…
svteichman Aug 2, 2024
196448f
minor fix, so that if using `emuFit()` with `fitted_model` object and…
svteichman Aug 5, 2024
3afcd2e
add small fix
svteichman Aug 5, 2024
1100576
Merge pull request #75 from svteichman/main
svteichman Aug 5, 2024
909851e
Merge pull request #74 from svteichman/check_zero_categories
svteichman Aug 7, 2024
603250a
Add plotting function for radEmu
gthopkins Aug 11, 2024
f6a8d6e
Responded to suggestions on PR #77
gthopkins Aug 19, 2024
8e074fa
Update DESCRIPTION to resolve conflicts
gthopkins Aug 19, 2024
f667f17
Merge branch 'main' into main
svteichman Aug 20, 2024
0054949
Merge pull request #77 from gthopkins/main
svteichman Aug 20, 2024
b9d03fc
set `zero_comparison = FALSE` for parameters that could be comparing …
svteichman Aug 27, 2024
3984f62
add `rlang`, which is used in new `plot` function
svteichman Aug 27, 2024
7251d3c
update test based on change to `zero_comparison_check` behavior
svteichman Aug 27, 2024
8ab0fd7
Merge pull request #79 from svteichman/check_zero_categories
svteichman Aug 27, 2024
3ab1fcb
Write plot.radEmu in NAMESPACE
gthopkins Sep 3, 2024
1881638
Adjust spacing to resolve merge conflict
gthopkins Sep 3, 2024
a99fda9
Manually call functions from dplyr and ggplot to avoid import conflict
gthopkins Sep 4, 2024
9ce0e77
Delete man/plot.radEmu.Rd
gthopkins Sep 4, 2024
223ca9f
Delete NAMESPACE
gthopkins Sep 4, 2024
6786205
Add files via upload
gthopkins Sep 4, 2024
182cf4b
Rename NAMESPACE.txt to NAMESPACE
gthopkins Sep 4, 2024
21ba1ad
Add files via upload
gthopkins Sep 4, 2024
b0726d2
Try to resolve merge conflicts
gthopkins Sep 4, 2024
49acdbc
Merge branch 'main' of https://github.com/gthopkins/radEmu
gthopkins Sep 4, 2024
96f2328
Resolve merge conflicts take 3
gthopkins Sep 4, 2024
34252a8
Re-write description file according to plot.radEmu dependencies
gthopkins Sep 4, 2024
48edf8a
Mistakenly forgot some functions that belong to ggplot and dplyr
gthopkins Sep 4, 2024
0ca6692
More functions from ggplot2
gthopkins Sep 4, 2024
3f9352b
Need to call function from ggplot2 in tests
gthopkins Sep 4, 2024
a1218c8
Rename function to plot_radEmu(), such that it does not refer to plot()
gthopkins Sep 4, 2024
12e6e05
Change function to S3 method for class "emuFit"
gthopkins Sep 4, 2024
cae1f18
Merge pull request #81 from gthopkins/main
svteichman Sep 4, 2024
227cdcb
Allow users to input data with a TreeSummarizedExperiment object
gthopkins Sep 19, 2024
6bf60c7
Document the changes
gthopkins Sep 19, 2024
f3c4b4e
Add test that forgetting the assay_name argument returns an error
gthopkins Sep 19, 2024
9ff687d
Add SummarizedExperiment to suggested dependencies
gthopkins Sep 19, 2024
d90adb0
Merge pull request #82 from gthopkins/main
svteichman Sep 19, 2024
94ab158
Adjust simulate data to match test
gthopkins Oct 9, 2024
8e1022a
Merge branch 'statdivlab:main' into main
gthopkins Oct 9, 2024
e76eef3
Adjust simulate_data() to match data generation used in testthat() ch…
gthopkins Oct 9, 2024
1176528
Revert simulate_data() back to old code until further discussion abou…
gthopkins Oct 9, 2024
a740ad8
Merge branch 'main' of https://github.com/gthopkins/radEmu
gthopkins Oct 9, 2024
e603d2b
Merge branch 'statdivlab:main' into main
gthopkins Oct 9, 2024
72fa58b
Revert simulate_data() to legacy code, postponed for later discussion
gthopkins Oct 9, 2024
2c34091
add option to bypass error about having categories with only zero counts
svteichman Oct 11, 2024
be6a51b
Merge pull request #87 from svteichman/unobserved_taxa
svteichman Oct 11, 2024
60897ad
Adjust simulate_data() to be for internal use only
gthopkins Oct 20, 2024
a6c86e4
Merge branch 'main' of https://github.com/gthopkins/radEmu
gthopkins Oct 20, 2024
bedad69
Merge branch 'statdivlab:main' into main
gthopkins Oct 20, 2024
59b2c5c
Check added to function emuFit_micro to ensure design matrix inputted…
Oct 22, 2024
2b2dccb
Merge pull request #93 from MariaAVC/RankCheck
gthopkins Oct 22, 2024
691ad50
Add tests to test_emuFit_micro comparing closed-form MPLEs to MPLE ob…
ailurophilia Oct 24, 2024
91336cf
Merge pull request #95 from ailurophilia/main
gthopkins Oct 24, 2024
5f0fea5
Change means of simulated data in testthat() functions
gthopkins Oct 27, 2024
9d71dd7
Create required testthat() objects as needed
gthopkins Oct 27, 2024
f2b52a7
Edit out non-descriptive, hardcoded test
gthopkins Oct 27, 2024
8007ac0
Further corrections to testthat() syntax
gthopkins Oct 27, 2024
9e91259
Adjust MPLE implementation to differ notably from MLE
gthopkins Oct 27, 2024
c3be909
Merge branch 'statdivlab:main' into main
gthopkins Oct 27, 2024
595e1cb
Add linguistic note discussed in PR #95
gthopkins Oct 27, 2024
9bbfe54
First implementation of the process to match row names between the tw…
Oct 27, 2024
6ea0cde
Some modifications in the row matching implementation. Added the logi…
Oct 28, 2024
138fa9a
Matching row names process finished and test for the process done as …
Oct 28, 2024
17371fc
Added row names to matrix X and Y in test-emuFit, to make sure all te…
Oct 28, 2024
8971b96
Running devtools:document() and devtools:check() to update documentation
Oct 28, 2024
a7c3aeb
Modifying messages on Row name matching process after helpful feedbac…
Oct 29, 2024
8acdfda
Add partially_verbose option
gthopkins Nov 4, 2024
ff9164e
Add documentation to include partially_verbose argument in emuFit
gthopkins Nov 4, 2024
cde1f1c
For now, hard-code old data. Can alternatively use old data generatin…
gthopkins Nov 4, 2024
116178a
add option to return score test components
svteichman Nov 22, 2024
210f17f
try to fix issue with mac-os and github actions related to homebrew bug
svteichman Nov 22, 2024
aa31895
try updating checkout to v4
svteichman Nov 22, 2024
4acedce
returning .yaml files to previous states as fixes didn't help
svteichman Nov 22, 2024
a7de668
Merge pull request #100 from svteichman/return_score_stat_info
svteichman Nov 22, 2024
49b50dc
Merge pull request #96 from MariaAVC/Comparing_rowNames
svteichman Nov 27, 2024
08652d2
add plot.emuFit function to vignettes
shirmath Dec 2, 2024
cc2ad1e
Merge branch 'main' of github.com:shirmath/radEmu
shirmath Dec 2, 2024
ab7f4c1
fix plotting code
shirmath Dec 2, 2024
94c4731
fix plot sizes, and extract only plots from plotting function object
shirmath Dec 2, 2024
64b06a5
Merge branch 'main' into main
gthopkins Dec 2, 2024
9c536e8
Merge pull request #101 from shirmath/main
svteichman Dec 3, 2024
b1b78c2
Update verbose argument to display only relevant messages
gthopkins Dec 3, 2024
e77fa27
Merge branch 'statdivlab:main' into main
gthopkins Dec 3, 2024
846f792
Merge pull request #92 from gthopkins/main
svteichman Dec 4, 2024
88f0d6c
add fit_null_repar, helper functions, and a test
ailurophilia Dec 8, 2024
b1a26e3
add tests comparing fit_null and fit_null_repar
ailurophilia Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$

^_pkgdown\.yml$
^pkgdown$
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: false
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
15 changes: 10 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
Package: radEmu
Title: Using Relative Abundance Data to Estimate of Multiplicative Differences in Mean Absolute Abundance
Version: 1.1.0.0
Version: 1.2.0.0
Authors@R: as.person(c(
"David Clausen <dsc24@uw.edu> [aut, cre]",
"Amy Willis [aut]",
"Sarah Teichman [aut]"
))
Description: A differential abundance method for the analysis of microbiome data. radEmu estimates fold-differences in the abundance of taxa across samples relative to "typical" fold-differences. Notably, it does not require pseudocounts, nor choosing a denominator taxon.
URL: https://github.com/statdivlab/radEmu, https://statdivlab.github.io/radEmu/
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Depends:
MASS,
Matrix,
methods,
magrittr,
rlang,
R (>= 2.10)
Suggests:
testthat (>= 3.0.0),
numDeriv,
phyloseq,
TreeSummarizedExperiment,
SummarizedExperiment,
knitr,
magrittr,
dplyr,
ggplot2,
dplyr,
ggplot2,
stringr,
parallel,
rmarkdown
Config/testthat/edition: 3
VignetteBuilder: knitr
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,emuFit)
S3method(print,emuFit)
export(emuFit)
export(emuFit_micro)
export(score_test)
import(MASS)
import(Matrix)
importFrom(magrittr,"%>%")
importFrom(methods,as)
importFrom(rlang,.data)
importFrom(stats,cov)
importFrom(stats,median)
importFrom(stats,model.matrix)
importFrom(stats,optim)
importFrom(stats,pchisq)
importFrom(stats,qnorm)
importFrom(stats,rbinom)
importFrom(stats,reorder)
importFrom(stats,rnbinom)
importFrom(stats,rnorm)
importFrom(stats,rpois)
importFrom(stats,setNames)
importFrom(stats,weighted.mean)
41 changes: 41 additions & 0 deletions R/d_l_aug_dB.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

d_l_aug_dB <- function(Bj,
Bj_constr_no_k_constr,
z,
Y,
X,
Bk_constr_no_j_j_constr,
k_constr,
j,
j_constr,
constraint_fn,
constraint_grad_fn){
#update parameter determined by null constraint
Bk_constr_j_constr <-
constraint_fn(c(Bk_constr_no_j_j_constr,
Bj[k_constr]))
#create object to store updated two columns of B (j and j_constr) in
Bj_j_constr <- cbind(Bj,0)

#update object with elements of B_j_constr not subject to null constraint
Bj_j_constr[-k_constr,2] <- Bj_constr_no_k_constr

#update object with element of B_j_constr subject to null constraint
Bj_j_constr[k_constr,2] <- Bk_constr_j_constr

#construct log means for Yj and Yj_constr
log_means <- X%*%Bj_j_constr + matrix(z,ncol = 1)%*%matrix(1,nrow = 1, ncol = 2)

#compute ll
deriv_j <- t(X)%*%(Y[,j,drop = FALSE] - exp(log_means[,1]))
deriv_j_constr <- t(X)%*%(Y[,j_constr,drop = FALSE] - exp(log_means[,2]))
constr_grad <- constraint_grad_fn(c(Bk_constr_no_j_j_constr,
Bj[k_constr]))
constr_grad <- constr_grad[length(constr_grad)]
deriv_j[k_constr] <- deriv_j[k_constr] + deriv_j_constr[k_constr]*constr_grad


#return ll
return(c(deriv_j,deriv_j_constr[-k_constr]))

}
Loading