convert_to_coord: Convert gene symbols to coordinates

View source: R/convert_to_coord.R

convert_to_coordR Documentation

Convert gene symbols to coordinates

Description

Convert the 'symbol' column (gene names) into three columns with gene coordinates 'chr', 'start' and 'end'.

Usage

convert_to_coord(ge_df, genes_coord, chrs = c(1:22, "X", "Y"), rm_dup = TRUE)

Arguments

ge_df

the data.frame with gene expression and one column 'symbol' with gene names.

genes_coord

either a file name or a data.frame with coordinates and gene names.

chrs

the chromosome names to keep. NULL to include all the chromosomes.

rm_dup

remove duplicated coordinates? Default is TRUE.

Details

If genes_coord is a filename, the file is expected to be a tab-delimited file with four columns: 'chr', 'start', 'end', 'symbol'. The order of the columns is not important.

The gene names in column 'symbol' should match the gene names in the input ge_df.

Value

a data.frame with columns 'chr', 'start', 'end' columns with genes coordinates (and still one column per barcode).

Author(s)

Jean Monlong


jmonlong/scCNAutils documentation built on May 3, 2022, 4:34 a.m.