Title: | psygenet2r - An R package for querying PsyGeNET and to perform comorbidity studies in psychiatric disorders |
---|---|
Description: | Package to retrieve data from PsyGeNET database (www.psygenet.org) and to perform comorbidity studies with PsyGeNET's and user's data. |
Authors: | Alba Gutierrez-Sacristan [aut, cre], Carles Hernandez-Ferrer [aut], Jaun R. Gonzalez [aut], Laura I. Furlong [aut] |
Maintainer: | Alba Gutierrez-Sacristan <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.37.0 |
Built: | 2024-06-30 03:35:51 UTC |
Source: | https://github.com/bioc/psygenet2r |
Class DataGeNET.Psy
is the basic object use in psygenet2r
package. It is the main data container to using the different functions to
query PsyGeNET database and generate teir output. The constructors of this
class are the functions psygenetGene
and psygenetDisease
.
type
Character containing 'gene'
of 'disease'
. It is
used to eprform the correct query to PsyGeNET.
search
Character containing 'single'
of 'list'
.It is
used to eprform the correct query to PsyGeNET.
database
Character containing the name of the database that will be
queried. It can take the values 'MODELS'
to use Comparative
Toxigenomics Database, data from mouse and rat; 'GAD'
to use Genetic
Association Database; 'CTD'
to use Comparative Toxigenomics Database,
data from human; 'PsyCUR'
to use Psychiatric disorders Gene
association manually curated; 'CURATED'
to use Human, manually
curated databases (PsyCUR and CTD); or 'ALL'
to use all these
databases.
term
Charcter with the term(s) to search into the database(s).
qresult
data.frame
with the obtained result
psygenetGene, psygenetDisease, DataGeNET.Psy-methods
Test the enrichment of a given gene list on Psychiatric Disorders from PsyGeNET.
enrichedPD(gene, database = "ALL", verbose = FALSE, warnings = FALSE)
enrichedPD(gene, database = "ALL", verbose = FALSE, warnings = FALSE)
gene |
Name or vector of names (that can be both code or uml) to specific genes from PsyGeNET. |
database |
Name of the database that will be queried. It can take the
values |
verbose |
By default |
warnings |
By default |
A data.frame
with the enricment at each Psychiatric Disorder
enrichedPD(c("ADCY2", "AKAP13", "ANK3"), "ALL")
enrichedPD(c("ADCY2", "AKAP13", "ANK3"), "ALL")
DataGeNET.Psy
and JaccardIndexPsy
.Obtain the raw data from a PsyGeNET's query stored in a
DataGeNET.Psy
object or the raw data with all the Jaccard Index for
the disease of interest of an JaccardIndexPsy
object.
extract(object, ...) ## S4 method for signature 'DataGeNET.Psy' extract(object) ## S4 method for signature 'JaccardIndexPsy' extract(object, order.cl = "pval", ...)
extract(object, ...) ## S4 method for signature 'DataGeNET.Psy' extract(object) ## S4 method for signature 'JaccardIndexPsy' extract(object, order.cl = "pval", ...)
object |
Object of class |
... |
NO USED |
order.cl |
Order resulting |
A data.frame
containing the raw result from PsyGeNET or
a data.frame
with the result Jaccard Index for each disease.
A data.frame
containing the raw result from PsyGeNET
A data.frame
with the result Jaccard Index for each disease.
DataGeNET.Psy
: Extract function for DataGeNET.Psy
JaccardIndexPsy
: Extract function for JacardIndexPsy
data(qr) extract(qr)[1:2, ] # get internat data.frame ## Not run: #Being x an JaccardIndexPsy extract(x) ## End(Not run)
data(qr) extract(qr)[1:2, ] # get internat data.frame ## Not run: #Being x an JaccardIndexPsy extract(x) ## End(Not run)
DataGeNET.Psy
object.PsyGeNET contains a list of sentences that support a gene-disease
association from public literature. The internal table of a
DataGeNET.Psy
object contains this information. The method
extractSentences
allows to extract those sentences that support a
gene-disease association given a DataGeNET.Psy
object and a disorder
of interest.
extractSentences(object, disorder, verbose) ## S4 method for signature 'DataGeNET.Psy' extractSentences(object, disorder, verbose = FALSE)
extractSentences(object, disorder, verbose) ## S4 method for signature 'DataGeNET.Psy' extractSentences(object, disorder, verbose = FALSE)
object |
Object of class |
disorder |
The disorder of interest. Only those sentences supporting a gene-disease association with this specific disorder will be extracted. Disorder must be provided by using "Disease Id" or "Disease Name". The "Disease Id" can be provided with or without the "uml" tag. Example of a "Disease Name": "schizophrenia"; Example of a "Disease Id": "umls:C0036341", that is equivalent of using "C0036341". |
verbose |
If set to |
A data frame showing the sentences.
DataGeNET.Psy
: Get sentences or evidences
data(qr) extractSentences(qr, "Depression")
data(qr) extractSentences(qr, "Depression")
Given a set of genes or a result of psygenetGene
creates four types
of plots showing the relation of the genes with the disease's category
in psyGeNET.
geneAttrPlot(x, type = "pie", ..., verbose = FALSE)
geneAttrPlot(x, type = "pie", ..., verbose = FALSE)
x |
Vector of genes of interest of |
type |
Type of the drawn chart. By default it is |
... |
(Check NOTE section) Passed to inner functions for different plots. |
verbose |
By default |
A plot for a DataGeNET.Psy
in terms of the panther-class.
The "Evidence Index" is gotten from PsyGeNET. For more information
about it and its calculation, pease visit psygenet.org
.
Argument ...
can be filled with specific argument depending on
the type of plot:
Type | Argument | Color | Description |
gene | cuiBarColor | Purple | Determines the color of the bar for diseases |
diseaseCategoryBarColor | Yellow | Determines the color of the bar for psychiatric categories | |
disease category | uniqueGenesBarColor | Orange | Determines the color of the bar for unique genes for a disease category |
totalGenesBarColor | Blue | Determines the color of the bar for total genes for a disease category |
DataGeNET.Psy
Given the name of one or multiple gene and retrives their information
from PsyGeNET and creates an object of type DataGeNET.Psy
.
getUMLs(word, database = "ALL")
getUMLs(word, database = "ALL")
word |
Disese to convert to UMLS using PsyGeNET database. |
database |
Name of the database that will be queried. It can take the
values |
The corresponding UMLs for the input disease/s
umls <- getUMLs( word = "depressive", database = "ALL" )
umls <- getUMLs( word = "depressive", database = "ALL" )
This function is able to calculate the Jacard Index between: 1. muliple disases, 2. a set og genes and multiple diseases, 3. a set of genes and multiple main psychiatric disorders and 4. multiple diseases and multiple main psychiatric disorders.
jaccardEstimation(pDisease, sDisease, database = "ALL", nboot = 100, ncores = 1, verbose = FALSE)
jaccardEstimation(pDisease, sDisease, database = "ALL", nboot = 100, ncores = 1, verbose = FALSE)
pDisease |
vector of diseases, vector of genes, vector of main psychiatric disorder. |
sDisease |
vector of diseases, vector of genes, vector of main
psychiatric disorder. Only necessary when comparing genes vs. diseases,
genes vs. main psychiatric disorders or diseases vs. main psychiatric
disorders. To compare multiple diseases only use |
database |
Name of the database that will be queried. It can take the
values |
nboot |
Number of iterations sued to compute the pvalue associted to the calculated Jaccard Index (default 100). |
ncores |
Number of cores used to calculate the pvalue associated to the computed Jaccard Index (default 1). |
verbose |
By default |
Warning: The main psychiatric disorders are understood as a single set of genes composed by the genes of all the diseases that the main psychiatric disorder cotains.
An object of class JaccardIndexPsy
with the computed
calculation of the JaccardIndex.
ji <- jaccardEstimation( c( "COMT", "CLOCK", "DRD3" ), "umls:C0005586", "ALL" )
ji <- jaccardEstimation( c( "COMT", "CLOCK", "DRD3" ), "umls:C0005586", "ALL" )
Class JaccardIndexPsy
is theresult of the process to look for a
Jaccard Index between muliple diseases in psygenet2r
package.
nit
Number of iterations to calculate the estimated Jaccard index
type
Slot to save type of query (disease-disease, gene-disease)
table
data.frame
containing the result table of Jaccard indexes
i1
[internal use] vector with names of first component
i2
[internal use] vector with names of second component
psygenetGene, psygenetDisease, JaccardIndexPsy-methods
ji <- jaccardEstimation( c( "COMT", "CLOCK", "DRD3" ), "umls:C0005586", "ALL" )
ji <- jaccardEstimation( c( "COMT", "CLOCK", "DRD3" ), "umls:C0005586", "ALL" )
DataGeNET.Psy
.Obtain the number of unique diseases in a DataGeNET.Psy
.
ndisease(object) ## S4 method for signature 'DataGeNET.Psy' ndisease(object)
ndisease(object) ## S4 method for signature 'DataGeNET.Psy' ndisease(object)
object |
Object of class |
The number of unique diseases
DataGeNET.Psy
: Get number of diseases
data(qr) ndisease(qr)
data(qr) ndisease(qr)
DataGeNET.Psy
.Obtain the number of unique genes in a DataGeNET.Psy
.
ngene(object) ## S4 method for signature 'DataGeNET.Psy' ngene(object)
ngene(object) ## S4 method for signature 'DataGeNET.Psy' ngene(object)
object |
Object of class |
The number of unique genes
The number of unique genes
DataGeNET.Psy
: Get number of genes
data(qr) ngene(qr)
data(qr) ngene(qr)
Given a vector of genes of interest (or using a DataGeNET.Psy object), this function creates a representation of a the panther-class these genes belongs to.
pantherGraphic(x, database = "ALL", evidenceIndex, verbose = FALSE)
pantherGraphic(x, database = "ALL", evidenceIndex, verbose = FALSE)
x |
Vector of genes of interest of |
database |
Name of the database that will be queried. It can take the
values |
evidenceIndex |
threshold to take into account a gene in the analysis |
verbose |
By default |
A plot for a DataGeNET.Psy
in terms of the panther-class.
d.alch <- pantherGraphic( c( "COMT", "CLOCK", "DRD3" ), "ALL" )
d.alch <- pantherGraphic( c( "COMT", "CLOCK", "DRD3" ), "ALL" )
DataGeNET.Psy
objectThis functions llows to create a variety of plots for DataGeNEt.Psy
and JaccardIndexPsy
objects.
## S4 method for signature 'DataGeNET.Psy,ANY' plot(x, y, layout = igraph::layout.fruchterman.reingold, type = "GDA network", verbose = FALSE, ...)
## S4 method for signature 'DataGeNET.Psy,ANY' plot(x, y, layout = igraph::layout.fruchterman.reingold, type = "GDA network", verbose = FALSE, ...)
x |
Object of class |
y |
NOT USED |
layout |
Function to design the location of the different nodes. By
default |
type |
Type of the drawn chart. By default it is |
verbose |
By default |
... |
(Check NOTE section) Passed to inner functions for different plots. |
A plot for DataGeNET.Psy
.
The "Evidence Index" is gotten from PsyGeNET. For more information
about it and its calculation, pease visit psygenet.org
.
Argument ...
can be filled with specific argument depending on
the type of plot:
Type | Argument | Color | Description |
GDA network | geneColor | Yellow | Determines the color of the gene nodes |
diseaseColor | Blue | Determines the color of the disease nodes | |
GDA heatmap | highColor | Blue | Determines the color of the heatmap for the highest value |
lowColor | White | Determines the color of the heatmap for the lowest value | |
GDCA network | ei0color | Yellow | Determines the color for those associations with evidence index 0 |
eiAmbiguitcolor | Grey | Determines the color for those associations with evidence index greater than 0 and lower than 1 | |
ei1color | Blue | Determines the color for those associations with evidence index 1 | |
GDCA heatmap | AUDcolor | #FF3C32 | |
BDcolor | #FFC698 | ||
DEPcolor | #9BE75E | ||
SCHZcolor | #1F6024 | ||
CUDcolor | #5AB69C | ||
SIDEPcolor | #50B8D6 | ||
CanUDcolor | #5467C3 | ||
SYPSYcolor | #A654C3 | ||
geneColor | Orange |
data(qr) plot(qr) # for all-disease plot plot(qr, type = 'GDCA network') # for MPI plot
data(qr) plot(qr) # for all-disease plot plot(qr, type = 'GDCA network') # for MPI plot
JaccardIndexPsy
object.This functions llows to create a variety of plots for DataGeNEt.Psy
and JaccardIndexPsy
objects.
## S4 method for signature 'JaccardIndexPsy,ANY' plot(x, y, cutOff, zero.remove = TRUE, noTitle = FALSE, lowColor = "white", highColor = "mediumorchid4", verbose = FALSE, ...)
## S4 method for signature 'JaccardIndexPsy,ANY' plot(x, y, cutOff, zero.remove = TRUE, noTitle = FALSE, lowColor = "white", highColor = "mediumorchid4", verbose = FALSE, ...)
x |
Object of class |
y |
NOT USED |
cutOff |
Number to filter the shown results. |
zero.remove |
By deffault |
noTitle |
By default |
lowColor |
By default |
highColor |
By default |
verbose |
By default |
... |
NOT USED |
A plot for JaccardIndexPsy
.
## Not run: #Being x an JaccardIndexPsy qr <- plot(x) ## End(Not run)
## Not run: #Being x an JaccardIndexPsy qr <- plot(x) ## End(Not run)
psygenet2r has two categories of functions: querying functions and analysis and plotting functions.
The functions to retrieve data from PsyGeNET are psygenetDisease and psygenetGene. There are some other support functions like psygenetGeneSentences.
The functions extract and extractSentences allows to retrieve
the row data obtained from on-line resources. The functions plot
and
pantherGraphic draws a variety of charts to illustrate the obtained
results. The function enrichedPD was built to perform enrichment
studies on PsyGeNET data. Finally the function jaccardEstimation
computes a Jaccard Index from a given input on PsyGeNET data.
DataGeNET.Psy
Given the name of one or multiple diseases and retrives their information
from PsyGeNET and creates an object of type DataGeNET.Psy
.
psygenetDisease(disease, database = "ALL", evidenceIndex = c(">", 0), verbose = FALSE, warnings = TRUE)
psygenetDisease(disease, database = "ALL", evidenceIndex = c(">", 0), verbose = FALSE, warnings = TRUE)
disease |
Name or vector of names (that can be both code or uml) to specific diseases from PsyGeNET. The diseases non existing in PsyGeNET will be removed from the output. |
database |
Name of the database that will be queried. It can take the
values |
evidenceIndex |
A vector with two elements: 1) character with greather
|
verbose |
By default |
warnings |
By default |
An object of class DataGeNET.Psy
The "Evidence Index" is gotten from PsyGeNET. For more information
about it and its calculation, pease visit psygenet.org
.
d.sch <- psygenetDisease( "schizophrenia", "ALL" )
d.sch <- psygenetDisease( "schizophrenia", "ALL" )
Given a disease or a disease list, retrives the pmids and sentences for each
gene-disease association from PsyGeNET and creates an object of type
DataGeNET.Psy
.
psygenetDiseaseSentences(diseaseList, database = "ALL", verbose = FALSE)
psygenetDiseaseSentences(diseaseList, database = "ALL", verbose = FALSE)
diseaseList |
Name or vector of names (that can be both code or uml) to specific diseases from PsyGeNET. The diseases non existing in PsyGeNET will be removed from the output. |
database |
Name of the database that will be queried. It can take the
values |
verbose |
By default |
An object of class DataGeNET.Psy
diseasesOfInterest <- c( "Bipolar Disorder","Depressive Disorder, Major" ) psyDisSen <- psygenetDiseaseSentences( diseaseList = diseasesOfInterest, database = "ALL" )
diseasesOfInterest <- c( "Bipolar Disorder","Depressive Disorder, Major" ) psyDisSen <- psygenetDiseaseSentences( diseaseList = diseasesOfInterest, database = "ALL" )
DataGeNET.Psy
Given the name of one or multiple gene and retrives their information
from PsyGeNET and creates an object of type DataGeNET.Psy
.
psygenetGene(gene, database = "ALL", evidenceIndex = c(">", 0), verbose = FALSE, warnings = TRUE)
psygenetGene(gene, database = "ALL", evidenceIndex = c(">", 0), verbose = FALSE, warnings = TRUE)
gene |
Name or vector of names (that can be both code or symbol) to specific genes from PsyGeNET. The genes non existing in PsyGeNET will be removed from the output. |
database |
Name of the database that will be queried. It can take the
values |
evidenceIndex |
A vector with two elements: 1) character with greather
|
verbose |
By default |
warnings |
By default |
An object of class DataGeNET.Psy
The "Evidence Index" is gotten from PsyGeNET. For more information
about it and its calculation, pease visit psygenet.org
.
d.alch <- psygenetGene( "ALDH2", "ALL" )
d.alch <- psygenetGene( "ALDH2", "ALL" )
Given a gene or a gene list, retrives the pmids and sentences for each
gene-disease association from PsyGeNET and creates an object of type
DataGeNET.Psy
.
psygenetGeneSentences(geneList, database = "ALL", verbose = FALSE)
psygenetGeneSentences(geneList, database = "ALL", verbose = FALSE)
geneList |
Name or vector of names (that can be both code or symbol) to specific genes from PsyGeNET. The genes non existing in PsyGeNET will be removed from the output. |
database |
Name of the database that will be queried. It can take the
values |
verbose |
By default |
An object of class DataGeNET.Psy
genesOfInterest <- c("PECR", "ADH1C", "CAST", "ERAP1", "PPP2R2B", "ESR1", "GATA4", "CDH13") psyGeneSen <- psygenetGeneSentences( geneList = genesOfInterest, database = "ALL")
genesOfInterest <- c("PECR", "ADH1C", "CAST", "ERAP1", "PPP2R2B", "ESR1", "GATA4", "CDH13") psyGeneSen <- psygenetGeneSentences( geneList = genesOfInterest, database = "ALL")
DataGeNET.Psy
obtained from quering PsyGeNET for gene '4852'.A dataset obtained from PsyGeNET after being queried with
psygenetGene
usig the term '4852' on "ALL"
database.
data("qr")
data("qr")
The format is: Formal class 'DataGeNET.Psy' [package "psygenet2r"] with 5 slots .. type : chr "gene" .. search : chr "" .. database: chr "ALL" .. term : chr "4852" .. qresult :'data.frame'
A DataGeNET.Psy
object.
ngene(qr) ndisease(qr)
ngene(qr) ndisease(qr)
Test the enrichment of a given gene list on Psychiatric Disorders from PsyGeNET.
topAnatEnrichment(gene, datatype = c("rna_seq", "affymetrix", "est", "in_situ"), statistic = "fisher", cutOff = 1, verbose = FALSE, warnings = FALSE)
topAnatEnrichment(gene, datatype = c("rna_seq", "affymetrix", "est", "in_situ"), statistic = "fisher", cutOff = 1, verbose = FALSE, warnings = FALSE)
gene |
Name or vector of names (that can be both code or uml) to specific genes from PsyGeNET. |
datatype |
It can take the values |
statistic |
By default it is |
cutOff |
Default |
verbose |
By default |
warnings |
By default |
A data.frame
with the enrichment results
## Not run: topAnatEnrichment(gene=c("ADCY2", "AKAP13", "ANK3")) ## End(Not run)
## Not run: topAnatEnrichment(gene=c("ADCY2", "AKAP13", "ANK3")) ## End(Not run)
Vector with all the gene names from DisGeNET database (http://www.disgenet.org) used as gene universe for Jaccard Index computation.
universe
universe
An object of class character
of length 8947.
data("universe", package = "psygenet2r")
A character
vector.
length(universe) universe[1:10]
length(universe) universe[1:10]