Closed jakobjn closed 5 months ago
Hi @jakobjn ,
thanks for reporting this! I will look into this and come back to you.
Can you add which FRASER / R / Bionconductor version you are using and provide an example of a txdb
object that results in the error?
@ischeller I'm using FRASER 1.99.3 (1b0cd9581ba1b1ae2bf329821c3a5823ef6505b7) as a Conda package built from this custom recipe. This is to exclusively utilize Conda for package management.
Thanks for the report on this. I merged it now. Please let us know if you still encounter issues.
When using comprehensive gene annotations, unlocalized and unplaced sequences result in an error when attempting to annotate potential impact of splice junctions with
annotatePotentialImpact
.Debugging
txdb
are located on unlocalizedchr*_random
and unplacedchrUn_*
sequences.min(distance(test_junction, refseq.genes), na.rm = TRUE)
to evaluate toInf
. https://github.com/c-mertes/FRASER/blob/e775832aef77c14aa3c414832735bd1b0b9a4e47/R/resultAnnotations.R#L817distance(test_junction, refseq.genes)
in turn evaluates to a vector of exclusively NA's.min(c(NA, NA, ...), na.rm=TRUE)
is equivalent tomin(numeric(0))
, which evaluates toInf
.Inf
is greater than 0, the conditionaldist > 0
evaluates toTRUE
, whereas the code block under the if-statement is erroneously executed. https://github.com/c-mertes/FRASER/blob/e775832aef77c14aa3c414832735bd1b0b9a4e47/R/resultAnnotations.R#L818-L830Fix
This error can be resolved by modifying the condition of the if-statement from
dist > 0
tois.finite(dist) && dist > 0
. https://github.com/c-mertes/FRASER/blob/e775832aef77c14aa3c414832735bd1b0b9a4e47/R/resultAnnotations.R#L818Error