Prepare Gesel gene annotation files containing the gene identifiers.
prepareGeneFiles(
species,
genes,
path = ".",
validate = TRUE,
version = c("0.2.0", "0.1.0")
)String specifying the species in the form of its NCBI taxonomy ID.
Named list of lists. Each inner list corresponds to an identifier type (e.g., Ensembl) and is named accordingly. Each inner list should be of length equal to the total number of genes. Each entry of the inner list corresponds to a gene and should be a character vector containing identifiers of the specified type for that gene. An entry may be an empty character vector is no identifiers are available for a gene.
Alternatively, a data frame where each row corresponds to a gene and each column is a nested list of identifiers of a particular type,
see the output of fetchAllGenes for details.
String containing the path to a directory in which to create the gene annotation files.
Boolean indicating whether to run validateGeneFiles on the newly created files.
String specifying the version of the Gesel gene annotation file specification to use for saving genes.
Several files are produced inside path with the <species>_ prefix.
NULL is invisibly returned.
prepareDatabaseFiles, to create Gesel database files containing the gene set information.
genes <- list(
ensembl = list("ENSG1", c("ENSG2", "ENSG3"), character(0), "ENSG4"),
entrez = list("1", character(0), c("2", "3", "4"), c("5", "6")),
foobar = list("malat1", "neat1", "Gm1234", "LINC0000001")
)
tmp <- tempfile()
dir.create(tmp)
prepareGeneFiles("1234", genes, tmp)
list.files(tmp)
#> [1] "1234_gene-type-ensembl.tsv.gz" "1234_gene-type-entrez.tsv.gz"
#> [3] "1234_gene-type-foobar.tsv.gz" "1234_gene-types.tsv"
#> [5] "1234_gene-version.tsv"