Error in plot.window(...) : need finite 'xlim' values

Create issue
Issue #13 resolved
Jens Friis-Nielsen created an issue

I’m getting the error message in sequenza.results() with the attached binned seqz for R package version 3.0.0.

Error in plot.window(...) : need finite 'xlim' values

The seqz is based on artifically limited test data from chr6.

I tracked it to an NA in chromosome.view L151 https://bitbucket.org/sequenzatools/sequenza/src/ffa81cdfea8e95af47c9461e3a6a8e32742cea81/R/graphics.R#lines-151

I fixed it by changing from

        min.x <- min(c(min(baf.windows$start), min(ratio.windows$start),
            min(mut.tab$position)))
        max.x <- max(c(max(baf.windows$end), max(ratio.windows$end),
            max(mut.tab$position)))

To

        min.x <- min(c(min(baf.windows$start), min(ratio.windows$start), min(mut.tab$position)), na.rm=T)
        max.x <- max(c(max(baf.windows$end), max(ratio.windows$end), max(mut.tab$position)), na.rm=T)

I don’t know how to make an official pull request due to #12

Cheers, and thanks! :)

Comments (4)

  1. Log in to comment