getValidEvents {psichomics} | R Documentation |
Filters the events with valid elements according to the given validator
getValidEvents(event, validator, areMultipleExonsValid = FALSE)
event |
Data.frame containing only one event with at least 7 columns as retrieved from the alternative splicing annotation files from MISO (GFF3 files) |
validator |
Character: valid elements for each event |
areMultipleExonsValid |
Boolean: consider runs of exons as valid when comparing with the validator? Default is FALSE (see details) |
areMultipleExonsValid
allows to consider runs of exons (i.e.
sequences where "exon" occurs consecutively) as valid when comparing with
given validator. For example, if the validator is c("gene", "mRNA",
"exon")
and areMultipleExonsValid = FALSE
, this function will only
considerate events as valid if they have the exact same elements. If
areMultipleExonsValid = TRUE
, a valid events could include the
elements c("gene", "mRNA", "exon", "exon", "exon")
.
Data.frame with valid events
event <- read.table(text = " chr1 SE gene 17233 18061 . - . chr1 SE dkfd 00000 30000 . - . chr1 SE mRNA 17233 18061 . - . chr1 SE exon 17233 17368 . - . chr1 SE exon 17526 17742 . - . chr1 SE exon 17915 18061 . - . chr1 SE mRNA 17233 18061 . - . chr1 SE exon 17233 17368 . - . chr1 SE exon 17915 18061 . - . chr1 SE gene 17233 18061 . - . chr1 SE mRNA 17233 18061 . - . chr1 SE exon 17233 17368 . - . chr1 SE exon 17606 17742 . - . chr1 SE exon 17915 18061 . - . chr1 SE mRNA 17233 18061 . - . chr1 SE exon 17233 17368 . - . chr1 SE exon 17915 18061 . - . ") validator <- c("gene", "mRNA", rep("exon", 3), "mRNA", rep("exon", 2)) psichomics:::getValidEvents(event, validator)