Skip to content

Commit

Permalink
resolve warning
Browse files Browse the repository at this point in the history
  • Loading branch information
noriakis committed Apr 7, 2024
1 parent 9dc6e63 commit 38f4b23
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Depends:
Imports: tm, dplyr, GeneSummary, wordcloud, cowplot, ggplotify, stopwords, ggraph, igraph, ggdendro, AnnotationDbi, patchwork, org.Hs.eg.db, jsonlite, gridExtra, pvclust, rentrez, GetoptLong, grid, grDevices, stats, NLP, bugsigdbr, stringr, XML, methods, dendextend, RColorBrewer, utils, ggrepel, cyjShiny, graphlayouts, ggforce, ggwordcloud, MASS, tidygraph, data.table, shadowtext
Suggests:
concaveman,
clusterProfiler,
png,
limma,
knitr,
Expand All @@ -20,7 +19,7 @@ Suggests:
testthat (>= 3.0.0),
BiocStyle
Enhances:
ReactomePA, Seurat, scater, pubmedMini, ggtree, quanteda, taxonomizr, udpipe
ReactomePA, Seurat, scater, pubmedMini, ggtree, quanteda, taxonomizr, udpipe, clusterProfiler
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Config/testthat/edition: 3
Expand Down
6 changes: 5 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export(tag_words)
export(textORA)
exportMethods(getSlot)
import(GeneSummary)
import(XML)
import(bugsigdbr)
import(ggplot2)
import(ggraph)
Expand All @@ -84,6 +83,11 @@ importFrom(GetoptLong,qqcat)
importFrom(MASS,cov.trob)
importFrom(NLP,ngrams)
importFrom(NLP,words)
importFrom(XML,xmlElementsByTagName)
importFrom(XML,xmlParse)
importFrom(XML,xmlTreeParse)
importFrom(XML,xmlValue)
importFrom(XML,xpathSApply)
importFrom(cowplot,as_grob)
importFrom(cyjShiny,dataFramesToJSON)
importFrom(data.table,fread)
Expand Down
2 changes: 1 addition & 1 deletion R/bugsigdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @import wordcloud
#' @import igraph
#' @import ggraph ggplot2
#' @import XML
#' @importFrom XML xmlParse xpathSApply xmlTreeParse xmlElementsByTagName xmlValue
#' @importFrom dplyr filter
#' @importFrom stats dist
#' @importFrom grDevices palette
Expand Down
6 changes: 5 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ split_by_ea <- function(args) {
geneList <- args$geneList
}
if (args$splitByEA=="kegg") {
enr_res <- clusterProfiler::enrichKEGG(geneList)
if (requireNamespace("clusterProfiler")) {
enr_res <- clusterProfiler::enrichKEGG(geneList)
} else {
stop("Please install clusterProfiler.")
}
} else {
if (requireNamespace("ReactomePA")) {
enr_res <- ReactomePA::enrichPathway(geneList)
Expand Down
24 changes: 13 additions & 11 deletions vignettes/basic_usage_of_biotextgraph.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,6 @@ hCNet <- refseq(keggList$`05160`, plotType="network",
plotNet(hCNet, asis=TRUE)
```

The summarization of text in enrichment analysis results can be performed by `enrich` option. The below example shows enrichment analysis of KEGG database.

```{r basic5, warning=FALSE, message=FALSE, cache=TRUE, fig.height=8, fig.width=8}
hCNetK <- refseq(keggList$`05160`, enrich="kegg", keyType="ENTREZID",cooccurrence = TRUE,
topPath=50, numWords=50, autoThresh=FALSE,
plotType="network", corThresh=0.1)
plotNet(hCNetK, asis=TRUE)
```

We create another `biotext` object to compare with.

```{r basic6, warning=FALSE, message=FALSE, cache=TRUE, fig.height=8, fig.width=8}
Expand All @@ -125,11 +116,22 @@ ecoli <- refseq(keggList$`05130`, keyType="ENTREZID", autoThresh=FALSE)
Comparison of networks can be performed by `compareWordNet`. By providing multiple biotext class objects, it is possible to create a new network by integrating the networks and tag information contained in each object. This makes it possible to compare multiple different IDs.

```{r compare_word_net, warning=FALSE, message=FALSE, cache=TRUE, fig.height=15, fig.width=15}
compareWordNet(list(hCNet, hCNetK, ecoli),
titles=c("RefSeq_05160","KEGG_05160","RefSeq_05130"),
compareWordNet(list(hCNet, ecoli),
titles=c("RefSeq_05160","RefSeq_05130"),
colPal = "Dark2") |> plotNet()
```

The summarization of text in enrichment analysis results can be optionally performed by `enrich` option. The below example shows enrichment analysis of KEGG database.

```{r basic5, warning=FALSE, message=FALSE, cache=TRUE, fig.height=8, fig.width=8}
if (requireNamespace("clusterProfiler")) {
hCNetK <- refseq(keggList$`05160`, enrich="kegg", keyType="ENTREZID",cooccurrence = TRUE,
topPath=50, numWords=50, autoThresh=FALSE,
plotType="network", corThresh=0.1)
plotNet(hCNetK, asis=TRUE)
}
```

## Summarizing other identifiers' data

Other than genes, microbial information can also be summarized in the similar manner. For obtaining and summarizing information on disease relationship, enzymes, metabolites, and biological pathways, please refer to the [documentation](https://noriakis.github.io/software/biotextgraph). Furthermore, a manual function (`manual`) is available that performs similar operations based on customized user input.
Expand Down

0 comments on commit 38f4b23

Please sign in to comment.