Description Usage Arguments Value Examples
View source: R/get_expressed_genes.R
Updating expressed regions with the expressed gene that is closest to it. After entering the tissue that has been sequenced, the nearest gene and nearest expressed gene will be added to the metadata columns of the annotated ERs.
1 2 3 4 5 6 7 8 | add_expressed_genes(
input_file = NULL,
tissue,
gtf,
species = "Homo_sapiens",
annot_ers,
type_col_name = "type"
)
|
input_file |
GTEX median expression file, if left as NULL the default file will be used. |
tissue |
Tissue to filter for. See |
gtf |
Either a string containg the path to a .gtf file or a pre-imported
gtf using |
species |
character string containing the species to filter for, Homo sapiens is the default |
annot_ers |
annotated ERs i.e. the product of |
type_col_name |
column name in the gtf file to filter on genes. Default is "type |
Granges with annotated ERs and details of their nearest expressed genes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | gtf_url <- paste0(
"http://ftp.ensembl.org/pub/release-103/gtf/",
"homo_sapiens/Homo_sapiens.GRCh38.103.chr.gtf.gz"
)
gtf_path <- file_cache(gtf_url)
gtf_gr <- rtracklayer::import(gtf_path)
ex_opt_ers <- GenomicRanges::GRanges(
seqnames = S4Vectors::Rle(c("chr21", "chr22"), c(2, 2)),
ranges = IRanges::IRanges(
start = c(5116369, 5118691, 5125879, 5128214),
end = c(5117231, 5118847, 5125988, 5128403)
)
)
ex_opt_ers_w_exp_genes <- add_expressed_genes(
tissue = "lung", gtf = gtf_gr,
annot_ers = ex_opt_ers
)
ex_opt_ers_w_exp_genes
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.