Skip to content

Commit e453539

Browse files
committed
add biotype param
1 parent 590ae44 commit e453539

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

R/locuszoom.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ locuszoom.GWASFormatter <- function(x, locus_chr, locus_start, locus_end, includ
220220

221221
#' @describeIn locuszoom Method for data.frame/tibble objects
222222
#' @export
223-
locuszoom.data.frame <- function(x, locus_chr, locus_start, locus_end, include_ccres = FALSE, ccre_biosample = NULL, ccre_cell_type = NULL, ...) {
223+
locuszoom.data.frame <- function(x, locus_chr, locus_start, locus_end, include_ccres = FALSE, ccre_biosample = NULL, ccre_cell_type = NULL, valid_biotype = "protein_coding", ...) {
224224
# Filter GWAS data for the locus
225225
df <- dplyr::filter(
226226
x,
@@ -236,11 +236,12 @@ locuszoom.data.frame <- function(x, locus_chr, locus_start, locus_end, include_c
236236
genes <- dplyr::filter(
237237
gencode,
238238
type == "gene",
239-
gene_biotype == "protein_coding",
239+
gene_biotype %in% .env[["valid_biotype"]], # Use the valid_biotype parameter
240240
chrom == locus_chr,
241241
start <= locus_end,
242242
end >= locus_start
243243
) # Get exon (CDS) data for this region
244+
244245
exons <- dplyr::filter(
245246
gencode,
246247
type == "CDS",

0 commit comments

Comments
 (0)