Skip to content

Commit 90e6f68

Browse files
authored
Merge pull request #2 from schatterjee30/copilot/create-pkgdown-website
Add pkgdown website configuration and GitHub Actions deployment
2 parents fe4ffde + 9a4b073 commit 90e6f68

5 files changed

Lines changed: 247 additions & 0 deletions

File tree

.github/workflows/pkgdown.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- uses: r-lib/actions/setup-pandoc@v2
28+
29+
- uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
32+
33+
- uses: r-lib/actions/setup-r-dependencies@v2
34+
with:
35+
extra-packages: any::pkgdown, local::.
36+
needs: website
37+
38+
- name: Build site
39+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+
shell: Rscript {0}
41+
42+
- name: Deploy to GitHub pages 🚀
43+
if: github.event_name != 'pull_request'
44+
uses: JamesIves/github-pages-deploy-action@v4.4.1
45+
with:
46+
clean: false
47+
branch: gh-pages
48+
folder: docs

DESCRIPTION

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
1818
Encoding: UTF-8
1919
Roxygen: list(markdown = TRUE)
2020
RoxygenNote: 7.2.3
21+
Suggests:
22+
knitr,
23+
rmarkdown
24+
VignetteBuilder: knitr

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Robseq 0.0.0.9000
2+
3+
* Initial development version
4+
* Core functionality for robust differential gene expression analysis in RNA-Seq studies
5+
* Support for multiple normalization methods (TMM, RLE, CPM, Upper quartile, Quantile)
6+
* Parallel processing support for improved performance
7+
* Created pkgdown website for documentation

_pkgdown.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
url: https://schatterjee30.github.io/Robseq/
2+
3+
template:
4+
bootstrap: 5
5+
bootswatch: cosmo
6+
bslib:
7+
primary: "#0054AD"
8+
border-radius: 0.5rem
9+
btn-border-radius: 0.25rem
10+
11+
home:
12+
title: "Robseq: Robust Differential Gene Expression Analysis"
13+
description: >
14+
A Robust Statistical Model for Differential Gene Expression Analysis in RNA-Seq Studies
15+
links:
16+
- text: Browse source code
17+
href: https://github.com/schatterjee30/Robseq
18+
19+
navbar:
20+
logo: man/figures/RobseqLogo.png
21+
structure:
22+
left: [intro, reference, articles, news]
23+
right: [search, github]
24+
components:
25+
home:
26+
icon: fas fa-home fa-lg
27+
href: index.html
28+
reference:
29+
text: Reference
30+
href: reference/index.html
31+
articles:
32+
text: Articles
33+
menu:
34+
- text: Getting Started
35+
href: articles/robseqexample.html
36+
news:
37+
text: News
38+
href: news/index.html
39+
github:
40+
icon: fab fa-github fa-lg
41+
href: https://github.com/schatterjee30/Robseq/
42+
43+
reference:
44+
- title: Main Functions
45+
desc: Core functions for differential gene expression analysis
46+
contents:
47+
- robust.dge
48+
49+
figures:
50+
dev: grDevices::png
51+
dpi: 96
52+
dev.args: []
53+
fig.ext: png
54+
fig.width: 7.2916667
55+
fig.height: ~
56+
fig.retina: 2
57+
fig.asp: 1.618
58+
bg: NA
59+
60+
authors:
61+
Suvo Chatterjee:
62+
href: https://github.com/schatterjee30
63+
Arindam Fadikar:
64+
href: mailto:afadikar@anl.gov
65+
Vrushab Hanumesh:
66+
href: mailto:vvrushab@iu.edu
67+
Siddhant Meshram:
68+
href: mailto:sidmeshr@iu.edu
69+
Himel Mallick:
70+
href: mailto:him4004@med.cornell.edu

vignettes/robseqexample.Rmd

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: "Getting Started with Robseq"
3+
output: rmarkdown::html_vignette
4+
vignette: >
5+
%\VignetteIndexEntry{Getting Started with Robseq}
6+
%\VignetteEngine{knitr::rmarkdown}
7+
%\VignetteEncoding{UTF-8}
8+
---
9+
10+
```{r setup, include=FALSE}
11+
knitr::opts_chunk$set(echo = TRUE)
12+
```
13+
14+
# Importing libraries
15+
```{r eval=FALSE}
16+
library(Robseq)
17+
library(edgeR)
18+
library(doParallel)
19+
library(EnhancedVolcano)
20+
```
21+
22+
# Loading Example Data
23+
Loading Colon cancer data
24+
```{r eval=FALSE}
25+
load("~/Current Data Path/Colon Cancer.RData")
26+
```
27+
28+
Extracting Colon cancer gene expression data and metadata
29+
```{r eval=FALSE}
30+
features = data$counts
31+
metadata = data$metadata
32+
```
33+
34+
# Snapshot of data
35+
A typical bulk RNA-seq gene expression count data frame looks something like below. Note, the genes should be in the rows and the samples in columns
36+
```{r eval=FALSE}
37+
features[1:5, 1:5]
38+
```
39+
40+
```
41+
## GSM4731674 GSM4731675 GSM4731676 GSM4731677 GSM4731678
42+
## TSPAN6 103 44 76 417 630
43+
## TNMD 1 0 0 0 18
44+
## DPM1 86 63 97 173 309
45+
## SCYL3 32 40 77 56 97
46+
## C1orf112 28 35 25 60 55
47+
```
48+
49+
A typical metadata data frame looks something like below. Note, in our pipeline the user must include a column labeled as "Exposure" which should be the variable which will be used by Robseq in performing differential expression analysis. If the user has a different label for the treatment/condition or disease status variable then the user should supply that name via "expVar" argument in Robseq
50+
```{r eval=FALSE}
51+
metadata[1:5, ]
52+
```
53+
54+
```
55+
## Sample Exposure
56+
## 1 GSM4731674 Tumor
57+
## 2 GSM4731675 Tumor
58+
## 3 GSM4731676 Tumor
59+
## 4 GSM4731677 Tumor
60+
## 5 GSM4731678 Tumor
61+
```
62+
63+
# Preprocessing
64+
A typical preprocessing step is to filter lowly abundant genes. We do so using edgeR's "filterByExpr" function
65+
```{r eval=FALSE}
66+
keep.exprs <- filterByExpr(features, group = as.factor(metadata$Exposure))
67+
paste(length(which(!keep.exprs)), ' lowly expressed genes were filtered out', sep = '')
68+
features <- features[keep.exprs, ]
69+
```
70+
71+
```
72+
## [1] "18625 lowly expressed genes were filtered out"
73+
```
74+
75+
# Performing differential expression analysis using Robseq
76+
To perform differential gene expression (DGE) analyses using Robseq please use the code below. Note, if your metadata has only the "Exposure" variable (such as treatment groups, conditions, disease status, and etc.) set the "coVars" argument to "NULL". However, in this working example our metadata contained three covariates such as "post-mortem interval (pmi)", "rna integrity number (rin)" and "age at death" which needed to be adjusted for in our DGE analysis. Therefore, we have supplied this three variables to the "coVars" argument
77+
```{r eval=FALSE}
78+
fit <- Robseq::robust.dge(features = features,
79+
metadata = metadata,
80+
norm.method = "RLE",
81+
expVar = "Exposure",
82+
coVars = NULL,
83+
filter = FALSE,
84+
parallel = TRUE,
85+
ncores = detectCores() - 2,
86+
verbose = FALSE)
87+
```
88+
89+
# Obtaining results from Robseq
90+
After performing DGE analysis you can extract the results table in the following manner
91+
```{r eval=FALSE}
92+
results <- fit$res
93+
```
94+
95+
The results table from Robseq should look something like the following
96+
```{r eval=FALSE}
97+
results[1:5,]
98+
```
99+
100+
```
101+
## Genes log2FC SE L.CI U.CI Pval adjPval
102+
## 6872 BEST4 -6.631 0.255 -6.131209 -7.130791 1.565312e-54 1.617267e-50
103+
## 10982 ETV4 5.184 0.202 5.579913 4.788087 2.121424e-54 1.617267e-50
104+
## 11710 OTOP3 -6.227 0.244 -5.748769 -6.705231 1.430501e-53 7.270284e-50
105+
## 11725 OTOP2 -7.246 0.298 -6.661931 -7.830069 2.196497e-51 8.372498e-48
106+
## 14866 SPIB -5.385 0.239 -4.916569 -5.853431 7.877754e-48 2.402242e-44
107+
```
108+
109+
# Volcano plot to visualize DGE results
110+
Volcano plot to visualize the DGE results obtained from Robseq
111+
```{r eval=FALSE}
112+
EnhancedVolcano(results,
113+
lab = results$Genes,
114+
x = 'log2FC',
115+
y = 'adjPval')
116+
```
117+
118+
![Volcano Plot](../man/volcano.png)

0 commit comments

Comments
 (0)