BwUniCluster2.0/Software/R/cummeRbund: Difference between revisions

From bwHPC Wiki
Jump to navigation Jump to search
(Created page with "= General information = [https://rspatial.github.io/terra/ '''<code>CummeRbund</code>'''] is an <code>R</code> package designed to aid and simplify the task of analyzing Cufflinks RNA-Seq output. = Installation instructions = == Preparations == Installing <code>CummeRbund</code> involves compiling source code. Therefore, ensure that the following flags are set in <code>$HOME/.R/Makevars</code>: <pre> cat ~/.R/Makevars CXX14=g++ CXX17=g++ CXX14FLAGS += -std=c++14 C...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= General information =
= General information =
[https://rspatial.github.io/terra/ '''<code>CummeRbund</code>'''] is an <code>R</code> package designed to aid and simplify the task of analyzing Cufflinks RNA-Seq output.
[https://compbio.mit.edu/cummeRbund/ '''<code>CummeRbund</code>'''] is an <code>R</code> package designed to aid and simplify the task of analyzing Cufflinks RNA-Seq output.



= Installation instructions =
= Installation instructions =

== Preparations ==
== Preparations ==

Installing <code>CummeRbund</code> involves compiling source code. Therefore, ensure that the following flags are set in <code>$HOME/.R/Makevars</code>:
Installing <code>CummeRbund</code> involves compiling source code. Therefore, ensure that the following flags are set in <code>$HOME/.R/Makevars</code>:


Line 38: Line 35:
module load math/R/4.4.1-mkl-2022.2.1-gnu-13.3
module load math/R/4.4.1-mkl-2022.2.1-gnu-13.3
</pre>
</pre>



== Install the R package ==
== Install the R package ==

The <code>CummeRbund</code> package is not available from CRAN but can be installed from [https://www.bioconductor.org/packages/release/bioc/html/cummeRbund.html '''BioConductor''']:
The <code>CummeRbund</code> package is not available from CRAN but can be installed from [https://www.bioconductor.org/packages/release/bioc/html/cummeRbund.html '''BioConductor''']:



Latest revision as of 15:20, 30 October 2024

General information

CummeRbund is an R package designed to aid and simplify the task of analyzing Cufflinks RNA-Seq output.

Installation instructions

Preparations

Installing CummeRbund involves compiling source code. Therefore, ensure that the following flags are set in $HOME/.R/Makevars:

cat ~/.R/Makevars

CXX14=g++
CXX17=g++
CXX14FLAGS += -std=c++14
CXX17FLAGS += -std=c++17
CXXFLAGS = -O3 -fPIC -march=cascadelake -ffp-contract=off -fno-fast-math -fno-signed-zeros -fopenmp -Wno-unknown-warning-option

If necessary, the appropriate compiler flags can be set by running the following lines of code:

mkdir -p ~/.R
echo "CXX14=g++" > ~/.R/Makevars
echo "CXX17=g++" >> ~/.R/Makevars
echo "CXXFLAGS = -O3 -fPIC -march=cascadelake -ffp-contract=off -fno-fast-math -fno-signed-zeros -fopenmp -Wno-unknown-warning-option" >> ~/.R/Makevars
echo "CXX14FLAGS += -std=c++14" >> ~/.R/Makevars
echo "CXX17FLAGS += -std=c++17" >> ~/.R/Makevars

Since installing glmnet involves compiling, we start an interactive session on one of the compute nodes:

salloc -n 1 -t 30  -p dev_single

From within the interactive session, load R 4.4.1:

module load math/R/4.4.1-mkl-2022.2.1-gnu-13.3

Install the R package

The CummeRbund package is not available from CRAN but can be installed from BioConductor:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("cummeRbund")

Test the installation

As a quick test of the installation of CummeRbund the following lines of code can be run:


### R code from vignette source 'cummeRbund-example-workflow.Rnw'

###################################################
### code chunk number 1: init
###################################################
options(width=65)


###################################################
### code chunk number 2: loadLib
###################################################
library(cummeRbund)


###################################################
### code chunk number 3: read
###################################################
cuff <- readCufflinks(dir=system.file("extdata", package="cummeRbund"))
cuff


###################################################
### code chunk number 4: model_fit_1
###################################################
d<-dispersionPlot(genes(cuff))
d


###################################################
### code chunk number 5: model_fit_1_plot
###################################################
d<-dispersionPlot(genes(cuff))
d
print(d)


###################################################
### code chunk number 6: rep_boxplot_1
###################################################
pBoxRep<-csBoxplot(genes(cuff),replicates=T)
pBoxRep


###################################################
### code chunk number 7: rep_dendro_1
###################################################
pDendro<-csDendro(genes(cuff),replicates=T)
pDendro


###################################################
### code chunk number 8: rep_boxplot_1_plot
###################################################
pBoxRep<-csBoxplot(genes(cuff),replicates=T)
pBoxRep
print(pBoxRep)


###################################################
### code chunk number 9: rep_dendro_1_plot
###################################################
pDendro<-csDendro(genes(cuff),replicates=T)
pDendro
print(pDendro)


###################################################
### code chunk number 10: boxplot_1
###################################################
pBox<-csBoxplot(genes(cuff))
pBox


###################################################
### code chunk number 11: boxplot_1_plot
###################################################
pBox<-csBoxplot(genes(cuff))
pBox
print(pBox)


###################################################
### code chunk number 12: diff_exp_genes_1
###################################################
sigGeneIds<-getSig(cuff,alpha=0.05,level="genes")
head(sigGeneIds)
length(sigGeneIds)


###################################################
### code chunk number 13: diff_exp_genes_2
###################################################
hESCvsFibroblast.sigGeneIds<-getSig(cuff,"hESC","Fibroblasts",alpha=0.05,level="genes")
head(hESCvsFibroblast.sigGeneIds)
length(hESCvsFibroblast.sigGeneIds)


###################################################
### code chunk number 14: diff_exp_genes_3
###################################################
sigGenes<-getGenes(cuff,sigGeneIds)
sigGenes


###################################################
### code chunk number 15: diff_exp_feat_1
###################################################
sigGeneIds<-getSig(cuff,alpha=0.05,level="isoforms")
head(sigGeneIds)
length(sigGeneIds)


###################################################
### code chunk number 16: ind_gene_1
###################################################
Pink1<-getGene(cuff,'PINK1')
Pink1