Coder Social home page Coder Social logo

threewaytest's Introduction


License: GPL-3
R build status

Authors: Deliang Bu

README updated: Mar-08-2023

Introduction

This Repository contains code and simulation for Three way test in submitted paper.

ThreeWayTest: Three Way Test for Identifying Pleiotropy

Summary statistics-based association test for identifying the pleiotropic effects with sets of genetic variants.

If you use ThreeWayTest, please cite:

author1, author2, author3 (publicationYear) articleTitle, journalName; volumeNumber, linkToPublication

Installation

if(!require("remotes")) install.packages("remotes")

remotes::install_github("bschilder/ThreeWayTest")
library(ThreeWayTest)

Documentation


Contact

For any more detailed questions, please contact: [email protected]


threewaytest's People

Contributors

bschilder avatar ftdbdl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

ftdbdl

threewaytest's Issues

Update DESCRIPTION file

The DESCRIPTION file contains info about the package, its dependencies and authors.

I've added the dependencies for you, so you should just need to update the Title and Authors@R

Improve function/data documentation

Functions

Functions are currently located in R/functions.R

Function documentation in the Roxygen notes should be fully fleshed out to include informative titles and descriptions of each function, as well as for each parameter in each function. See here for tutorial on how to do this:
https://r-pkgs.org/man.html

Data

Built-in data should also be documented. Documentation for these objects can be found in:
R/data.R

Shorten width of documentation `examples`

 Rd file 'TWT.Rd':
    \examples lines wider than 100 characters:
       coefficient_matrix<-ThreeWayTest::approximate_distribution_coefficient_estimate_T3(null_distribution)
  
  Rd file 'T_3.Rd':
    \examples lines wider than 100 characters:
       coefficient_matrix<-ThreeWayTest::approximate_distribution_coefficient_estimate_T3(null_distribution)
  

Easy fix, just add newlines to make the line widths <80 characters. Helps readability. Did the same for all Roxygen notes.

Optimise data compression

https://github.com/bschilder/ThreeWayTest/actions/runs/4313767916/jobs/7526122915#step:4:5962

checking LazyData ... WARNING
    LazyData DB of 7.8 MB without LazyDataCompression set
    See §1.1.6 of 'Writing R Extensions'checking data for ASCII and uncompressed saves ... WARNING
    
    Note: significantly better compression could be obtained
          by using R CMD build --resave-data
                               old_size new_size compress
    covariance_matrix_data.rda    1.3Mb    896Kb       xz
    data_matrix_final.rda         6.2Mb    3.9Mb       xz
    gene_length_list.rda           16Kb     11Kb       xz
    gene_list.rda                  73Kb     54Kb    bzip2
    selected_genotype.rda          14Kb      5Kb       xz

The latter warning is fixed by running the following (solution found here):

f=list.files('data', full.names = T)
tools::resaveRdaFiles(f)

`new_method`: `p_1`,`p_2` variable undefined

Here, the variables p_1 and p_2 are not defined within the scope of the function. This means that the function will fail if these are not defined as global variables in your environment. The correct way to do this is to pass these variables to the function via an argument, or to compute them within the function.

final_p_vec<-c(p_1,p_2,p_3)

Improve function efficiency

Some key ways to generally improve the efficiency of your code:

  • Use lapply or Reduce instead of for loops where possible.
  • Use data.tables instead of data.frames and take advantage of their speedy vectorized transformations.
  • Consider parallelizing steps across multiple cores for speed boosts (e.g. via the parallel package). I'll leave it to you to decide whether (and where) you'd like to implement this.

Add unit tests

Adding unit tests is a great way to ensure your code always works as expected. It will also improve your code coverage, which is a metric that get displayed as a badge in your README (see here for an example):

Screenshot 2023-02-17 at 15 03 12

testthat is my preferred methods for implementing unit tests.
See here for some examples.

Remove instructions from README once done reading

The README comes from templateR and is mean to provide instructions to developers on how to use this template. Once you're familiar with the instructions, you can delete the parts within the brackets:

"<—(Start of section that can be deleted after forking the template)—>"

Rename "getting started" vignette

For "getting started" vignettes, the convention is to name the file the same as your package name. So I changed:

getting_started.Rmd to ThreeWayTest.Rmd

and changed the vignette entry index :
%\VignetteIndexEntry{getting_started} to %\VignetteIndexEntry{ThreeWayTest}

This convention becomes necessary when building your website with pkgdown (which rworkflows does via GHA).

`ggnetwork` error: `Error in `if (stringsAsFactors) x <- factor(x)`: argument is of length zero`

1. Bug description

ThreeWayTest:::networkmap_ggnetwork fails only on Linux GHA machine. I've noticed this with other packages of mine recently and I think it has to do with some recent changes to ggnetwork package. Will sort this out since I need to figure it out for my other packages anyways.

##https://github.com/bschilder/ThreeWayTest/actions/runs/4363979376/jobs/7630734336#step:4:1172# Console output
https://github.com/bschilder/ThreeWayTest/actions/runs/4363979376/jobs/7630734336#step:4:1172

── Test failures ───────────────────────────────────────────────── testthat ────

> desc_path <- list.files("../","^DESCRIPTION$",
+                         full.names = TRUE, recursive = TRUE)[1]
> pkg <- read.dcf(desc_path, fields = "Package")[1]
> library(testthat)
> library(pkg, character.only = TRUE)
> 
> test_check(pkg)
Loading required namespace: heatmaply
Loading required namespace: tidygraph
Loading required namespace: ggnetwork
Loading required namespace: pals
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 9 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-networkmap.R:4'): networkmap works ─────────────────────────────
Error in `if (stringsAsFactors) x <- factor(x)`: argument is of length zero
Backtrace:
     ▆
  1. └─ThreeWayTest::networkmap(dat = dat) at test-networkmap.R:4:4
  2.   └─ThreeWayTest:::networkmap_ggnetwork(...)
  3.     ├─base::suppressWarnings(ggnetwork::fortify(ig, list(layout = "graphopt")))
  4.     │ └─base::withCallingHandlers(...)
  5.     ├─ggnetwork::fortify(ig, list(layout = "graphopt"))
  6.     └─ggnetwork:::fortify.igraph(ig, list(layout = "graphopt"))
  7.       └─ggnetwork:::format_fortify(...)
  8.         └─base::cbind.data.frame(...)
  9.           └─base::data.frame(..., check.names = FALSE)
 10.             ├─base::as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)
 11.             └─base::as.data.frame.list(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)
 12.               ├─base::do.call(data.frame, c(x, alis))
 13.               └─base (local) `<fn>`(...)
 14.                 ├─base::as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)
 15.                 └─base::as.data.frame.character(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 9 ]
Error: Test failures
Execution halted

2 errors ✖ | 0 warnings ✔ | 1 note ✖

Expected behaviour

Runs with no errors.

2. Reproducible example

Error in if (stringsAsFactors) x <- factor(x): argument is of length zero

3. Session info

https://github.com/bschilder/ThreeWayTest/actions/runs/4363979376/jobs/7630734336#step:4:761


─ Session info ───────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R Under development (unstable) (2023-03-02 r83926)
 os       Ubuntu 22.04.2 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       UTC
 date     2023-03-08
 pandoc   2.19.2 @ /usr/local/bin/pandoc

─ Packages ───────────────────────────────────────────────────────────────────────────────────────
 package        * version   date (UTC) lib source
 askpass          1.1       2019-01-13 [1] CRAN (R 4.3.0)
 assertthat       0.2.1     2019-03-21 [1] CRAN (R 4.3.0)
 badger           0.2.3     2023-01-28 [1] CRAN (R 4.3.0)
 base           * 4.3.0     2023-03-03 [3] local
 base64enc        0.1-3     2015-07-28 [1] CRAN (R 4.3.0)
 BH               1.81.0-1  2023-01-22 [1] CRAN (R 4.3.0)
 Biobase          2.59.0    2022-11-01 [1] Bioconductor
 BiocCheck        1.35.12   2023-02-27 [1] any (@1.35.12)
 BiocFileCache    2.7.2     2023-02-17 [1] Bioconductor
 BiocGenerics     0.45.0    2022-11-01 [1] Bioconductor
 BiocManager      1.30.20   2023-02-24 [1] CRAN (R 4.3.0)
 BiocVersion      3.17.1    2022-11-04 [2] Bioconductor
 biocViews        1.67.2    2022-12-22 [1] Bioconductor
 bit              4.0.5     2022-11-15 [1] CRAN (R 4.3.0)
 bit64            4.0.5     2020-08-30 [1] CRAN (R 4.3.0)
 bitops           1.0-7     2021-04-24 [1] CRAN (R 4.3.0)
 blob             1.2.3     2022-04-10 [1] CRAN (R 4.3.0)
 boot             1.3-28.1  2022-11-22 [3] CRAN (R 4.3.0)
 brew             1.0-8     2022-09-29 [2] CRAN (R 4.3.0)
 brio             1.1.3     2021-11-30 [1] CRAN (R 4.3.0)
 bslib            0.4.2     2022-12-16 [1] CRAN (R 4.3.0)
 ca               0.71.1    2020-01-24 [1] CRAN (R 4.3.0)
 cachem           1.0.7     2023-02-24 [1] CRAN (R 4.3.0)
 callr            3.7.3     2022-11-02 [1] CRAN (R 4.3.0)
 class            7.3-21    2023-01-23 [3] CRAN (R 4.3.0)
 cli              3.6.0     2023-01-09 [1] CRAN (R 4.3.0)
 clipr            0.8.0     2022-02-22 [1] CRAN (R 4.3.0)
 cluster          2.1.4     2022-08-22 [3] CRAN (R 4.3.0)
 coda             0.19-4    2020-09-30 [1] CRAN (R 4.3.0)
 codetools        0.2-19    2023-02-01 [3] CRAN (R 4.3.0)
 colorspace       2.1-0     2023-01-23 [1] CRAN (R 4.3.0)
 commonmark       1.8.1     2022-10-14 [1] CRAN (R 4.3.0)
 compiler         4.3.0     2023-03-03 [3] local
 covr             3.6.1     2022-08-26 [1] CRAN (R 4.3.0)
 cpp11            0.4.3     2022-10-12 [1] CRAN (R 4.3.0)
 crayon           1.5.2     2022-09-29 [1] CRAN (R 4.3.0)
 credentials      1.3.2     2021-11-29 [1] CRAN (R 4.3.0)
 crosstalk        1.2.0     2021-11-04 [1] CRAN (R 4.3.0)
 curl             5.0.0     2023-01-12 [1] CRAN (R 4.3.0)
 data.table       1.14.8    2023-02-17 [1] CRAN (R 4.3.0)
 datasets       * 4.3.0     2023-03-03 [3] local
 DBI              1.1.3     2022-06-18 [1] CRAN (R 4.3.0)
 dbplyr           2.3.1     2023-02-24 [1] CRAN (R 4.3.0)
 dendextend       1.16.0    2022-07-04 [1] CRAN (R 4.3.0)
 desc             1.4.2     2022-09-08 [1] CRAN (R 4.3.0)
 devtools         2.4.5     2022-10-11 [2] CRAN (R 4.3.0)
 dichromat        2.0-0.1   2022-05-02 [1] CRAN (R 4.3.0)
 diffobj          0.3.5     2021-10-05 [1] CRAN (R 4.3.0)
 digest           0.6.31    2022-12-11 [1] CRAN (R 4.3.0)
 dlstats          0.1.6     2022-12-09 [1] CRAN (R 4.3.0)
 docopt           0.7.1     2020-06-24 [2] CRAN (R 4.3.0)
 downlit          0.4.2     2022-07-05 [2] CRAN (R 4.3.0)
 dplyr            1.1.0     2023-01-29 [1] CRAN (R 4.3.0)
 egg              0.4.5     2019-07-13 [1] CRAN (R 4.3.0)
 ellipsis         0.3.2     2021-04-29 [1] CRAN (R 4.3.0)
 evaluate         0.20      2023-01-17 [1] CRAN (R 4.3.0)
 fansi            1.0.4     2023-01-22 [1] CRAN (R 4.3.0)
 farver           2.1.1     2022-07-06 [1] CRAN (R 4.3.0)
 fastmap          1.1.1     2023-02-24 [1] CRAN (R 4.3.0)
 filelock         1.0.2     2018-10-05 [1] CRAN (R 4.3.0)
 fontawesome      0.5.0     2023-01-25 [2] CRAN (R 4.3.0)
 foreach          1.5.2     2022-02-02 [1] CRAN (R 4.3.0)
 foreign          0.8-84    2022-12-06 [3] CRAN (R 4.3.0)
 fs               1.6.1     2023-02-06 [1] CRAN (R 4.3.0)
 gclus            1.3.2     2019-01-07 [1] CRAN (R 4.3.0)
 generics         0.1.3     2022-07-05 [1] CRAN (R 4.3.0)
 gert             1.9.2     2022-12-05 [1] CRAN (R 4.3.0)
 ggnetwork        0.5.10    2021-07-06 [1] CRAN (R 4.3.0)
 ggplot2          3.4.1     2023-02-10 [1] CRAN (R 4.3.0)
 ggrepel          0.9.3     2023-02-03 [1] CRAN (R 4.3.0)
 gh               1.4.0     2023-02-22 [1] CRAN (R 4.3.0)
 gitcreds         0.1.2     2022-09-08 [1] CRAN (R 4.3.0)
 glue             1.6.2     2022-02-24 [1] CRAN (R 4.3.0)
 graph            1.77.2    2023-02-24 [1] Bioconductor
 graphics       * 4.3.0     2023-03-03 [3] local
 grDevices      * 4.3.0     2023-03-03 [3] local
 grid             4.3.0     2023-03-03 [3] local
 gridExtra        2.3       2017-09-09 [1] CRAN (R 4.3.0)
 gtable           0.3.1     2022-09-01 [1] CRAN (R 4.3.0)
 heatmaply        1.4.2     2023-01-07 [1] CRAN (R 4.3.0)
 here             1.0.1     2020-12-13 [1] CRAN (R 4.3.0)
 highr            0.10      2022-12-22 [1] CRAN (R 4.3.0)
 htmltools        0.5.4     2022-12-07 [1] CRAN (R 4.3.0)
 htmlwidgets      1.6.1     2023-01-07 [1] CRAN (R 4.3.0)
 httpuv           1.6.9     2023-02-14 [2] CRAN (R 4.3.0)
 httr             1.4.5     2023-02-24 [1] CRAN (R 4.3.0)
 httr2            0.2.2     2022-09-25 [1] CRAN (R 4.3.0)
 igraph           1.4.1     2023-02-24 [1] CRAN (R 4.3.0)
 ini              0.3.1     2018-05-20 [1] CRAN (R 4.3.0)
 isoband          0.2.7     2022-12-20 [1] CRAN (R 4.3.0)
 iterators        1.0.14    2022-02-05 [1] CRAN (R 4.3.0)
 jquerylib        0.1.4     2021-04-26 [1] CRAN (R 4.3.0)
 jsonlite         1.8.4     2022-12-06 [1] CRAN (R 4.3.0)
 KernSmooth       2.23-20   2021-05-03 [3] CRAN (R 4.3.0)
 knitr            1.42      2023-01-25 [1] CRAN (R 4.3.0)
 labeling         0.4.2     2020-10-20 [1] CRAN (R 4.3.0)
 later            1.3.0     2021-08-18 [1] CRAN (R 4.3.0)
 lattice          0.20-45   2021-09-22 [3] CRAN (R 4.3.0)
 lazyeval         0.2.2     2019-03-15 [1] CRAN (R 4.3.0)
 lifecycle        1.0.3     2022-10-07 [1] CRAN (R 4.3.0)
 littler          0.3.17    2022-10-29 [2] CRAN (R 4.3.0)
 magrittr         2.0.3     2022-03-30 [1] CRAN (R 4.3.0)
 mapproj          1.2.11    2023-01-12 [1] CRAN (R 4.3.0)
 maps             3.4.1     2022-10-30 [1] CRAN (R 4.3.0)
 markdown         1.5       2023-01-31 [1] CRAN (R 4.3.0)
 MASS             7.3-58.2  2023-01-23 [3] CRAN (R 4.3.0)
 Matrix           1.5-3     2022-11-11 [3] CRAN (R 4.3.0)
 memoise          2.0.1     2021-11-26 [1] CRAN (R 4.3.0)
 methods        * 4.3.0     2023-03-03 [3] local
 mgcv             1.8-42    2023-03-02 [3] CRAN (R 4.3.0)
 mime             0.12      2021-09-28 [1] CRAN (R 4.3.0)
 miniUI           0.1.1.1   2018-05-18 [2] CRAN (R 4.3.0)
 munsell          0.5.0     2018-06-12 [1] CRAN (R 4.3.0)
 network          1.18.1    2023-01-24 [1] CRAN (R 4.3.0)
 nlme             3.1-162   2023-01-31 [3] CRAN (R 4.3.0)
 nnet             7.3-18    2022-09-28 [3] CRAN (R 4.3.0)
 openssl          2.0.5     2022-12-06 [1] CRAN (R 4.3.0)
 pals             1.7       2021-04-17 [1] CRAN (R 4.3.0)
 parallel         4.3.0     2023-03-03 [3] local
 pillar           1.8.1     2022-08-19 [1] CRAN (R 4.3.0)
 pkgbuild         1.4.0     2022-11-27 [1] CRAN (R 4.3.0)
 pkgconfig        2.0.3     2019-09-22 [1] CRAN (R 4.3.0)
 pkgdown          2.0.7     2022-12-14 [1] CRAN (R 4.3.0)
 pkgload          1.3.2     2022-11-16 [1] CRAN (R 4.3.0)
 plogr            0.2.0     2018-03-25 [1] CRAN (R 4.3.0)
 plotly           4.10.1    2022-11-07 [1] CRAN (R 4.3.0)
 plyr             1.8.8     2022-11-11 [1] CRAN (R 4.3.0)
 praise           1.0.0     2015-08-11 [1] CRAN (R 4.3.0)
 prettyunits      1.1.1     2020-01-24 [1] CRAN (R 4.3.0)
 processx         3.8.0     2022-10-26 [1] CRAN (R 4.3.0)
 profvis          0.3.7     2020-11-02 [2] CRAN (R 4.3.0)
 promises         1.2.0.1   2021-02-11 [1] CRAN (R 4.3.0)
 ps               1.7.2     2022-10-26 [1] CRAN (R 4.3.0)
 purrr            1.0.1     2023-01-10 [1] CRAN (R 4.3.0)
 qap              0.1-2     2022-06-27 [1] CRAN (R 4.3.0)
 R6               2.5.1     2021-08-19 [1] CRAN (R 4.3.0)
 ragg             1.2.5     2023-01-12 [2] CRAN (R 4.3.0)
 rappdirs         0.3.3     2021-01-31 [1] CRAN (R 4.3.0)
 RBGL             1.75.0    2022-11-01 [1] Bioconductor
 rcmdcheck        1.4.0     2021-09-27 [1] any (@1.4.0)
 RColorBrewer     1.1-3     2022-04-03 [1] CRAN (R 4.3.0)
 Rcpp             1.0.10    2023-01-22 [1] CRAN (R 4.3.0)
 RCurl            1.98-1.10 2023-01-27 [1] CRAN (R 4.3.0)
 registry         0.5-1     2019-03-05 [1] CRAN (R 4.3.0)
 rematch2         2.1.2     2020-05-01 [1] CRAN (R 4.3.0)
 remotes          2.4.2     2021-11-30 [1] CRAN (R 4.3.0)
 reshape2         1.4.4     2020-04-09 [1] CRAN (R 4.3.0)
 rex              1.2.1     2021-11-26 [1] CRAN (R 4.3.0)
 rlang            1.0.6     2022-09-24 [1] CRAN (R 4.3.0)
 rmarkdown        2.20      2023-01-19 [1] CRAN (R 4.3.0)
 roxygen2         7.2.3     2022-12-08 [2] CRAN (R 4.3.0)
 rpart            4.1.19    2022-10-21 [3] CRAN (R 4.3.0)
 rprojroot        2.0.3     2022-04-02 [1] CRAN (R 4.3.0)
 RSQLite          2.3.0     2023-02-17 [1] CRAN (R 4.3.0)
 rstudioapi       0.14      2022-08-22 [1] CRAN (R 4.3.0)
 RUnit            0.4.32    2018-05-18 [1] CRAN (R 4.3.0)
 rvcheck          0.2.1     2021-10-22 [1] CRAN (R 4.3.0)
 rversions        2.1.2     2022-08-31 [2] CRAN (R 4.3.0)
 rworkflows       0.99.5    2023-01-12 [1] CRAN (R 4.3.0)
 sass             0.4.5     2023-01-24 [1] CRAN (R 4.3.0)
 scales           1.2.1     2022-08-20 [1] CRAN (R 4.3.0)
 seriation        1.4.1     2023-01-07 [1] CRAN (R 4.3.0)
 sessioninfo    * 1.2.2     2021-12-06 [1] any (@1.2.2)
 shiny            1.7.4     2022-12-15 [2] CRAN (R 4.3.0)
 sna              2.7-1     2023-01-24 [1] CRAN (R 4.3.0)
 sourcetools      0.1.7-1   2023-02-01 [2] CRAN (R 4.3.0)
 spatial          7.3-16    2023-01-23 [3] CRAN (R 4.3.0)
 splines          4.3.0     2023-03-03 [3] local
 statnet.common   4.8.0     2023-01-24 [1] CRAN (R 4.3.0)
 stats          * 4.3.0     2023-03-03 [3] local
 stats4           4.3.0     2023-03-03 [3] local
 stringdist       0.9.10    2022-11-07 [1] CRAN (R 4.3.0)
 stringi          1.7.12    2023-01-11 [1] CRAN (R 4.3.0)
 stringr          1.5.0     2022-12-02 [1] CRAN (R 4.3.0)
 survival         3.5-3     2023-02-12 [3] CRAN (R 4.3.0)
 sys              3.4.1     2022-10-18 [1] CRAN (R 4.3.0)
 systemfonts      1.0.4     2022-02-11 [2] CRAN (R 4.3.0)
 tcltk            4.3.0     2023-03-03 [3] local
 testthat         3.1.6     2022-12-09 [1] CRAN (R 4.3.0)
 textshaping      0.3.6     2021-10-13 [2] CRAN (R 4.3.0)
 ThreeWayTest     1.0.1     2023-03-03 [1] local
 tibble           3.1.8     2022-07-22 [1] CRAN (R 4.3.0)
 tidygraph        1.2.3     2023-02-01 [1] CRAN (R 4.3.0)
 tidyr            1.3.0     2023-01-24 [1] CRAN (R 4.3.0)
 tidyselect       1.2.0     2022-10-10 [1] CRAN (R 4.3.0)
 tinytex          0.44      2023-02-01 [1] CRAN (R 4.3.0)
 tools            4.3.0     2023-03-03 [3] local
 TSP              1.2-2     2023-01-25 [1] CRAN (R 4.3.0)
 urlchecker       1.0.1     2021-11-30 [2] CRAN (R 4.3.0)
 usethis          2.1.6     2022-05-25 [1] CRAN (R 4.3.0)
 utf8             1.2.3     2023-01-31 [1] CRAN (R 4.3.0)
 utils          * 4.3.0     2023-03-03 [3] local
 vctrs            0.5.2     2023-01-23 [1] CRAN (R 4.3.0)
 viridis          0.6.2     2021-10-13 [1] CRAN (R 4.3.0)
 viridisLite      0.4.1     2022-08-22 [1] CRAN (R 4.3.0)
 waldo            0.4.0     2022-03-16 [1] CRAN (R 4.3.0)
 webshot          0.5.4     2022-09-26 [1] CRAN (R 4.3.0)
 whisker          0.4.1     2022-12-05 [1] CRAN (R 4.3.0)
 withr            2.5.0     2022-03-03 [1] CRAN (R 4.3.0)
 xfun             0.37      2023-01-31 [1] CRAN (R 4.3.0)
 XML              3.99-0.13 2022-12-04 [1] CRAN (R 4.3.0)
 xml2             1.3.3     2021-11-30 [2] CRAN (R 4.3.0)
 xopen            1.0.0     2018-09-17 [1] CRAN (R 4.3.0)
 xtable           1.8-4     2019-04-21 [2] CRAN (R 4.3.0)
 yaml             2.3.7     2023-01-23 [1] CRAN (R 4.3.0)
 yulab.utils      0.0.6     2022-12-20 [1] CRAN (R 4.3.0)
 zip              2.2.2     2022-10-26 [1] CRAN (R 4.3.0)

 [1] /__w/_temp/Library
 [2] /usr/local/lib/R/site-library
 [3] /usr/local/lib/R/library

Provide full data

From your notes:

Note that the full final_1kg_genotype_correct.Rdat is not uploaded because of the size. Here we upload one part-version of this data final_1kg_genotype_correct_sub.Rdata and a document on how to access the full data.

There's several ways to circumvent this issue. They basically all involve using functions to download the large data and then caching it somewhere locally on the user's computer.

With piggyback

I personally find it easiest to use piggyback, which as the added benefit of keeping you data in the same GitHub repo as your package (makes it easier to keep track of).

Other approaches

Data hosting

You can also host the data elsewhere and write your own downloader function. Here's a couple of free hosting options for scientific data:

Data caching

Here's several ways/locations you can cache data in R:

  • tools::R_user_dir("ThreeWayTest"): Points to a package specific cache directory.
  • BiocFileCache: Bioconductor's dedicated package for caching files.

Update CITATION

Once the paper is published (or if you already have a preprint on a server somewhere) you can update the file inst/CITATION. This will let users get the citation with the command:

citation("ThreeWayTest")

Codecov not recognizing tests

Codecov coverage is not updating:
Screenshot 2023-03-03 at 12 28 34

For whatever reason, the coverage tests are not being run by Codecov. It's possible this is simply a bug on their end as I noticed there were recently other issues regarding the rendering of coverage badges (which were showing up as "not found" despite having coverage data on the associate Codecov page):
https://app.codecov.io/gh/bschilder/ThreeWayTest/tree/master/R

It's also possible that something has gone awry with the test/upload code coverage steps in rworkflows:
https://github.com/neurogenomics/rworkflows/blob/24ca1e99062b52d03b78bcf2eec869cd7d2e189f/action.yml#L313

If this doesn't resolve itself soon, I'll continue looking into it further.

Create Docker container

Built and launch a Docker container with all ThreeWayTet deps installed.
Can be done easily with rworkflows by changing the arguments a bit:

rworkflows::use_workflow(run_docker = TRUE, docker_user = "bschilder", docker_org = "neurogenomicslab", force_new = TRUE)

Hosting on the neurogenomicslab account for now, but do let me know if you have your own account you prefer to host on @ftdbdl . Either way is fine with me.
https://hub.docker.com/?namespace=neurogenomicslab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.