wb_clean_gene_names: Clean up old gene names

View source: R/clean_gene_names.R

wb_clean_gene_namesR Documentation

Clean up old gene names

Description

Takes a list of (potentially old) Wormbase gene IDs, and replaces the Dead ones with current IDs. This corresponds to the [Gene Name Sanitizer](https://wormbase.org/tools/mine/gene_sanitizer.cgi) available on Wormbase.

Note this function only works with gene IDs (of the form WBGene00000001), not symbols or other sequence names, while the online tool can potentially correct old gene names. The file downloaded by the (unexported) function 'wb_get_gene_name_history()' contains additional information, ask if you need this functionality to be added to the package.

Usage

wb_clean_gene_names(
  gene_id,
  warn_missing = TRUE,
  dir_cache = NULL,
  refresh = 20
)

Arguments

gene_id

Vector of gene IDs to clean.

warn_missing

Warn if some gene IDs are not found.

dir_cache

Directory where the downloaded files are cached.

refresh

Number of days after which the downloaded list needs to be refreshed.

Value

An updated list of gene IDs.

Examples

## Not run: 
gids <- wb_load_gene_ids(294)
genes_of_interest <- c("WBGene00012733", "WBGene00000424", "WBGene00007566", "WBGene00045409")
i2s(genes_of_interest, gids, warn_missing = TRUE)
cleaned_genes <- wb_clean_gene_names(genes_of_interest)
i2s(cleaned_genes, gids, warn_missing = TRUE)

## End(Not run)

AlexWeinreb/wbData documentation built on April 3, 2025, 1:24 p.m.