Title: | Convert miRNA Names to Different miRBase Versions |
---|---|
Description: | Translating mature miRNA names to different miRBase versions, sequence retrieval, checking names for validity and detecting miRBase version of a given set of names (data from http://www.mirbase.org/). |
Authors: | Stefan Haunsberger [aut, cre] |
Maintainer: | Stefan J. Haunsberger <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.35.0 |
Built: | 2024-10-30 08:47:53 UTC |
Source: | https://github.com/bioc/miRNAmeConverter |
This function checks if the names from a given set of mature miRNAs have a unique MIMAT ID. Check if given miRNA names can be assigned to unique MIMAT accessions among all versions
This function checks if the names from a given set of mature miRNAs have a unique MIMAT ID.
assessMiRNASwappingMIMAT(this, miRNAs, verbose = FALSE)
assessMiRNASwappingMIMAT(this, miRNAs, verbose = FALSE)
this |
Object of class 'MiRNANameConverter' |
miRNAs |
A character vector of miRNA names |
verbose |
A boolean to either show more (TRUE) or less information (FALSE) |
Although the majority of miRNA names can be assigned to a unique MIMAT ID (accession) some miRNAs changed MIMAT ID in different versions. This function takes the input miRNA names and checks each one of them if they have a unique MIMAT ID over all versions. If a miRNA changes MIMAT ID in a version it will be comprised in the return vector.
A character vector containing miRNA names that do not have a unique MIMAT ID
Stefan Haunsberger
This function detects the most likely miRBase version of a given miRNA set. Assess miRBase version
This function detects the most likely miRBase version of a given miRNA set.
assessVersion(this, miRNAs, verbose = FALSE) ## S4 method for signature 'MiRNANameConverter' assessVersion(this, miRNAs, verbose = FALSE)
assessVersion(this, miRNAs, verbose = FALSE) ## S4 method for signature 'MiRNANameConverter' assessVersion(this, miRNAs, verbose = FALSE)
this |
Object of class 'MiRNANameConverter' |
miRNAs |
A character vector of miRNA names |
verbose |
A boolean to either show more (TRUE) or less information (FALSE) |
This function takes a set of miRNA names and detects the most likely miRBase
version of this given set of 'miRNAs'. First all miRNAs will be checked for
validity (if they are actual miRNA names checkMiRNAName
and the set
that passes the check will be further processed.
A data frame with two columns: version and frequency (decreasing order by frequency, version) + version: miRBase version + frequency: the number of valid miRNAs that could be assigned to the version respectively
MiRNANameConverter
: Method for assessing the most likely miRBase
version that a given set of miRNA names is from.
Stefan Haunsberger
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' assessVersion(nc, miRNAs = c("hsa-miR-140", "hsa-miR-125a"))
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' assessVersion(nc, miRNAs = c("hsa-miR-140", "hsa-miR-125a"))
This function checks for a given set of mature 'miRNAs' (names) Check miRNA names for validity
This function checks for a given set of mature 'miRNAs' (names) if the names are listed in any miRBase version respectively.
checkMiRNAName(this, miRNAs, verbose = FALSE) ## S4 method for signature 'MiRNANameConverter' checkMiRNAName(this, miRNAs, verbose = FALSE)
checkMiRNAName(this, miRNAs, verbose = FALSE) ## S4 method for signature 'MiRNANameConverter' checkMiRNAName(this, miRNAs, verbose = FALSE)
this |
Object of class 'MiRNANameConverter' |
miRNAs |
A character vector of miRNA names |
verbose |
A boolean to either show more (TRUE) or less information (FALSE) |
This function takes the input miRNA names and checks each one of them for
validity. The check is done by taking each miRNA and searches for an existing
entry in the miRBase database among all versions. miRNAs that are listed in
any version will be comprised in the return vector respectively. If no valid
miRNA was detected, a character(0)
will be returned.
A character vector containing a set of valid miRNA names
MiRNANameConverter
: Method for checking for valid miRNA names
Stefan Haunsberger
nc = MiRNANameConverter() # Instance of class 'MiRNANameConverter' # Test with correct inputs checkMiRNAName(nc, miRNAs = c("hsa-miR-29a", "hsa-miR-642"))
nc = MiRNANameConverter() # Instance of class 'MiRNANameConverter' # Test with correct inputs checkMiRNAName(nc, miRNAs = c("hsa-miR-29a", "hsa-miR-642"))
This function returns the highest miRBase version that is provided by the package.
currentVersion(this) ## S4 method for signature 'MiRNANameConverter' currentVersion(this)
currentVersion(this) ## S4 method for signature 'MiRNANameConverter' currentVersion(this)
this |
Object of class |
The maximum miRBase version of the package is evaluated and set in the object initialization.
A numeric value
MiRNANameConverter
: Retrieve highest supported miRBase version
Stefan Haunsberger
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' currentVersion(nc);
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' currentVersion(nc);
Set the highest version that is supported by the package.
currentVersion(this) <- value
currentVersion(this) <- value
this |
Object of class ” |
value |
A |
The value for the highest version is a static variable. It is
initialized in the initialization method when an instance of a
MiRNANameConverter
class is created.
Object of class ”
Stefan Haunsberger
Sample names including miRNA names, non-miRNA names and other. It also includes duplicates.
example.miRNAs
example.miRNAs
A character
vector containing names.
This function returns an instance of a MiRNANAmeConverter class.
Handling mature miRNA names from different miRBase versions
This package contains algorithms for dealing with mature miRNA names
from different miRBase release versions. The functions are provided in form
of methods as part of the MiRNANameConverter
-class. The data of all
the miRBase release versions is stored in the miRBaseVersions.db
annotation package.
The MiRNAmeConverter package contains one class that has two
categories of functions: getters-functions and algorithms.
The MiRNANameConverter
The getter functions provide access to the slots of the class.
There are three algorithms for dealing with miRNA names from different
miRBase releases, the assessVersion
,
checkMiRNAName
and translateMiRNAName
.
translateMiRNAName
The algorithm coded in this function can translate given miRNA names to different miRBase release versions.
checkMiRNAName
This function is used to check if a given miRNA name is listed in the current miRBase release.
assessVersion
The assessVersion
-function is useful when one wants to assess the miRBase version of a given set of mature miRNA names.
Stefan Haunsberger [email protected]
miRBaseVersions.db for more information about the database holding all major miRBase release versions)
# Translate a mature miRNA name to miRBase version 21.0 nc = MiRNANameConverter(); # Object instantiation translateMiRNAName(nc, "hsa-miR-29a", version = 21.0)
# Translate a mature miRNA name to miRBase version 21.0 nc = MiRNANameConverter(); # Object instantiation translateMiRNAName(nc, "hsa-miR-29a", version = 21.0)
This function returns back an instance of a MiRNANAmeConverter object.
MiRNANameConverter(...)
MiRNANameConverter(...)
... |
any optional arguments |
.dbconn
Database connection
.currentVersion
Current miRBase version
.validVersions
Valid/Supported miRBase versions
.nOrganisms
Number of different organisms supported
.nTotalEntries
Total number of mature miRNA names among all provided miRBase release versions in the miRBaseVersions.db package.
.validOrganisms
Valid organisms
Stefan Haunsberger
This function returns an instance of a MiRNANAmeConverter class.
## S4 method for signature 'ANY' MiRNANameConverter()
## S4 method for signature 'ANY' MiRNANameConverter()
This function initializes an object of the class MiRNANameConverter. It is a
wrapper for new()
.
an object of class 'MiRNANameConverter'
Stefan Haunsberger
nc = MiRNANameConverter() # Instance of class 'MiRNANameConverter'
nc = MiRNANameConverter() # Instance of class 'MiRNANameConverter'
This function returns the number of different organisms that are provided by the package.
nOrganisms(this) ## S4 method for signature 'MiRNANameConverter' nOrganisms(this)
nOrganisms(this) ## S4 method for signature 'MiRNANameConverter' nOrganisms(this)
this |
Object of class |
The number of different organisms is evaluated and set in the object initialization.
A numeric value
MiRNANameConverter
: Retrieve number of organisms
Stefan Haunsberger
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' nOrganisms(nc);
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' nOrganisms(nc);
This function sets the number of different organisms that are provided by the package.
nOrganisms(this) <- value
nOrganisms(this) <- value
this |
Object of class |
value |
An |
The number of different organisms is evaluated and set in the object initialization.
A MiRNANameConverter
object
Stefan Haunsberger
This function returns the total number of entries contained
in the mimat
table. The number is the sum of the entries of all
miRBase versions provided by the package.
nTotalEntries(this) ## S4 method for signature 'MiRNANameConverter' nTotalEntries(this)
nTotalEntries(this) ## S4 method for signature 'MiRNANameConverter' nTotalEntries(this)
this |
Object of class |
The total number is evaluated and set in the object initialization.
A numeric value
MiRNANameConverter
: Retrieve total number of miRNA entries
Stefan Haunsberger
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' nTotalEntries(nc);
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' nTotalEntries(nc);
This function sets the total number of entries contained
in the mimat
table. The number is the sum of the entries of all
miRBase versions provided by the package.
nTotalEntries(this) <- value
nTotalEntries(this) <- value
this |
Object of class |
value |
An |
The total number is evaluated and set in the object initialization.
A MiRNANameConverter
object
Stefan Haunsberger
This function saves the data frame returned from translateMiRNAName inclusive the attribute 'description'. Save miRNA translation results
This function saves the data frame returned from translateMiRNAName inclusive the attribute 'description'.
saveResults(this, df, outputFilename, outputPath, sep = "\t", quote = FALSE, verbose = FALSE, ...) ## S4 method for signature 'MiRNANameConverter,data.frame' saveResults(this, df, outputFilename, outputPath, sep = "\t", quote = FALSE, verbose = FALSE, ...)
saveResults(this, df, outputFilename, outputPath, sep = "\t", quote = FALSE, verbose = FALSE, ...) ## S4 method for signature 'MiRNANameConverter,data.frame' saveResults(this, df, outputFilename, outputPath, sep = "\t", quote = FALSE, verbose = FALSE, ...)
this |
Object of class 'MiRNANameConverter' |
df |
A |
outputFilename |
A filename for the output file, such as 'filename.txt' |
outputPath |
A file path (character string) to the target directory |
sep |
Separator |
quote |
If all data values shall be surrounded by ('"') |
verbose |
Boolean to either show more (TRUE) or less information (FALSE) |
... |
Arguments that can be passed on to |
This function saves a data frame that has been returned by
translateMiRNAName
.
The attribute 'description' of the data frame will be stored as well.
this = MiRNANameConverter,df = data.frame
: Method for saving translation results
Stefan Haunsberger
write.table
for additional parameter values for
the '...' argument, attr
for how to retrieve attributes
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' res = translateMiRNAName(nc, miRNAs = c("hsa-miR-140", "hsa-miR-125a"), versions = c(15, 16, 20, 21)) # Save translation results saveResults(nc, res)
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' res = translateMiRNAName(nc, miRNAs = c("hsa-miR-140", "hsa-miR-125a"), versions = c(15, 16, 20, 21)) # Save translation results saveResults(nc, res)
This function prints object specific information Show-method
This function prints object specific information
## S4 method for signature 'MiRNANameConverter' show(object)
## S4 method for signature 'MiRNANameConverter' show(object)
object |
Object of class |
This function prints some information to the console.
Stefan Haunsberger
This function translates input miRNA names to different miRBase versions. Translate miRNA name
This function translates input miRNA names to different miRBase versions.
translateMiRNAName(this, miRNAs, versions, sequenceFormat = 1, verbose = FALSE) ## S4 method for signature 'MiRNANameConverter,character' translateMiRNAName(this, miRNAs, versions, sequenceFormat = 1, verbose = FALSE)
translateMiRNAName(this, miRNAs, versions, sequenceFormat = 1, verbose = FALSE) ## S4 method for signature 'MiRNANameConverter,character' translateMiRNAName(this, miRNAs, versions, sequenceFormat = 1, verbose = FALSE)
this |
Object of class 'MiRNANameConverter' |
miRNAs |
A character vector of miRNA names |
versions |
An integer or numerical vector containing the target versions |
sequenceFormat |
Integer value indicating the return format for the data frame containing sequence information 1=only sequences, 2=miRNA name and sequence |
verbose |
A boolean to either show more (TRUE) or less information (FALSE) |
The translation and sequence retrieval are done in 5 main steps:
1) Only take miRNA names that do not swap MIMAT IDs among versions
(assessMiRNASwappingMIMAT
)
2) Check, if the miRNA names are valid names (checkMiRNAName
)
3) Receive unique MIMAT IDs for each valid miRNA
- If there are miRNAs that have basically the same name,
only use miRNA names from the highest version
4) Check if the found MIMAT IDs are still listed in the
current miRBase version
- If not, neglect it because then it is not considered to be a
miRNA anymore
5) Receive names from desired versions
A (n x m) data frame where n is the number of valid miRNAs and m the number of columns (minimum 3 columns, MIMAT-ID (accession), input miRNA name, current version) In addition an attribute 'description' is added to the data frame where to each miRNA some notes are added (for example why a certain miRNA is not in the output). Sequence information is attached as the attribute 'sequence'.
this = MiRNANameConverter,miRNAs = character
: Method for translating miRNA name(s) to
different miRBase versions
Stefan Haunsberger
attr
for attributes
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' res = translateMiRNAName(nc, miRNAs = c("hsa-miR-140", "hsa-miR-125a"), versions = c(15, 16, 20, 21)) res attributes(res)
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' res = translateMiRNAName(nc, miRNAs = c("hsa-miR-140", "hsa-miR-125a"), versions = c(15, 16, 20, 21)) res attributes(res)
This function returns all organisms where mature miRNA names are available in any of the provided miRBase versions.
validOrganisms(this) ## S4 method for signature 'MiRNANameConverter' validOrganisms(this)
validOrganisms(this) ## S4 method for signature 'MiRNANameConverter' validOrganisms(this)
this |
Object of class |
The valid organisms are evaluated and set in the object initialization.
A numeric value
MiRNANameConverter
: Retrieve all supported organisms
Stefan Haunsberger
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' nOrganisms(nc);
nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' nOrganisms(nc);
This function sets all organisms where mature miRNA names are available in any of the provided miRBase versions.
validOrganisms(this) <- value
validOrganisms(this) <- value
this |
Object of class |
value |
A |
The valid organisms are evaluated and set in the object initialization.
A MiRNANameConverter
object
Stefan Haunsberger
This function returns all valid miRBase versions provided by the package.
validVersions(this) ## S4 method for signature 'MiRNANameConverter' validVersions(this)
validVersions(this) ## S4 method for signature 'MiRNANameConverter' validVersions(this)
this |
Object of class |
A numeric vector
MiRNANameConverter
: Retrieve supported miRBase versions
Stefan Haunsberger
validVersions nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' validVersions(nc);
validVersions nc = MiRNANameConverter(); # Instance of class 'MiRNANameConverter' validVersions(nc);
Set version values that are supported by the package.
validVersions(this) <- value
validVersions(this) <- value
this |
Object of class |
value |
A vector of numeric values |
The value for the highest versions is a static variable. It is
initialized in the initialization method when an instance of a
MiRNANameConverter
class is created.
A MiRNANameConverter
object
Stefan Haunsberger