xmuhuanglab / eNet

10 stars 7 forks source link

Error in h(simpleError(msg, call)) #2

Closed fork16 closed 2 years ago

fork16 commented 2 years ago

Hi , I got a error when running at step '--- 2.2 obtain significantly correlated peak-gene pairs'

GPTabFilt <- FindNode(GPTab = GPTab, # data frame of gene-peak correlation
                      genome = "hg19", # reference genome, must be one of "hg19", "mm10", or "hg38"
                      estimate = 0, # the threshold value of peak-gene correlation to determine whether the peak-gene pair is significantly correlated
                      proPadSize = 2000, # base pairs padded on either side of gene TSS for enhancer
                      FDR = 0.05 # the threshold value of FDR to determine whether the peak-gene pair is significantly correlated
)

Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[': error in evaluating the argument 'x' in selecting a method for function 'which': unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

Here is my sessionInfo

R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.1 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale: [1] C

attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets [8] methods base

other attached packages: [1] doParallel_1.0.17 iterators_1.0.14
[3] foreach_1.5.2 Matrix_1.4-1
[5] SummarizedExperiment_1.20.0 Biobase_2.50.0
[7] GenomicRanges_1.42.0 GenomeInfoDb_1.29.10
[9] MatrixGenerics_1.2.1 matrixStats_0.62.0
[11] dplyr_1.0.9 TFBSTools_1.28.0
[13] reshape2_1.4.4 sp_1.5-0
[15] SeuratObject_4.1.0 Seurat_4.1.1
[17] IRanges_2.24.1 S4Vectors_0.28.1
[19] BiocGenerics_0.39.2 Signac_1.7.0

fork16 commented 2 years ago

I found the function FindNode in MainFunc.R and test it line by line , finally found the error is %over% in line 82 > tmp <- peakSummits[which(peakSummits %over% all)]

Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[': error in evaluating the argument 'x' in selecting a method for function 'which': unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

> peakSummits %over% all

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

I don't understand what this function does, please tell me how to debug .Thanks a lot!

xmuhuanglab commented 2 years ago

I found the function FindNode in MainFunc.R and test it line by line , finally found the error is %over% in line 82 > tmp <- peakSummits[which(peakSummits %over% all)]

Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[': error in evaluating the argument 'x' in selecting a method for function 'which': unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

> peakSummits %over% all

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

I don't understand what this function does, please tell me how to debug .Thanks a lot!

Thanks a lot for your interest in eNet! The function %over% is for finding the overlap region of one peak list over another. We suggest you to change another version of IRanges_2.20.2, which works well for us. If this doesn't work, maybe you could use the function findOverlaps() from the same package to replace %over%, eg. a[queryHits(findOverlaps(a, b))] equals a[which(a %over% b)]. Hope these suggestions will help you.

fork16 commented 2 years ago

I found the function FindNode in MainFunc.R and test it line by line , finally found the error is %over% in line 82 > tmp <- peakSummits[which(peakSummits %over% all)]

Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[': error in evaluating the argument 'x' in selecting a method for function 'which': unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

> peakSummits %over% all

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'over' for signature '"GRanges", "GRanges"'

I don't understand what this function does, please tell me how to debug .Thanks a lot!

Thanks a lot for your interest in eNet! The function %over% is for finding the overlap region of one peak list over another. We suggest you to change another version of IRanges_2.20.2, which works well for us. If this doesn't work, maybe you could use the function findOverlaps() from the same package to replace %over%, eg. a[queryHits(findOverlaps(a, b))] equals a[which(a %over% b)]. Hope these suggestions will help you.

It does! Although I failed to download the version of IRanges_2.20.2 , the function findOverlaps() help me debug successfully. Thanks for your example.