knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
# download fluximplied from github # if you're reading this, you probably already have, so I've commented out all these steps. # you may have to install devtools with the below code: # install.packages("devtools") # library(devtools) # install_github('sportiellomike/fluximplied@dev',build_vignettes=T) library(fluximplied)
# Let's use the exampleData included in this package head(exampleData) # as you can see, it has genes that are not related to metabolism, genes that are, and some genes that are that are also rate limiting steps. # Let's also make an example set of data where none of the genes have a padj below 0.05 exampleDatawithoutsignificantRLSs<-exampleData exampleDatawithoutsignificantRLSs$padj<-0.051
# let's load the parameters for fluximplied inputdat<-exampleData inputformat='df' species="mmu" geneformat="SYMBOL" padjcolname='padj' LFCcolname= 'log2FoldChange' pcutoff=0.05 # now actually run fluximplied fluximplied(inputdat = inputdat, geneformat=geneformat, species = species, padjcolname = padjcolname, inputformat = inputformat, LFCcolname = LFCcolname, pcutoff = pcutoff)
# And let's do the same thing but with our example dataset that doesn't have any significant Padj values. inputdat<-exampleDatawithoutsignificantRLSs inputformat='df' species="mmu" geneformat="SYMBOL" padjcolname='padj' LFCcolname= 'log2FoldChange' pcutoff=0.05 # now actually run fluximplied (uncomment it if you want it to run) # fluximplied(inputdat = inputdat, # geneformat=geneformat, # species = species, # padjcolname = padjcolname, # inputformat = inputformat, # LFCcolname = LFCcolname, # pcutoff = pcutoff)
# let's reset our parameters to the original ones including using our dataset with significant Padj values. inputdat<-exampleData inputformat='df' species="mmu" geneformat="SYMBOL" padjcolname='padj' LFCcolname= 'log2FoldChange' pcutoff=0.05
# You can also change the title and any other part of the plot using standard ggplot functions fluximpliedplot+ ggtitle('hello world')+ theme_dark()+ theme(plot.title = element_text(hjust = 0.5))+ scale_fill_gradient2()
# Here is an example with a character vector of genes. inputdat<-c('Cpt1a','Ifng','Tnf','Pfkl') inputformat<-'vector' fluximplied(inputdat = inputdat, geneformat=geneformat, species = species, padjcolname = padjcolname, inputformat = inputformat, LFCcolname = LFCcolname, pcutoff = pcutoff) ###FIN###
# session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.