raphaelmourad / DeepG4

DeepG4: A deep learning approach to predict active G-quadruplexes
9 stars 2 forks source link

Trying to load my own sequence without accessibility #2

Closed kailingli closed 1 year ago

kailingli commented 1 year ago

My code is like:

library(Biostrings)
library(rtracklayer)
library(BSgenome.Hsapiens.UCSC.hg19)
library(DeepG4)

sequences <- import.bed(system.file("extdata","cand_pos_all.bed", package = "DeepG4"))
sequences <- getSeq(BSgenome.Hsapiens.UCSC.hg19,sequences)
res <- DeepG4Scan(X = sequences,k=20,treshold=0.5)

then I got this error:

Error in connectionForResource(manager, resource, open = "r") : 
  path cannot be an empty string

I am not sure why, but it seems related to the "rtracklayer" package. Does any one have this problem?

Thanks!!

kailingli commented 1 year ago

system.file("extdata","cand_pos_all.bed", package = "DeepG4") this seems looking for path of "example" files that come with the DeepG4 package

sequences <- import.bed(“path/to/file”) just use this will do the trick.

rochevin commented 1 year ago

Hello, Thanks for uysing DeepG4, system.file is a function to get the local path of a file I put on the package, to load your data, you just have to precise the path, as you did.

Bests,