Title: | Comprehensive Single-Cell Annotation and Transcriptomic Analysis Toolkit |
---|---|
Description: | Provides a comprehensive toolkit for single-cell annotation with the 'CellMarker2.0' database (see Xia Li, Peng Wang, Yunpeng Zhang (2023) <doi: 10.1093/nar/gkac947>). Streamlines biological label assignment in single-cell RNA-seq data and facilitates transcriptomic analysis, including preparation of TCGA<https://portal.gdc.cancer.gov/> and GEO<https://www.ncbi.nlm.nih.gov/geo/> datasets, differential expression analysis and visualization of enrichment analysis results. Additional utility functions support various bioinformatics workflows. See Wei Cui (2024) <doi: 10.1101/2024.09.14.609619> for more details. |
Authors: | Wei Cui [aut, cre, cph] |
Maintainer: | Wei Cui <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.0 |
Built: | 2025-01-15 06:57:57 UTC |
Source: | CRAN |
The Artist
class offers a suite of methods designed to create a variety of plots using ggplot2
for
data exploration. Any methods prefixed with plot_
or test_
will log the command history along with
their results, allowing you to review all outcomes later via the get_all_results()
method.
Notably, methods starting with plot_
will check if the result of the preceding command is of the
htest
class. If so, it will incorporate the previous command and its p-value as the title and subtitle,
respectively. This class encompasses methods for crafting dumbbell plots, bubble plots, divergence bar charts,
lollipop plots, contour plots, scatter plots with ellipses, donut plots, and pie charts.
Each method is tailored to map data to specific visual aesthetics and to apply additional customizations as needed.
The R6
class Artist.
data
Stores the dataset used for plotting.
command
recode the command.
result
record the plot.
new()
Initializes the Artist class with an optional dataset.
Artist$new(data = NULL)
data
A data frame containing the dataset to be used for plotting. Default is NULL
.
An instance of the Artist class.
get_all_result()
Get all history result
Artist$get_all_result()
a data.table object
test_wilcox()
Conduct wilcox.test
Artist$test_wilcox(formula, data = self$data, ...)
formula
wilcox.test()
formula arguments
data
A data frame containing the data to be plotted. Default is self$data
.
...
Additional aesthetic mappings passed to wilcox.test()
.
A ggplot2 scatter plot.
test_t()
Conduct wilcox.test
Artist$test_t(formula, data = self$data, ...)
A ggplot2 scatter plot.
plot_scatter()
Creates a scatter plot.
Artist$plot_scatter( data = self$data, fun = function(x) x, x, y, ..., add = private$is_htest() )
data
A data frame containing the data to be plotted. Default is self$data
.
fun
function to process the self$data
.
x
The column name for the x-axis.
y
The column name for the y-axis.
...
Additional aesthetic mappings passed to aes()
.
add
whether to add the test result.
A ggplot2 scatter plot.
plot_box()
Creates a box plot.
Artist$plot_box( data = self$data, fun = function(x) x, x, ..., add = private$is_htest() )
data
A data frame or tibble containing the data to be plotted. Default is self$data
.
fun
function to process the self$data
.
x
The column name for the x-axis.
...
Additional aesthetic mappings passed to aes()
.
add
whether to add the test result.
A ggplot2 box plot.
dumbbbell()
Create a dumbbell plot
This method generates a dumbbell plot using the provided data, mapping the specified columns to the x-axis, y-axis, and color aesthetic.
Artist$dumbbbell(data = self$data, x, y, col, ...)
data
A data frame containing the data to be plotted.
x
The column in data
to map to the x-axis.
y
The column in data
to map to the y-axis.
col
The column in data
to map to the color aesthetic.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the dumbbell plot.
bubble()
Create a bubble plot
This method generates a bubble plot where points are mapped to the x and y axes, with their size and color representing additional variables.
Artist$bubble(data = self$data, x, y, size, col, ...)
data
A data frame containing the data to be plotted.
x
The column in data
to map to the x-axis.
y
The column in data
to map to the y-axis.
size
The column in data
to map to the size of the points.
col
The column in data
to map to the color of the points.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the bubble plot.
barchart_divergence()
Create a divergence bar chart
This method generates a divergence bar chart where bars are colored based on their positive or negative value.
Artist$barchart_divergence(data = self$data, group, y, fill, ...)
data
A data frame containing the data to be plotted.
group
The column in data
representing the grouping variable.
y
The column in data
to map to the y-axis.
fill
The column in data
to map to the fill color of the bars.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the divergence bar chart.
lollipop()
Create a lollipop plot
This method generates a lollipop plot, where points are connected to a baseline by vertical segments, with customizable colors and labels.
Artist$lollipop(data = self$data, x, y, ...)
data
A data frame containing the data to be plotted.
x
The column in data
to map to the x-axis.
y
The column in data
to map to the y-axis.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the lollipop plot.
contour()
Create a contour plot
This method generates a contour plot that includes filled and outlined density contours, with data points overlaid.
Artist$contour(data = self$data, x, y, ...)
data
A data frame containing the data to be plotted.
x
The column in data
to map to the x-axis.
y
The column in data
to map to the y-axis.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the contour plot.
scatter_ellipses()
Create a scatter plot with ellipses
This method generates a scatter plot where data points are colored by group, with ellipses representing the confidence intervals for each group.
Artist$scatter_ellipses(data = self$data, x, y, col, ...)
data
A data frame containing the data to be plotted.
x
The column in data
to map to the x-axis.
y
The column in data
to map to the y-axis.
col
The column in data
to map to the color aesthetic.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the scatter plot with ellipses.
donut()
Create a donut plot
This method generates a donut plot, which is a variation of a pie chart with a hole in the center. The sections of the donut represent the proportion of categories in the data.
Artist$donut(data = self$data, x, y, fill, ...)
data
A data frame containing the data to be plotted.
x
The column in data
to map to the x-axis.
y
The column in data
to map to the y-axis.
fill
The column in data
to map to the fill color of the sections.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the donut plot.
pie()
Create a pie chart
This method generates a pie chart where sections represent the proportion of categories in the data.
Artist$pie(data = self$data, y, fill, ...)
data
A data frame containing the data to be plotted.
y
The column in data
to map to the y-axis.
fill
The column in data
to map to the fill color of the sections.
...
Additional aesthetic mappings or other arguments passed to ggplot
.
A ggplot object representing the pie chart.
clone()
The objects of this class are cloneable with this method.
Artist$clone(deep = FALSE)
deep
Whether to make a deep clone.
library(data.table) air <- subset(airquality, Month %in% c(5, 6)) setDT(air) cying <- Artist$new(data = air) cying$plot_scatter(x = Wind, y = Temp) cying$test_wilcox( formula = Ozone ~ Month, ) cying$plot_scatter(x = Wind, y = Temp) cying$plot_scatter(f = \(x) x[, z := Wind * Temp], x = Wind, y = z)
library(data.table) air <- subset(airquality, Month %in% c(5, 6)) setDT(air) cying <- Artist$new(data = air) cying$plot_scatter(x = Wind, y = Temp) cying$test_wilcox( formula = Ozone ~ Month, ) cying$plot_scatter(x = Wind, y = Temp) cying$plot_scatter(f = \(x) x[, z := Wind * Temp], x = Wind, y = z)
This function checks the markers for specified clusters returned by the
matchCellMarker2
function. It allows users to filter by species, cluster,
and to specify whether to consider cis or trans interactions.
check_marker(marker, n, spc, cl = c(), topcellN = 2, cis = FALSE)
check_marker(marker, n, spc, cl = c(), topcellN = 2, cis = FALSE)
marker |
A data frame of markers obtained from |
n |
An integer specifying the top number of genes to match from the input markers. |
spc |
A character string specifying the species, which can be either 'Human' or 'Mouse'. |
cl |
An integer or vector of integers specifying the clusters to check. |
topcellN |
An integer specifying the number of top cells to check for each cluster. |
cis |
A logical value indicating whether to check marker directly from the top symbol of
|
A named list where each name corresponds to a cell type and each element is a vector of marker names.
# Example usage: # Check the top 50 markers for clusters 1, 4, and 7 in the Human species. library(easybio) data(pbmc.markers) verified_markers <- check_marker(pbmc.markers, n = 50, spc = "Human", cl = c(1, 4, 7)) print(verified_markers)
# Example usage: # Check the top 50 markers for clusters 1, 4, and 7 in the Human species. library(easybio) data(pbmc.markers) verified_markers <- check_marker(pbmc.markers, n = 50, spc = "Human", cl = c(1, 4, 7)) print(verified_markers)
The data were obtained by the limma-voom workflow
This function creates a DGEList
object from a count matrix, sample
information, and feature information. It is designed to facilitate the
analysis of differential gene expression using the edgeR package.
dgeList(count, sample.info, feature.info)
dgeList(count, sample.info, feature.info)
count |
A numeric matrix where rows represent features (e.g., genes) and columns represent samples. Row names should correspond to feature identifiers, and column names should correspond to sample identifiers. |
sample.info |
A data frame containing information about the samples. The
number of rows should match the number of columns in the |
feature.info |
A data frame containing information about the features. The
number of rows should match the number of rows in the |
A DGEList
object as defined by the edgeR package, which includes the
count data, sample information, and feature information.
This function filters out low-expressed genes from a DGEList
object and
normalizes the count data. It also provides diagnostic plots for raw and
filtered data.
dprocess_dgeList(x, group.column, min.count = 10)
dprocess_dgeList(x, group.column, min.count = 10)
x |
A |
group.column |
The name of the column in |
min.count |
The minimum number of counts required for a gene to be considered expressed. Genes with counts below this threshold in any group will be filtered out. Defaults to 10. |
The function returns a DGEList
object with low-expressed genes
filtered out and normalization factors calculated.
This function constructs a character vector of a specified length, inserting given values at positions determined by numeric indices. It is designed for single cell annotation tasks, where specific annotations need to be placed at certain positions in a vector.
finsert( x = expression(c(0, 1, 3) == "Neutrophil", c(2, 4, 8) == "Macrophage"), len = integer(), setname = TRUE, na = "Unknown" )
finsert( x = expression(c(0, 1, 3) == "Neutrophil", c(2, 4, 8) == "Macrophage"), len = integer(), setname = TRUE, na = "Unknown" )
x |
An expression defining the value to insert and the positions at which to insert them. The expression should be a list of logical comparisons, where the left side is a numeric vector of positions and the right side is the corresponding character value to insert. |
len |
The desired length of the output character vector. If the specified
positions exceed this length, the vector will be padded with the |
setname |
A logical value indicating whether to set names for the elements
of the vector. If |
na |
The default value to use for positions not specified in |
A named character vector with the specified values inserted at given
positions and padded with the na
value if necessary.
# Example usage: # Insert "Neutrophil" at positions 0, 1, 3 and "Macrophage" at positions 2, 4, 8 # in a vector of length 10, with "Unknown" as the default value. library(easybio) annotated_vector <- finsert( x = expression( c(0, 1, 3) == "Neutrophil", c(2, 4, 8) == "Macrophage" ), len = 10, na = "Unknown" ) print(annotated_vector)
# Example usage: # Insert "Neutrophil" at positions 0, 1, 3 and "Macrophage" at positions 2, 4, 8 # in a vector of length 10, with "Unknown" as the default value. library(easybio) annotated_vector <- finsert( x = expression( c(0, 1, 3) == "Neutrophil", c(2, 4, 8) == "Macrophage" ), len = 10, na = "Unknown" ) print(annotated_vector)
This function extracts a specified attribute from an R object.
get_attr(x, attr_name)
get_attr(x, attr_name)
x |
An R object that has attributes. |
attr_name |
The name of the attribute to retrieve. |
The value of the attribute with the given name.
This function extracts a list of markers for one or more cell types from the
cellMarker2
dataset. It allows filtering by species, cell type, the number
of markers to retrieve, and a minimum count threshold for marker occurrences.
get_marker(spc, cell = character(), number = 5, min.count = 1)
get_marker(spc, cell = character(), number = 5, min.count = 1)
spc |
A character string specifying the species, which can be either 'Human' or 'Mouse'. |
cell |
A character vector of cell types for which to retrieve markers. |
number |
An integer specifying the number of top markers to return for each cell type. |
min.count |
An integer representing the minimum number of times a marker must have been reported to be included in the results. |
A named list where each name corresponds to a cell type and each element is a vector of marker names.
# Example usage: # Retrieve the top 5 markers for 'Macrophage' and 'Monocyte' cell types in humans, # with a minimum count of 1. library(easybio) markers <- get_marker(spc = "Human", cell = c("Macrophage", "Monocyte")) print(markers)
# Example usage: # Retrieve the top 5 markers for 'Macrophage' and 'Monocyte' cell types in humans, # with a minimum count of 1. library(easybio) markers <- get_marker(spc = "Human", cell = c("Macrophage", "Monocyte")) print(markers)
This function applies a specified function to each group defined by a regular expression pattern applied to the names of a data object. It is useful for summarizing data when groups are defined by a pattern in the names rather than a specific column or index.
groupStat(f, x, xname = names(x), patterns)
groupStat(f, x, xname = names(x), patterns)
f |
A function that takes a single argument and returns a summary of the data. |
x |
A data frame or matrix containing the data to be summarized. |
xname |
A character vector containing the names of the variables in |
patterns |
A character vector of regular expressions that define the groups. |
A data frame or matrix containing the summary statistics for each group.
This function applies a specified function to each group defined by an index, and returns a summary of the results. It is useful for summarizing data by group when the groups are defined by an index rather than a named column.
groupStatI(f, x, idx)
groupStatI(f, x, idx)
f |
A function that takes a single argument and returns a summary of the data. |
x |
A data frame or matrix containing the data to be summarized. |
idx |
A vector of indices or group names that define the groups. |
A data frame or matrix containing the summary statistics for each group.
This function fits a linear model to processed DGEList
data using the
limma
package. It defines contrasts between groups and performs
differential expression analysis.
limmaFit(x, group.column)
limmaFit(x, group.column)
x |
A processed |
group.column |
The name of the column in |
An eBayes
object containing the fitted linear model and
results of the differential expression analysis.
This function converts a named list with vector values in each element to a long data.table. The list is first flattened into a single vector, and then the data.table is created with two columns: one for the name of the original list element and another for the value.
list2dt(x)
list2dt(x)
x |
A named list where each element contains a vector of values. |
A long data.table with two columns: 'name' and 'value'.
This function creates a graph from a named list, where the edges are determined by the overlap between the elements of the list. Each node in the graph represents an element of the list, and the weight of the edge between two nodes is the number of overlapping elements between the two corresponding lists.
list2graph(nodes)
list2graph(nodes)
nodes |
A named list where each element is a vector. |
A data.table representing the graph, with columns for the node names
(node_x
and node_y
) and the weight of the edge (weight
).
This function matches markers from the FindAllMarkers
output with the
cellMarker2
dataset, filtering by species and selecting the top genes based
on their average log2 fold change and adjusted p-values.
matchCellMarker2(marker, n, spc)
matchCellMarker2(marker, n, spc)
marker |
A data frame of markers obtained from the |
n |
An integer specifying the top number of genes to match from the input markers. |
spc |
A character string specifying the species, which can be either 'Human' or 'Mouse'. |
A data frame containing matched markers from the cellMarker2
dataset, with additional columns indicating the number of matches and
ordered symbols.
# Example usage: # Match the top 50 markers from the pbmc.markers dataset with the Human # species in the cellMarker2 dataset. library(easybio) data(pbmc.markers) matched_markers <- matchCellMarker2(pbmc.markers, n = 50, spc = "Human") print(matched_markers)
# Example usage: # Match the top 50 markers from the pbmc.markers dataset with the Human # species in the cellMarker2 dataset. library(easybio) data(pbmc.markers) matched_markers <- matchCellMarker2(pbmc.markers, n = 50, spc = "Human") print(matched_markers)
The data were obtained by the seurat PBMC workflow. exact script for this data is available as system.file("example-single-cell.R", package="easybio")
This function creates a plot of enrichment scores for a specified pathway. It provides a visual representation of the enrichment score (ES) along with the ranks and ticks indicating the GSEA walk length.
plotEnrichment2(pathways, pwayname, stats, gseaParam = 1, ticksSize = 0.2)
plotEnrichment2(pathways, pwayname, stats, gseaParam = 1, ticksSize = 0.2)
pathways |
A list of pathways. |
pwayname |
The name of the pathway for which to plot enrichment. |
stats |
A rank vector obtained from the 'fgsea' package. |
gseaParam |
The GSEA walk length parameter. Default is 1. |
ticksSize |
The size of the tick marks. Default is 0.2. |
A ggplot object representing the enrichment plot.
fgsea::fgsea()
The plotGSEA
function visualizes the results of a GSEA (Gene Set Enrichment Analysis) using data from
the fgsea
package. It generates a composite plot that includes an enrichment plot and a ranked metric plot.
plotGSEA(fgseaRes, pathways, pwayname, stats, save = FALSE)
plotGSEA(fgseaRes, pathways, pwayname, stats, save = FALSE)
fgseaRes |
A data table containing the GSEA results from the |
pathways |
A list of all pathways used in the GSEA analysis. |
pwayname |
The name of the pathway to visualize. |
stats |
A numeric vector representing the ranked statistics. |
save |
A logical value indicating whether to save the plot as a PDF file. Default is |
ggplot2 object.
This function creates a dot plot displaying the distribution of a specified marker across different tissues and cell types, based on data from the CellMarker2.0 database.
plotMarkerDistribution(mkr = character())
plotMarkerDistribution(mkr = character())
mkr |
character, the name of the marker to be plotted. |
A ggplot2 object representing the distribution of the marker.
plotMarkerDistribution("CD14")
plotMarkerDistribution("CD14")
The plotORA
function visualizes the results of an ORA (Over-Representation Analysis) test.
It generates a plot with customizable aesthetics for x, y, point size, and fill, with an option to flip the axes.
plotORA(data, x, y, size, fill, flip = FALSE)
plotORA(data, x, y, size, fill, flip = FALSE)
data |
A data frame containing the ORA results to be visualized. |
x |
The column in |
y |
The column in |
size |
The column in |
fill |
The column in |
flip |
A logical value indicating whether to flip the axes of the plot. Default is |
ggplot2 object.
This function creates a dot plot to visualize the distribution of possible cell types
based on the results from the matchCellMarker2()
function, utilizing data from the CellMarker2.0 database.
plotPossibleCell(marker, min.uniqueN = 2)
plotPossibleCell(marker, min.uniqueN = 2)
marker |
data.table, the result from the |
min.uniqueN |
integer, the minimum number of unique marker genes that must be matched for a cell type to be included in the plot. Default is 2. |
A ggplot2 object representing the distribution of possible cell types.
The plotRank
function visualizes the ranked statistics of a GSEA (Gene Set Enrichment Analysis) analysis.
The function creates a plot where the x-axis represents the rank of each gene, and the y-axis shows
the corresponding ranked list metric.
plotRank(stats)
plotRank(stats)
stats |
A numeric vector containing the ranked statistics from a GSEA analysis. |
ggplot2 object
This function generates dot plots for the markers obtained from the
check_marker
function for specified cluster groups within a Seurat object.
The plots are saved to a temporary directory.
plotSeuratDot(srt, cls, ...)
plotSeuratDot(srt, cls, ...)
srt |
A Seurat object containing the single-cell data. |
cls |
A list containing cluster groups to check. Each element of the list should correspond to a cluster or a group of clusters for which to generate dot plots. |
... |
Additional parameters to pass to the |
The function returns the temporary directory invisibly.
This function generates a volcano plot for differentially expressed genes
(DEGs) using ggplot2
. It allows for customization of the plot with
different aesthetic parameters.
plotVolcano(data, data.text, x, y, color, label)
plotVolcano(data, data.text, x, y, color, label)
data |
A data frame containing the DEGs result. |
data.text |
A data frame containing labeled data for text annotation. |
x |
variable representing the aesthetic for the x-axis. |
y |
variable representing the aesthetic for the y-axis. |
color |
variable representing the column name for the color aesthetic. |
label |
variable representing the column name for the text label aesthetic. |
A ggplot
object representing the volcano plot.
This function downloads gene expression data from the Gene Expression Omnibus (GEO) database. It retrieves either the expression matrix or the supplementary tabular data if the expression data is not available. The function also allows for the conversion of probe identifiers to gene symbols and can combine multiple probes into a single symbol.
prepare_geo(geo, dir = ".", combine = TRUE, method = "max")
prepare_geo(geo, dir = ".", combine = TRUE, method = "max")
geo |
A character string specifying the GEO Series ID (e.g., "GSE12345"). |
dir |
A character string specifying the directory where files should be downloaded. Default is the current working directory ( |
combine |
A logical value indicating whether to combine multiple probes into a single gene symbol. Default is |
method |
A character string specifying the method to use for combining probes into a single gene symbol. Options are |
A list containing:
data |
A data frame of the expression matrix. |
sample |
A data frame of the sample metadata. |
feature |
A data frame of the feature metadata, which includes gene symbols if combining probes. |
This function prepares TCGA data for downstream analyses such as differential expression analysis with limma
or survival analysis.
It extracts and processes the necessary information from the TCGA data object, separating tumor and non-tumor samples.
prepare_tcga(data)
prepare_tcga(data)
data |
A |
A list.
This function renames the column names of a data frame or matrix to the specified names.
setcolnames(object = nm, nm)
setcolnames(object = nm, nm)
object |
A data frame or matrix whose column names will be renamed. |
nm |
A character vector containing the new names for the columns. |
A data frame or matrix with the new column names.
This function renames the row names of a data frame or matrix to the specified names.
setrownames(object = nm, nm)
setrownames(object = nm, nm)
object |
A data frame or matrix whose row names will be renamed. |
nm |
A character vector containing the new names for the rows. |
A data frame or matrix with the new row names.
This function sets a directory path for saving files, creating the directory if it
does not already exist. The directory path is created with the given arguments, which
are passed directly to file.path()
.
setSavedir(...)
setSavedir(...)
... |
Arguments to be passed to |
The path to the newly created or existing directory.
This function splits a matrix into multiple smaller matrices by column. It is useful for processing large matrices in chunks, such as when performing analysis on a single computer with limited memory.
split_matrix(matrix, chunk_size)
split_matrix(matrix, chunk_size)
matrix |
A numeric or logical matrix to be split. |
chunk_size |
The number of columns to include in each smaller matrix. |
A list of smaller matrices, each with chunk_size
columns.
theme_publication
creates a custom ggplot2 theme designed for academic publications, ensuring clarity, readability, and a professional appearance.
It is based on theme_classic()
and includes additional refinements to axis lines, text, and other plot elements to meet the standards of high-quality academic figures.
theme_publication(base_size = 12, base_family = "sans")
theme_publication(base_size = 12, base_family = "sans")
base_size |
numeric, the base font size. Default is 12. |
base_family |
character, the base font family. Default is "sans". |
A ggplot2 theme object that can be applied to ggplot2 plots.
ggplot2 theme.
library(ggplot2) p <- ggplot(mtcars, aes(mpg, wt)) + geom_point() + theme_publication() print(p)
library(ggplot2) p <- ggplot(mtcars, aes(mpg, wt)) + geom_point() + theme_publication() print(p)
This function tunes the resolution
parameter in Seurat::FindClusters()
and the number of top differential genes (N
) to obtain different cell type annotation results. The function generates UMAP plots for each parameter combination, allowing for a comparison of how different settings affect the clustering and annotation.
tuneParameters(srt, resolution = numeric(), N = integer(), spc)
tuneParameters(srt, resolution = numeric(), N = integer(), spc)
srt |
Seurat object, the input data object to be analyzed. |
resolution |
numeric vector, a vector of resolution values to be tested in |
N |
integer vector, a vector of values indicating the number of top differential genes to be used for matching in |
spc |
character, the species parameter for the |
A list of ggplot2 objects, each representing a UMAP plot generated with a different combination of resolution and N parameters.
This function maps UniProt IDs to other identifiers using UniProt's ID mapping service. It sends a request to the UniProt API to perform the mapping and retrieves the results in a tabular format.
uniprot_id_map(...)
uniprot_id_map(...)
... |
Parameters to be passed in the request body. |
A data.table
containing the mapped identifiers.
uniprot_id_map( ids = "P21802,P12345", from = "UniProtKB_AC-ID", to = "UniRef90" )
uniprot_id_map( ids = "P21802,P12345", from = "UniProtKB_AC-ID", to = "UniRef90" )
This function allows you to perform operations in a specified directory and then return to the original directory. It is useful when you need to work with files or directories that are located in a specific location, but you want to return to the original working directory after the operation is complete.
workIn(dir, expr)
workIn(dir, expr)
dir |
The directory path in which to operate. If the directory does not exist, it will be created recursively. |
expr |
An R expression to be evaluated within the specified directory. |
The result of evaluating the expression within the specified directory.