Skip to content

Commit

Permalink
Add table of ontology.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Jun 11, 2024
1 parent 558397c commit d8f8cf2
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bugphyzzAnalyses
Type: Package
Title: Analyses performed with the bugphyzz package
Version: 0.1.18
Version: 0.1.19
Authors@R:
c(
person(
Expand Down
25 changes: 23 additions & 2 deletions vignettes/articles/enrichment_dbbact.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ obs_sigs_g <- getPairedSigs(obs_dat_dec, obs_dat_inc, rank = "genus", cat = TRUE

Enrichment at the species level:

```{r, fig.height=10, fig.width=20}
```{r, fig.height=12, fig.width=25}
obs_feces_enriched_s <- dbEn2(
obs_sigs_s$dec, obs_sigs_s$inc, term_list = bpSigs_s,
perm = perm_var, freq = 1
Expand All @@ -222,7 +222,28 @@ row_dat_list$obs_feces_sp <- obs_feces_enriched_s |>
Condition = "Obesity",
Rank = "species"
)
dbHt(obs_feces_enriched_s, scm = FALSE, col_pad = 20)
dbHt(obs_feces_enriched_s, scm = TRUE)
```

```{r, eval=FALSE, echo=FALSE}
# tbl <- colData(obs_feces_enriched_s) |>
# as.data.frame() |>
# as_tibble()
#
# classif <- taxizedb::classification(tbl$Taxon, db = "ncbi")
# dat <- map(classif, ~ {
# .x |>
# filter(rank == "phylum") |>
# select(Phylum = name)
# }) |>
# bind_rows()
#
# col_data <- bind_cols(tbl, dat)
#
# col_data |>
# count(Condition, Phylum) |>
# arrange(Condition, -n)
```

```{r, fig.width=20, fig.height=8}
Expand Down
77 changes: 75 additions & 2 deletions vignettes/articles/validation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ library(ggrepel)
library(bugphyzzAnalyses)
```

## Import validation data
# Import validation data

Validation scripts and outputs are in: https://github.com/waldronlab/taxPProValidation/tree/main

Expand Down Expand Up @@ -89,7 +89,80 @@ myDataTable(output, page_len = nrow(output))
```


## Session information
# Ontology data

```{r}
fname <- system.file(
"extdata", "attributes.tsv", package = "bugphyzz"
)
o <- readr::read_tsv(fname, show_col_types = FALSE)
```


```{r}
o2 <- o |>
mutate(ontology = gsub("(?<!CO)_(?!(\\d+:\\d+))", ":", ontology, perl = TRUE)) |>
mutate(ontology = sub("^(.*):.*$", "\\1", ontology)) |>
select(ontology) |>
filter(!is.na(ontology)) |>
arrange(ontology) |>
distinct()
o3 <- o2 |>
mutate(
Description = case_when(
ontology == "APO" ~ "obophenotype/ascomycete-phenotype-ontology",
ontology == "ARO" ~ "Antibiotic Resistance Ontology",
ontology == "BTO" ~ "The BRENDA Tissue Ontology",
ontology == "CO_320" ~ "The Planteome Project",
ontology == "CO_331" ~ "The Planteome Project",
ontology == "CO_345" ~ "The Planteome Project",
ontology == "CO_357" ~ "The Planteome Project",
ontology == "ECOCORE" ~ "An ontology of core ecological entities",
ontology == "EFO" ~ "Experimental Factor Ontology",
ontology == "EHDAA2" ~ "Ontobee/Human developmental anatomy, abstract",
ontology == "ENM" ~ "eNanoMapper ontology",
ontology == "ENVO" ~ "The Environment Ontology",
ontology == "ERO" ~ "Eagle-I Research Resource Ontology",
ontology == "FMA" ~ "The Foundational Model of Anatomy",
ontology == "FOODON" ~ "Ontobee/Food Ontology",
ontology == "GO" ~ "Gene Ontology",
ontology == "IDO" ~ "Infectious Disease Ontology",
ontology == "IDOMAL" ~ "Malaria Ontology",
ontology == "MCO" ~ "Microbial Conditions Ontology",
ontology == "MICRO" ~ "Ontology of Prokaryotic Phenotypic and Metabolic Characters",
ontology == "MONDO" ~ "Mondo Disease Ontology",
ontology == "MP" ~ "The Mammalian Phenotype Ontology",
ontology == "NCBITaxon" ~ "NCBI organismal classification",
ontology == "NCIT" ~ "NCI Thesaurus OBO Edition",
ontology == "OBI" ~ "Ontology for Biomedical Investigations",
ontology == "OHMI" ~ "OHMI: Ontology of Host-Microbiome Interactions",
ontology == "OMIT" ~ "Ontology for MIRNA Target",
ontology == "OMP" ~ "Ontology of Microbial Phenotypes",
ontology == "Orphanet" ~ "Orphanet",
ontology == "PATO" ~ "PATO - the Phenotype And Trait Ontology",
ontology == "PHIPO" ~ "Pathogen Host Interactions Phenotype Ontology",
ontology == "PO" ~ "Plant Ontology",
ontology == "SIO" ~ "Ontobee/Semanticscience Integrated Ontology",
ontology == "SNOMED" ~ "SNOMED CT (International Edition)",
ontology == "SPD" ~ "The Spider Anatomy Ontology",
ontology == "SYMP" ~ "Symptom Ontology",
ontology == "UBERON" ~ "Uber-anatomy ontology",
ontology == "UPa" ~ "Unipathway",
ontology == "XCO" ~ "Experimental condition ontology",
ontology == "ZFA" ~ "Zebrafish Anatomy Ontology (ZFA)"
)
) |>
mutate(
ontology = case_when(
grepl("^(CO_).*$", ontology) ~ "CO",
TRUE ~ ontology
)) |>
distinct() |>
dplyr::rename(Ontology = ontology)
myDataTable(o3)
```

# Session information

```{r, echo=FALSE}
sessioninfo::session_info()
Expand Down

0 comments on commit d8f8cf2

Please sign in to comment.