junction_union: Get the union of junctions from 2 or more compilations which...

View source: R/higher_level_functions.R

junction_unionR Documentation

Get the union of junctions from 2 or more compilations which are on the same reference

Description

This function queries 2 or more compilations which are on the same reference version (e.g. hg38) and merges the resulting junctions into a single output table, unioning the sample coverage columns and the snaptron_id (jx ID) columns (the latter delimiter will be ":"). All sample IDs will be disjoint between compilations.

Usage

junction_union(...)

Arguments

...

One or more QueryBuilder objects

Details

Union is based on the following fields (combined into a comparison key):

  • group

  • chromosome

  • start

  • end

  • strand

The goal is to have a single list of junctions where every junction occurs in at least one compilation and if a junction occurs in > 1 compilations it still only has a single row representing all the samples across compilations that it appears in. Sample aggregate statistics will be recalculated for junctions which are merged across all samples from all compilations:

  • sample_count

  • coverage_sum

  • coverage_avg

  • coverage_median

Value

A RangedSummarizedExperiment of junctions appearing in at least one compilation

See Also

junction_intersection()

Examples

# Using query builder wrappers
sb1 <- QueryBuilder(compilation = "gtex", regions = "chr1:1879786-1879786")
sb1 <- set_coordinate_modifier(sb1, Coordinates$EndIsExactOrWithin)
sb1 <- set_row_filters(sb1, strand == "-")

sb2 <- QueryBuilder(compilation = "tcga", regions = "chr1:1879786-1879786")
sb2 <- set_coordinate_modifier(sb2, Coordinates$EndIsExactOrWithin)
sb2 <- set_row_filters(sb2, strand == "-")

junction_union(sb1, sb2)

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