check_gene_df_type: Check gene_df

View source: R/check_gene_df_type.R

check_gene_df_typeR Documentation

Check gene_df

Description

Handles gene_df regardless of whether it's a data.frame, matrix, list, or vector

Usage

check_gene_df_type(gene_df, gene_input, verbose = TRUE)

Arguments

gene_df

Data object containing the genes (see gene_input for options on how the genes can be stored within the object).
Can be one of the following formats:

  • matrix :
    A sparse or dense matrix.

  • data.frame :
    A data.frame, data.table. or tibble.

  • codelist :
    A list or character vector.

Genes, transcripts, proteins, SNPs, or genomic ranges can be provided in any format (HGNC, Ensembl, RefSeq, UniProt, etc.) and will be automatically converted to gene symbols unless specified otherwise with the ... arguments.
Note: If you set method="homologene", you must either supply genes in gene symbol format (e.g. "Sox2") OR set standardise_genes=TRUE.

gene_input

Which aspect of gene_df to get gene names from:

  • "rownames" :
    From row names of data.frame/matrix.

  • "colnames" :
    From column names of data.frame/matrix.

  • <column name> :
    From a column in gene_df, e.g. "gene_names".

verbose

Print messages.

Value

List of gene_df and gene_input


neurogenomics/orthogene documentation built on Jan. 30, 2024, 4:44 a.m.