DOI: 10.5281/zenodo.17976141
title: Daphnia magna annotation R package (org.Dmagna.eg.db) for Daphmag2.4 (GCA_001632505.1) assembly

description: This repository provides a custom-built R OrgDb annotation package org.Dmagna.eg.db for the freshater crustacean Daphnia magna based on the Daphmag2.4 assembly (NCBI GCA_001632505.1). The Daphmag2.4 assembly, derived from the D. magna Xinb3 strain (GCA_001632505.1), was among the earliest D. magna genome assemblies made publicly available. (Note: This is a scaffold-level genome assembly consisting of 28.801 scaffolds and no assembled chromosomes.)

The package contains curated mappings between Daphmag2.4 gene identifiers and functional annotations (EntrezGene IDs where available, gene symbols/descriptions, GO terms, PFAM domains, and orthology-based functional annotations), enabling downstream functional enrichment and pathway analyses inside the Bioconductor ecosystem (e.g., clusterProfiler, topGO, gProfileR, etc. compatible workflows).Note: This package will only work with your data when your mapping was performed against the identifiers provided in Daphmag2.4 !

 

Provenance and methods:



Genome assembly used: Daphmag2.4 (NCBI Assembly GCA_001632505.1). Assembly record: https://www.ncbi.nlm.nih.gov/assembly/GCA_001632505.1

Annotation strategy:



Primary homology search using BLASTx against curated protein databases to identify best-hit annotations for protein-coding genes.

Complementary orthology and functional annotation with eggNOG-mapper to transfer GO terms, PFAM domains, KEGG Orthology (KOs) and COG categories where appropriate.

AnnotationForge & AnnotationDbi were used to build the OrgDb (AnnotationDb) package from custom annotation tables, producing standard Bioconductor-compatible mappings (ENTREZID, SYMBOL, GENENAME, GO, PFAM, and orthology-derived annotations).




This annotation approach follows the concepts and methods described in great detail in the following publication: Loll, Alexandra, Hannes Reinwald, Steve U. Ayobahan, Bernd Göckener, Gabriela Salinas, Christoph Schäfers, Karsten Schlich, Gerd Hamscher, and Sebastian Eilebrecht. “Short-Term Test for Toxicogenomic Analysis of Ecotoxic Modes of Action in Lemna Minor.” Environmental Science & Technology 56, no. 16 (August 16, 2022): 11504–15.DOI: https://doi.org/10.1021/acs.est.2c01777

 

How to install:

Type the following code into your R console: 

# 1. Download the org.Dmagna.eg.db package and install ----------------------------
orgDb_url = "https://zenodo.org/records/17976141/files/org.Dmagna.eg.db.tar.gz?download=1"

## Define the destination file path
dest_file = file.path(tempdir(), "org.Dmagna.eg.db.tar.gz")

## Download the file
# We use mode = "wb" (write binary) to ensure the compressed file is not corrupted during download.
download.file(url = orgDb_url, destfile = dest_file, mode = "wb")

## Install orgDb package from local tar.gz 
install.packages(dest_file, type="source", repos=NULL)

# 2. Restart R session then load package ---------------------------------------------
require(org.Dmagna.eg.db)
require(AnnotationDbi)

## Check for columns and keytypes:
columns(org.Dmagna.eg.db)
keytypes(org.Dmagna.eg.db)


 

Using custom orgDb with clusterProfiler - Code example:

# query the org.Dmagna.eg.db for particular Lemna gene IDs (GID) ---------------
gid = unique(keys(org.Dmagna.eg.db, keytype = "GID"))
head(gid) # Have a quick look at the ids

# Inspect the columns provided
columns(org.Dmagna.eg.db)

# Specify columns for which to retrieve infos
col = c("UNIPROT_BestDescr","description_BestDescr","evalue_BestDescr", 
        "identity_BestDescr", "PFAMs_eNOG")
df1  = select(org.Dmagna.eg.db, 
             keys = gid, 
             keytype = "GID",
             columns = col)
View(df1) # Inspect the results


# retrieve infos for GO terms
df  = select(org.Dmagna.eg.db, 
             keys = gid, 
             keytype = "GID",
             columns = "GO")
View(df) # Inspect the results


# Running ORA in clusterProfiler using org.Dmagna.eg.db ------------------------
require(clusterProfiler)
require(dplyr)

# Specify example gene set for ORA
# Let's find the genes with the most GO terms & pick the top 1000 as a random gene selection
gene_set = table(df$GID) %>% sort(., decreasing = T) %>% names %>% .[1:1000]
genLs = list(setA = gene_set[200:225],
             setB = gene_set[400:425],
             setC = gene_set[800:825])

# Run ORA with specified gene set. This might run a while ...
res = compareCluster(genLs, 
                     fun = "enrichGO", OrgDb = "org.Dmagna.eg.db",
                     keyType = "GID", ont = "BP", universe = gid)

# Compute semantic similiarities among GO terms for Biological Processes (BP):
d = GOSemSim::godata(annoDb = "org.Dmagna.eg.db", ont = "BP", computeIC=FALSE, keytype = "GID")
res = enrichplot::pairwise_termsim(res, method = "Wang", semData = d)
# Rmv GO terms with redudant biological information
resS = simplify(res, .8)
# resort results after pvalues
resS@compareClusterResult = resS@compareClusterResult[order(resS@compareClusterResult$pvalue),]
View(res@compareClusterResult)

# Network plot
clusterProfiler::emapplot(resS, showCategory = 5)
clusterProfiler::cnetplot(resS, showCategory = 5)