Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in seqinfo(con): UCSC library operation failed: Windows error importing bigwigs #6

Open
bschilder opened this issue May 22, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@bschilder
Copy link
Collaborator

rtracklayer::import.bw seems to be having a number of issues. This one seems most relevant to the error below:
lawremi/rtracklayer#65

--- re-building 'peakyfinders.Rmd' using rmarkdown
Quitting from lines 71-82 (peakyfinders.Rmd) 
Error: Error: processing vignette 'peakyfinders.Rmd' failed with diagnostics:
BiocParallel errors
  1 remote errors, element index: 1
  0 unevaluated and other errors
  first remote error:
Error in seqinfo(con): UCSC library operation failed
--- failed re-building 'peakyfinders.Rmd'
SUMMARY: processing the following file failed:
  'peakyfinders.Rmd'
Error: Error: Vignette re-building failed.
Execution halted
Error: Error in proc$get_built_file() : Build process failed
Calls: <Anonymous> ... build_package -> with_envvar -> force -> <Anonymous>
Execution halted
Error: Process completed with exit code 1.

The error only comes up with bigwig files on Windows; other file types like broad/narrowPeaks work fine with the rtracklayer::import function (including on Windows).

@bschilder bschilder added the bug Something isn't working label May 22, 2022
@bschilder
Copy link
Collaborator Author

bschilder commented May 22, 2022

Possible alternative method: plyranges::read_bigwig
https://www.bioconductor.org/packages/release/bioc/html/plyranges.html

Same errors, i think it relies on rtracklayer under the hood.

@bschilder
Copy link
Collaborator Author

bschilder commented May 22, 2022

Seems this is a known issue, though not sure why a more informative error message isn't given in that case.

Screenshot 2022-05-23 at 00 16 18

Even so, still seems to be failing on Mac too:

query_granges <- PeakyFinders::get_genome(keep.chr = "chr22", style = "NCBI")
    bw.file <- paste0(
        "https://www.encodeproject.org",
        "/files/ENCFF103JOZ/@@download/ENCFF103JOZ.bigWig"
    )
    bw.filt <- plyranges::read_bigwig(file = bw.file,
                                      genome_info = query_granges)

Screenshot 2022-05-23 at 00 21 48

Tried both UCSC and NCBI chromosome format, but same error as before.

This doesn't help either:

 query_granges <- rtracklayer::BigWigSelection(ranges = query_granges,
                                                  colnames = "score")

@bschilder
Copy link
Collaborator Author

bschilder commented May 22, 2022

Also appears to be some differences in how rtracklayer performs in R vs. Rstudio:
https://support.bioconductor.org/p/p133244/

@bschilder
Copy link
Collaborator Author

bschilder commented May 22, 2022

Same error after downloading the whole bigwig and trying to import the local version

 tmp <- tempfile()
    download.file(bw.file, tmp)
bw.filt <- rtracklayer::import.bw(
        con = tmp,
        selection = query_granges
    )

Noticed it seems to be compressed but doesn't have a ".gz" suffix. Renaming local file with ".gz" suffix doesn't seem to have any effect.

@bschilder
Copy link
Collaborator Author

Tried import.wig for a longshot. Diff error (expected):
Screenshot 2022-05-23 at 01 11 40

@bschilder
Copy link
Collaborator Author

Temporary solution: Run rtracklayer_bigwig_error whenever relevant function called.

rtracklayer_bigwig_error <- function(){
    is_windows <- .Platform$OS.type=="windows"
    if(is_windows){
        stop(
            "rtracklayer::import.bw() does not work on Windows.",
            "Please contact the rtracklayer developers to address this issue.")
    }
    return(is_windows)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant