query_jx: Query Junctions/Genes/Exons

View source: R/basic_query_functions.R

query_jxR Documentation

Query Junctions/Genes/Exons

Description

Given one or more gene names or genomic range intervals it will return a list of 0 or more genes, junctions, or exons (depending on which query form is used) which overlap the ranges.

Usage

query_jx(sb, return_rse = TRUE, split_by_region = FALSE)

query_gene(sb, return_rse = TRUE, split_by_region = FALSE)

query_exon(sb, return_rse = TRUE, split_by_region = FALSE)

Arguments

sb

A SnaptronQueryBuilder object

return_rse

Should the query data be returned as a simple data frame or converted to a RangedSummarizedExperiment.

split_by_region

By default the results from multiple queries will be returned in a RangedSummarizedExperiment object with a rowData entry for each, labeling each result row according to the query it resulted from. However, if this is set to TRUE, the result will be a list of RangedSummarizedExperiment objects, one per original interval/gene. This latter option may be useful, but it requires a separate copy of the sample metadata for each original interval/gene.

Value

Functions will return either a RangedSummarizedExperiment or data.table depending on whether the return_rse parameter is set to TRUE or FALSE.

Examples

# Contruct a QueryBuilder object
qb <- QueryBuilder(compilation = "gtex", regions = "chr1:1-100000")
qb <- set_row_filters(qb, samples_count >= 20)
query_jx(qb)

qb <- set_row_filters(qb, NULL)
qb <- set_column_filters(qb, SMTS == "Brain")
query_gene(qb)


langmead-lab/snapcount documentation built on May 1, 2022, 4:27 a.m.