Skip to content

Commit

Permalink
Merge pull request #1 from UBESP-DCTV/develop
Browse files Browse the repository at this point in the history
setup
  • Loading branch information
lucavd authored Feb 7, 2024
2 parents 1c00cb0 + da68f80 commit 30120e0
Show file tree
Hide file tree
Showing 26 changed files with 957 additions and 836 deletions.
10 changes: 5 additions & 5 deletions .Renviron
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ PATH="${RTOOLS40_HOME}\usr\bin;${PATH}"
ATTACH_STARTUP_PKGS=TRUE

# Project's information: ONE SINGLE LINE EACH (no line brakes!!)
PROJ_TITLE="Project's Title"
PROJ_DESCRIPTION="Project's description."
PROJ_URL="https://github.com/UBESP-DCTV/laims.analysis"
PROJ_TITLE="biorecur"
PROJ_DESCRIPTION="An R package to implement marginalized mixed and SPARE models on GWAS data."
PROJ_URL="https://github.com/UBESP-DCTV/biorecur"

# Shared folders local locations
# PATH should be a proper path (C:\\...)
PRJ_SHARED_PATH=""
PRJ_SHARED_PATH="C:\\Users\\Luca\\Unit of Biostatistics Epidemiology and Public Health\\LeSEXP - biorecur"
# FOLDER shoud be only the name on the folder (and not the full path to that folder)
INPUT_DATA_FOLDER="data-raw"
INPUT_DATA_FOLDER="data_raw"
OUTPUT_DATA_FOLDER="output"
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to laims.analysis
# Contributing to biorecur

This outlines how to propose a change to laims.analysis.
This outlines how to propose a change to biorecur.
For more detailed info about contributing to this, and other tidyverse packages, please see the
[**development contributing guide**](https://rstd.io/tidy-contrib).

Expand All @@ -18,7 +18,7 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi

### Pull request process

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("UBESP-DCTV/laims.analysis", fork = TRUE)`.
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("UBESP-DCTV/biorecur", fork = TRUE)`.

* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
Expand All @@ -42,6 +42,6 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi

## Code of Conduct

Please note that the laims.analysis project is released with a
Please note that the biorecur project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.
8 changes: 4 additions & 4 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting help with laims.analysis
# Getting help with biorecur

Thanks for using laims.analysis!
Thanks for using biorecur!
Before filing an issue, there are a few places to explore and pieces to put together to make the process as smooth as possible.

## Make a reprex
Expand All @@ -16,12 +16,12 @@ Armed with your reprex, the next step is to figure out [where to ask](https://ww

* If it's a question: start with [community.rstudio.com](https://community.rstudio.com/), and/or StackOverflow. There are more people there to answer questions.

* If it's a bug: you're in the right place, [file an issue](https://github.com/UBESP-DCTV/laims.analysis/issues/new).
* If it's a bug: you're in the right place, [file an issue](https://github.com/UBESP-DCTV/biorecur/issues/new).

* If you're not sure: let the community help you figure it out!
If your problem _is_ a bug or a feature request, you can easily return here and report it.

Before opening a new issue, be sure to [search issues and pull requests](https://github.com/UBESP-DCTV/laims.analysis/issues) to make sure the bug hasn't been reported and/or already fixed in the development version.
Before opening a new issue, be sure to [search issues and pull requests](https://github.com/UBESP-DCTV/biorecur/issues) to make sure the bug hasn't been reported and/or already fixed in the development version.
By default, the search will be pre-populated with `is:issue is:open`.
You can [edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/) (e.g. `is:pr`, `is:closed`) as needed.
For example, you'd simply remove `is:open` to search _all_ issues in the repo, open or closed.
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/R-CMD-check-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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: [develop]
pull_request:
branches: [develop]

name: Dev_R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
NOT_CRAN: true
TAR_NOT_CRAN: true
R_KEEP_PKG_SOURCE: yes
R_REMOTES_NO_ERRORS_FROM_WARNINGS: false
TORCH_INSTALL: 1

steps:
- uses: actions/checkout@v3

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

- name: Install Mac system dependencies
if: runner.os == 'macOS'
run: brew install zeromq

- name: Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libglpk-dev libglpk40
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
44 changes: 22 additions & 22 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand All @@ -21,25 +21,25 @@ community include:
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards
of acceptable behavior and will take appropriate and fair corrective action in
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Expand All @@ -50,16 +50,16 @@ decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies
when an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail
address, posting via an official social media account, or acting as an appointed
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at corrado.lanera@ubep.unipd.it.
reported to the community leaders responsible for enforcement at lucavd@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down Expand Up @@ -114,13 +114,13 @@ community.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0,
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
version 2.1, available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: laims.analysis
Package: biorecur
Title: What the Package Does (One Line, Title Case)
Version: 0.1.1
Authors@R:
Expand Down Expand Up @@ -32,4 +32,4 @@ Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
6 changes: 6 additions & 0 deletions R/biorecur-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL
45 changes: 19 additions & 26 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,36 @@ knitr::opts_chunk$set(
)
```

# laims.analysis <img src='man/figures/logo.png' align="right" height="120" />
# biorecur

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test coverage](https://codecov.io/gh/UBESP-DCTV/laims.analysis/branch/master/graph/badge.svg)](https://app.codecov.io/gh/UBESP-DCTV/laims.analysis?branch=master)
[![R-CMD-check](https://github.com/UBESP-DCTV/laims.analysis/actions/workflows/check-release.yaml/badge.svg)](https://github.com/UBESP-DCTV/laims.analysis/actions/workflows/check-release.yaml)
[![lint](https://github.com/UBESP-DCTV/laims.analysis/workflows/lint/badge.svg)](https://github.com/UBESP-DCTV/laims.analysis/actions)
[![R-CMD-check](https://github.com/UBESP-DCTV/laims.analysis/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/UBESP-DCTV/laims.analysis/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check-dev](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check-dev.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check-dev.yaml)
[![test-coverage](https://github.com/UBESP-DCTV/biorecur/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/test-coverage.yaml)
[![lint](https://github.com/UBESP-DCTV/biorecur/actions/workflows/lint.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/lint.yaml)
<!-- badges: end -->

The goal of `{biorecur}` is to implement marginalized mixed and SPARE models on GWAS data.

This project would represent the template for the analyses conducted within the Laboratory of Artificial Intelligence from the Medical Sciences (LAIMS) at the Unit of Biostatistics, Epidemiology, and Public health (UBEP) within the Department of Cardiac, Thoracic, Vascular Sciences, and Public Health (DSCTVPH) of the University of Padova (UniPD).


The aim is to provide a ready-to-use robust, reproducible infrastructure for complex to quick analyses.

When you create a new project based on this template, name it (i.e., it's folder) accordingly with your project's name (possibly without spaces). Next, you can open the `01-FIRST_RUN.R`script, and execute the code and instructions within it. There, you will have the opportunity to set the very first and basic pieces of information for your project, and activate all its functionalities. After that, you can start to develop your project, defining its `targets` (i.e., it's main object outputs) in the `_targets.R` file, which define the concept DAG of your project tracking all it's dependencies.

In the `dev/` folder, you will find also the `02-dev_cycle.R` and the `03-run_cycle.R` helping you across the development and execution/update of the project.



## Functionalities

- A dedicated packages' **project-level library** powered by `{renv}`
- All the **documentation** for functions and the project itself powered by `{roxygen2}`
- A **test-driven environment** powered by `{testthat}`, `{checkmate}`, and `{covr}`.
- Systems for grammar and static code checking powered by `{spelling}` and `{lintr}`, respectively
- Continuous Integration and Development is activated and powered by GitHub actions, automating linters and checks execution, and coverage assessment.
- A full environment enforcing reproducibility by the execution, caching and invalidation of a structured project's pipeline powered by `{targets}` and `{tarchetypes}` in conjunction and synergy with Rmarkdown scientifically flavored documents powered by `{distill}` (with options for connections with Zotero as citation manager, linked with local or remote libraries)

## Installation

You can install the development version of `{biorecur}` from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("UBESP-DCTV/biorecur")
```

## Example

This is a basic example which shows you how to solve a common problem:

```{r example}
library(biorecur)
## basic example code
```

## Code of Conduct

Please note that the `laims.analysis` project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
Please note that the biorecur project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
69 changes: 24 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,43 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# laims.analysis <img src='man/figures/logo.png' align="right" height="120" />
# biorecur

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test
coverage](https://codecov.io/gh/UBESP-DCTV/laims.analysis/branch/master/graph/badge.svg)](https://app.codecov.io/gh/UBESP-DCTV/laims.analysis?branch=master)
[![R-CMD-check](https://github.com/UBESP-DCTV/laims.analysis/actions/workflows/check-release.yaml/badge.svg)](https://github.com/UBESP-DCTV/laims.analysis/actions/workflows/check-release.yaml)
[![lint](https://github.com/UBESP-DCTV/laims.analysis/workflows/lint/badge.svg)](https://github.com/UBESP-DCTV/laims.analysis/actions)
[![R-CMD-check](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check-dev](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check-dev.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/R-CMD-check-dev.yaml)
[![test-coverage](https://github.com/UBESP-DCTV/biorecur/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/test-coverage.yaml)
[![lint](https://github.com/UBESP-DCTV/biorecur/actions/workflows/lint.yaml/badge.svg)](https://github.com/UBESP-DCTV/biorecur/actions/workflows/lint.yaml)
<!-- badges: end -->

This project would represent the template for the analyses conducted
within the Laboratory of Artificial Intelligence from the Medical
Sciences (LAIMS) at the Unit of Biostatistics, Epidemiology, and Public
health (UBEP) within the Department of Cardiac, Thoracic, Vascular
Sciences, and Public Health (DSCTVPH) of the University of Padova
(UniPD).
The goal of `{biorecur}` is to implement marginalized mixed and SPARE
models on GWAS data.

The aim is to provide a ready-to-use robust, reproducible infrastructure
for complex to quick analyses.
## Installation

When you create a new project based on this template, name it (i.e.,
it’s folder) accordingly with your project’s name (possibly without
spaces). Next, you can open the `01-FIRST_RUN.R`script, and execute the
code and instructions within it. There, you will have the opportunity to
set the very first and basic pieces of information for your project, and
activate all its functionalities. After that, you can start to develop
your project, defining its `targets` (i.e., it’s main object outputs) in
the `_targets.R` file, which define the concept DAG of your project
tracking all it’s dependencies.
You can install the development version of `{biorecur}` from
[GitHub](https://github.com/) with:

In the `dev/` folder, you will find also the `02-dev_cycle.R` and the
`03-run_cycle.R` helping you across the development and execution/update
of the project.
``` r
# install.packages("devtools")
devtools::install_github("UBESP-DCTV/biorecur")
```

## Functionalities
## Example

- A dedicated packages’ **project-level library** powered by `{renv}`
- All the **documentation** for functions and the project itself powered
by `{roxygen2}`
- A **test-driven environment** powered by `{testthat}`, `{checkmate}`,
and `{covr}`.
- Systems for grammar and static code checking powered by `{spelling}`
and `{lintr}`, respectively
- Continuous Integration and Development is activated and powered by
GitHub actions, automating linters and checks execution, and coverage
assessment.
- A full environment enforcing reproducibility by the execution, caching
and invalidation of a structured project’s pipeline powered by
`{targets}` and `{tarchetypes}` in conjunction and synergy with
Rmarkdown scientifically flavored documents powered by `{distill}`
(with options for connections with Zotero as citation manager, linked
with local or remote libraries)
This is a basic example which shows you how to solve a common problem:

``` r
library(biorecur)
## basic example code
```

## Code of Conduct

Please note that the `laims.analysis` project is released with a
[Contributor Code of
Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
Please note that the biorecur project is released with a [Contributor
Code of
Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.
3 changes: 2 additions & 1 deletion _targets.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
main:
store: C:/Users/corrado.lanera/Documents/GitHub/ubep/laims.analysis/_targets
store: C:/Users/Luca/Unit of Biostatistics Epidemiology and Public Health/LeSEXP
- biorecur/_targets
File renamed without changes.
Empty file removed data-raw/.gitignore
Empty file.
3 changes: 0 additions & 3 deletions data-raw/db_raw.csv

This file was deleted.

Loading

0 comments on commit 30120e0

Please # to comment.