Skip to content

Commit e173478

Browse files
committed
added pkgdown, logo, github pages, re-organising documentations
1 parent c6f4699 commit e173478

18 files changed

Lines changed: 776 additions & 840 deletions

.Rbuildignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
^LICENSE\.md$
88
^CITATION\.md$
99
^CHANGELOG\.md$
10-
^README\.md$
10+
^README\.md$
11+
^_pkgdown\.yml$
12+
^docs$
13+
^pkgdown$
14+
^vignettes/articles$

.github/workflows/pkgdown.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
19+
concurrency:
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
32+
- uses: r-lib/actions/setup-r-dependencies@v2
33+
with:
34+
extra-packages: any::pkgdown, local::.
35+
needs: website
36+
37+
- name: Build site
38+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
39+
shell: Rscript {0}
40+
41+
- name: Deploy to GitHub pages 🚀
42+
if: github.event_name != 'pull_request'
43+
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
44+
with:
45+
clean: false
46+
branch: gh-pages
47+
folder: docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ rsconnect/
5252
.Rproj.user
5353
.DS_Store
5454
.quarto
55+
docs

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ Description:
2222
which serves as a guide to connect all the pieces together by aligning them into a single object that is defined as an 'omics' class.
2323
Once this unified structure is established, users can perform manual subsetting, visualisation, and statistical analysis, or leverage the automated 'autoFlow' method to generate a comprehensive report.
2424
License: MIT + file LICENSE
25-
URL: https://github.com/agusinac/OmicFlow
25+
URL: https://github.com/agusinac/OmicFlow, https://agusinac.github.io/OmicFlow/
2626
BugReports: https://github.com/agusinac/OmicFlow/issues
2727
Config/testthat/edition: 3
2828
Encoding: UTF-8
2929
Roxygen: list(markdown = TRUE)
30-
RoxygenNote: 7.3.3
3130
Depends:
3231
R (>= 4.3.0),
3332
R6,
@@ -63,3 +62,5 @@ LinkingTo:
6362
Rcpp,
6463
RcppParallel,
6564
RcppArmadillo
65+
Config/roxygen2/version: 8.0.0
66+
Config/Needs/website: rmarkdown
File renamed without changes.

README.md

Lines changed: 11 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
# OmicFlow <img src="man/figures/logo.png" align="right" height="138" /></a>
2+
13
[![CRAN](https://www.r-pkg.org/badges/version/OmicFlow)](https://CRAN.R-project.org/package=OmicFlow)
24
[![Codecov](https://codecov.io/gh/agusinac/OmicFlow/graph/badge.svg)](https://app.codecov.io/gh/agusinac/OmicFlow)
35
[![R-CMD-check](https://github.com/agusinac/OmicFlow/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/agusinac/OmicFlow/actions/workflows/R-CMD-check.yaml)
46
[![run with conda](https://anaconda.org/agusinac/r-omicflow/badges/version.svg)](https://anaconda.org/agusinac/r-omicflow)
57
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://hub.docker.com/r/agusinac/autoflow)
68

7-
OmicFlow
8-
================
9+
## Overview
10+
11+
OmicFlow is a generalised data structure for fast and efficient loading of various sparse omics data. It can handle metataxonomics/metagenomics data in text or [BIOM](https://biom-format.org/documentation/format_versions/biom-2.0.html) and extends to `proteomics` and other `omics` types. It also supports non-sparse data, but it's performance peaks in sparsity.
912

1013
## Installation
1114
---
@@ -23,63 +26,9 @@ install.packages('pak') # if not yet installed
2326
pak::pkg_install('agusinac/OmicFlow@dev')
2427
```
2528

26-
## 📋 Metadata File Specification
27-
28-
OmicFlow expects your sample metadata to follow a **simple, but strict** structure so that all datasets are compatible and validated up‑front. Sample metadata can be supplied as a **CSV/TSV** file or as a `data.table` in R. In both cases the sample metadata should contain a header (this is your first line if you supply a file) where **each row = one sample** Additional column names not mentioned here are allowed and will be ignored during the metadata validation step.
29-
30-
---
31-
32-
### **Minimum requirement**
33-
- **`SAMPLE_ID`** ➡ every row **must** have a unique, non‑empty sample identifier.
34-
- No spaces are allowed in IDs — use underscores `_` or dashes `-` instead.
35-
36-
Example:
37-
38-
| SAMPLE_ID | SAMPLEPAIR_ID | CONTRAST_Treatment | VARIABLE_Age |
39-
|-----------|---------------|--------------------|--------------|
40-
| S1 | P1 | Drug | 42 |
41-
| S2 | P1 | Placebo | 36 |
42-
| S3 | P2 | Drug | 51 |
43-
44-
---
45-
46-
### **Column types and naming rules**
47-
48-
#### 🔹 Required column
49-
| Column | Type | Rules |
50-
|--------------|---------|------------------------------------------------------|
51-
| `SAMPLE_ID` | string | Unique, no spaces, one per sample row |
52-
53-
#### 🔹 Optional standard columns
54-
| Column | Type | Rules |
55-
|----------------|---------|---------------------------------------------------------------------|
56-
| `SAMPLEPAIR_ID`| string | Optional — no spaces. Use when samples are paired and belong to an individual source/subject |
57-
58-
#### 🔹 Pattern‑based columns
59-
You can define extra variables using special prefixes:
60-
- **`CONTRAST_...`** → grouping/category labels used in differential comparisons
61-
Example: `CONTRAST_Treatment` with values `Drug` / `Placebo`
62-
- **`VARIABLE_...`** → numeric or string variables for statistical analysis
63-
Example: `VARIABLE_Age` with values `42`, `51`, etc.
64-
65-
The pattern-based columns are only used during the `autoFlow` function. At the moment only columns with prefix `CONTRAST_` are supported.
66-
Example: **Outputs a `report.html` file in the current working directory**
67-
```R
68-
taxa$autoFlow(
69-
normalize = FALSE,
70-
weighted = TRUE,
71-
pvalue.threshold = 0.05
72-
)
73-
```
74-
---
75-
7629
## Usage
77-
> [!NOTE]
78-
> Make sure your metadata meets the requirements!
7930
---
80-
The abstract class `omics` can be used for any type of omics data where a `treeData` is not required. Let's say you have a `metaData` and `countData` (file or a matrix with rownames), these can be supplied directly to `omics` and a `featureData` field is then automatically generated. You can change all fields via `<-` and these will be automatically synced in the background.
81-
82-
The `metagenomics` class has extra support for biom files in both HDF5 ([version 2](https://biom-format.org/documentation/format_versions/biom-2.0.html)) as JSON data structure to be passed via `biomData` on top of the default `omics` fields. The `proteomics` class is more an extension of the `omics` class that also allows the input of a `treeData` and performs alignment by the `treeData` tip labels.
31+
Initialize the `metagenomics` or any `omics` object from a filepath or pre-loaded object.
8332
```R
8433
library("OmicFlow")
8534

@@ -113,8 +62,6 @@ str(taxa)
11362

11463
### Visualisations
11564
---
116-
> [!NOTE]
117-
> All visualizations use by default color-blind palettes!
11865

11966
#### 🔹Alpha diversity
12067
```R
@@ -126,13 +73,10 @@ alpha_div <- taxa$alpha_diversity(
12673

12774
alpha_div$plot
12875
```
129-
![](docs/figures/alphadiv_readme.png)
76+
![](man/figures/alphadiv_readme.png)
13077

13178
#### 🔹Beta diversity
132-
> [!NOTE]
133-
> Since v1.5 OmicFlow computes dissimilarity metrics from both sparse and dense matrices!
134-
135-
By default PERMANOVA is applied pairwise against each group within the specified contrast, via `group_by` that is used in `pairwise_adonis`. The permutation design in `vegan::adonis2` is by default set to `free`. But this may not always be the right test when you have paired samples and you also want to restrict permutations between different sites or genders. Therefore, `pairwise_adonis` supports a custom permutation design, which can be constructed via [permute](https://cran.r-project.org/web/packages/permute/vignettes/permutations.html) and fed into `vegan::adonis2` as a function via `pairwise_adonis` with the flag `perm_design`. See the examples below.
79+
By default PERMANOVA is applied pairwise against each group within the specified contrast, via `group_by` that is used in `pairwise_adonis`. The permutation design in `vegan::adonis2` is by default set to `free`. But this may not always be the right test when you have paired samples and you also want to restrict permutations between correlated values. Therefore, `pairwise_adonis` supports a custom permutation design, which can be constructed via [permute](https://cran.r-project.org/web/packages/permute/vignettes/permutations.html) and fed into `vegan::adonis2` as a function via `pairwise_adonis` with the flag `perm_design`.
13680
```R
13781
set.seed(1970)
13882

@@ -185,7 +129,7 @@ patchwork::wrap_plots(
185129
beta_div[c("scree_plot", "anova_plot", "scores_plot")],
186130
nrow = 1)
187131
```
188-
![](docs/figures/betadiv_readme.png)
132+
![](man/figures/betadiv_readme.png)
189133

190134
#### 🔹Composition
191135
```R
@@ -204,27 +148,9 @@ composition_plot(
204148
group_by = "CONTRAST_sex"
205149
)
206150
```
207-
![](docs/figures/composition_readme.png)
208-
209-
#### 🔹Volcano plot
210-
The `volcano_plot` will contain the average percentage abundance for each Genus between the two contrasts. Additional parameters can be used to only filter for relevant bacteria based on the `pvalue.threshold`, `foldchange.threshold` and `abundance.threshold`. The returned p-values can be adjusted and used for a new volcano plot via `OmicFlow::volcano_plot`.
211-
```R
212-
res <- taxa$DFE(
213-
feature_rank = "Genus",
214-
feature_filter = c("uncultured"),
215-
paired = FALSE,
216-
condition.group = "CONTRAST_sex",
217-
condition_A = "male",
218-
condition_B = "female"
219-
)
220-
221-
res$volcano_plot
222-
```
223-
224-
## Run OmicFlow and autoFlow standalone script with docker!
151+
![](man/figures/composition_readme.png)
225152

226-
> [!NOTE]
227-
> Symbolic links do not work with mounting, please only copy the original file!
153+
## Docker
228154

229155
Example: **Outputs a `report.html` file in current work directory**
230156
```bash

_pkgdown.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
url: https://agusinac.github.io/OmicFlow/
2+
template:
3+
bootstrap: 5
4+
pagetitle: "OmicFlow"
5+
logo: "man/logo.png"

man/OmicFlow-package.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)