Title: | biodbNcbi, a library for connecting to NCBI Databases. |
---|---|
Description: | The biodbNcbi library provides access to the NCBI databases CCDS, Gene, Pubchem Comp and Pubchem Subst, using biodb package framework. It allows to retrieve entries by their accession number. Web services can be accessed for searching the database by name or mass. |
Authors: | Pierrick Roger [aut, cre] |
Maintainer: | Pierrick Roger <[email protected]> |
License: | AGPL-3 |
Version: | 1.11.0 |
Built: | 2024-12-19 06:25:56 UTC |
Source: | https://github.com/bioc/biodbNcbi |
The biodbNcbi library provides access to the NCBI databases CCDS, Gene, Pubchem Comp and Pubchem Subst, using biodb package framework. It allows to retrieve entries by their accession number. Web services can be accessed for searching the database by name or mass.
See vignette biodbNcbi:
vignette('biodbNcbi', package='biodbNcbi')
Maintainer: Pierrick Roger [email protected] (ORCID)
NcbiGeneConn, NcbiCcdsConn, NcbiPubchemCompConn and NcbiPubchemSubstConn.
Connector class for NCBI CCDS database.
This is a concrete connector class. It must never be instantiated directly,
but instead be instantiated through the factory BiodbFactory
.
Only specific methods are described here. See super classes for the
description of inherited methods.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> NcbiCcdsConn
clone()
The objects of this class are cloneable with this method.
NcbiCcdsConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector: conn <- mybiodb$getFactory()$createConn('ncbi.ccds') # Get the first entry e <- conn$getEntry('CCDS12227.1') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector: conn <- mybiodb$getFactory()$createConn('ncbi.ccds') # Get the first entry e <- conn$getEntry('CCDS12227.1') # Terminate instance. mybiodb$terminate()
Entry class for NCBI CCDS database.
biodb::BiodbEntry
-> biodb::BiodbXmlEntry
-> biodb::BiodbHtmlEntry
-> NcbiCcdsEntry
clone()
The objects of this class are cloneable with this method.
NcbiCcdsEntry$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector for CCDS database: conn <- mybiodb$getFactory()$createConn('ncbi.ccds') # Get the first entry e <- conn$getEntry('CCDS12227.1') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Get a connector for CCDS database: conn <- mybiodb$getFactory()$createConn('ncbi.ccds') # Get the first entry e <- conn$getEntry('CCDS12227.1') # Terminate instance. mybiodb$terminate()
NCBI Entrez connector abstract class.
NCBI Entrez connector abstract class.
This is an abstract class, mother class of all NCBI Entrez connector classes.
Note: the implementation of the getEntryIds()
method uses a last
resort solution. It returns only a small subset of Ncbi entries.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> NcbiEntrezConn
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
NcbiEntrezConn$new(entrez.name, entrez.tag = NULL, entrez.id.tag = NULL, ...)
entrez.name
Entrez database name (ex: "gene").
entrez.tag
Entrez database tag (ex: "Entrezgene").
entrez.id.tag
Entrez database ID tag (ex: "Gene-track_geneid").
...
All other parameters are passed to the super class initializer.
Nothing.
wsEfetch()
Calls Entrez efetch web service. See https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch.
NcbiEntrezConn$wsEfetch( id, rettype = NULL, retmode = NULL, retfmt = c("plain", "parsed", "request") )
id
A character vector of entry IDs.
rettype
The retrieval type. See NCBI documentation.
retmode
The retrieval mode. See NCBI documentation.
retfmt
Use to set the format of the returned value. 'plain' will return the raw results from the server, as a character value. 'parsed' will return the parsed results, as an XML object. 'request' will return a BiodbRequest object representing the request as it would have been sent.
Depending on retfmt
parameter.
wsEsearch()
Calls Entrez esearch web service. See https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch.
NcbiEntrezConn$wsEsearch( term, field = NULL, retmax = NULL, retfmt = c("plain", "parsed", "request", "ids") )
term
Text query. See NCBI documentation.
field
Entrez field to which to limit the search. See NCBI documentation.
retmax
Maximum number of entry IDs to return.
retfmt
Use to set the format of the returned value. 'plain' will return the raw results from the server, as a character value. 'parsed' will return the parsed results, as an XML object. 'request' will return a BiodbRequest object representing the request as it would have been sent. 'ids' will return a character vector containing the IDs of the matching entries.
Depending on retfmt
parameter.
wsEinfo()
Calls Entrez einfo web service, returning information about this database. See https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EInfo.
NcbiEntrezConn$wsEinfo(retfmt = c("plain", "request", "parsed"))
retfmt
Use to set the format of the returned value. 'plain' will return the raw results from the server, as a character value. 'parsed' will return the parsed results, as an XML object. 'request' will return a BiodbRequest object representing the request as it would have been sent.
Depending on retfmt
parameter.
clone()
The objects of this class are cloneable with this method.
NcbiEntrezConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.gene') # Get an entry e <- conn$getEntry('2833') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.gene') # Get an entry e <- conn$getEntry('2833') # Terminate instance. mybiodb$terminate()
NCBI Gene connector class.
NCBI Gene connector class.
This is the connector class for a NCBI Gene database.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> biodbNcbi::NcbiEntrezConn
-> NcbiGeneConn
new()
New instance initializer.
NcbiGeneConn$new(...)
...
All other parameters are passed to the super class initializer.
Nothing.
clone()
The objects of this class are cloneable with this method.
NcbiGeneConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.gene') # Get an entry e <- conn$getEntry('2833') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.gene') # Get an entry e <- conn$getEntry('2833') # Terminate instance. mybiodb$terminate()
This is the entry class for a NCBI Gene database.
biodb::BiodbEntry
-> biodb::BiodbXmlEntry
-> NcbiGeneEntry
clone()
The objects of this class are cloneable with this method.
NcbiGeneEntry$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.gene') # Get an entry e <- conn$getEntry('2833') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.gene') # Get an entry e <- conn$getEntry('2833') # Terminate instance. mybiodb$terminate()
NCBI PubChem Compound connector class.
NCBI PubChem Compound connector class.
This is the connector class for a NCBI PubChen Compound database.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> biodbNcbi::NcbiEntrezConn
-> biodbNcbi::NcbiPubchemConn
-> NcbiPubchemCompConn
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
NcbiPubchemCompConn$new(...)
...
All other parameters are passed to the super class initializer.
Nothing.
clone()
The objects of this class are cloneable with this method.
NcbiPubchemCompConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
This is the entry class for a NCBI PubChen Compound database.
biodb::BiodbEntry
-> biodb::BiodbXmlEntry
-> biodbNcbi::NcbiPubchemEntry
-> NcbiPubchemCompEntry
clone()
The objects of this class are cloneable with this method.
NcbiPubchemCompEntry$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
NCBI PubChem connector abstractclass.
NCBI PubChem connector abstractclass.
This is an abstract class, mother class of all NCBI PubChem connector classes.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> biodbNcbi::NcbiEntrezConn
-> NcbiPubchemConn
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
NcbiPubchemConn$new(db.name, id.xmltag, entry.xmltag, id.urlfield, ...)
db.name
PubChem database name.
id.xmltag
XML tag for ID.
entry.xmltag
XML tag for entry.
id.urlfield
Database ID to use when building URL.
...
All other parameters are passed to the super class initializer.
Nothing.
clone()
The objects of this class are cloneable with this method.
NcbiPubchemConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
NCBI PubChem entry class.
NCBI PubChem entry class.
This the abstract entry class for all NCBI PubChem entry classes.
biodb::BiodbEntry
-> biodb::BiodbXmlEntry
-> NcbiPubchemEntry
new()
New instance initializer.
NcbiPubchemEntry$new(...)
...
All other parameters are passed to the super class initializer.
Nothing.
clone()
The objects of this class are cloneable with this method.
NcbiPubchemEntry$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.comp') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
NCBI PubChem Substance connector class.
NCBI PubChem Substance connector class.
This is the connector class for a NCBI PubChen Substance database.
biodb::BiodbConnBase
-> biodb::BiodbConn
-> biodbNcbi::NcbiEntrezConn
-> biodbNcbi::NcbiPubchemConn
-> NcbiPubchemSubstConn
new()
New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class.
NcbiPubchemSubstConn$new(...)
...
All other parameters are passed to the super class initializer.
Nothing.
clone()
The objects of this class are cloneable with this method.
NcbiPubchemSubstConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.subst') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.subst') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
This is the entry class for a NCBI PubChen Substance database.
biodb::BiodbEntry
-> biodb::BiodbXmlEntry
-> biodbNcbi::NcbiPubchemEntry
-> NcbiPubchemSubstEntry
clone()
The objects of this class are cloneable with this method.
NcbiPubchemSubstEntry$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.subst') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()
# Create an instance with default settings: mybiodb <- biodb::newInst() # Create a connector conn <- mybiodb$getFactory()$createConn('ncbi.pubchem.subst') # Get an entry e <- conn$getEntry('2') # Terminate instance. mybiodb$terminate()