View source: R/higher_level_functions.R
percent_spliced_in | R Documentation |
Similar to the JIR, this calculates Percent Spliced In (PSI) statistics for the definition of 2 different groups: inclusion and exclusion. Currently this function only supports the cassette exon use case.
percent_spliced_in( inclusion_group1, inclusion_group2, exclusion_group, min_count = 20, group_names = NULL )
inclusion_group1, inclusion_group2, exclusion_group |
Where each is a list of 1 or more QueryBuilder objects |
min_count |
minimum total count (denominator) required to not be assigned -1 |
group_names |
Optional vector of strings representing the group names |
Inclusion typically defines 2 basic queries, one for the junction preceding the cassette exon, and the second for the junction following the cassette exon. The exclusion group contains one basic query which defines the junction which skips the cassette exon.
The PSI itself is implemented as:
PSI(inclusion1, inclusion2, exclusion) =
mean(inclusion1, inclusion2) / (mean(inclusion1, inclusion2) + exclusion)
where each term denotes the coverage of junctions that resulted from the basic queries in that group in the current sample.
A DataFrame of samples, with their PSI score and metadata, which had > 0 coverage in at least one resulting row in at least one of the groups
in1 <- QueryBuilder(compilation = "srav2", regions = "chr1:94468008-94472172") in1 <- set_coordinate_modifier(in1, Coordinates$Exact) in1 <- set_row_filters(in1, strand == "+") in2 <- QueryBuilder(compilation = "srav2", regions = "chr1:94468008-94472172") in2 <- set_coordinate_modifier(in2, Coordinates$Exact) in2 <- set_row_filters(in2, strand == "+") ex <- QueryBuilder(compilation = "srav2", regions = "chr1:94468008-94475142") ex <- set_coordinate_modifier(ex, Coordinates$Exact) ex <- set_row_filters(ex, strand == "+") percent_spliced_in(list(in1), list(in2), list(ex))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.