aertslab / SCENIC

SCENIC is an R package to infer Gene Regulatory Networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
394 stars 94 forks source link

Error in scenicOptions #311

Closed ahsr-cell closed 2 years ago

ahsr-cell commented 2 years ago

Hi there, first posting on github, please let me know if I need to share any further information in order to receive help.

I have been having issues with the scenicOptions object such that I run into errors when attempting the subsequent steps (runSCENIC_1_coexNetwork2modules(scenicOptions), etc.): `

scenicOptions <- runSCENIC_1_coexNetwork2modules(scenicOptions) 11:54 Creating TF modules Number of links between TFs and targets (weight>=0.001): 1575188 [,1] nTFs 942 nTargets 5168 nGeneSets 6193 nLinks 2226733 Error in runSCENIC_1_coexNetwork2modules(scenicOptions) : no slot of name "status" for this object of class "ScenicOptions"`

I should note that I have conducted the first step of SCENIC (>runGenie3(exprMat_filtered, scenicOptions)) on R on a dataset of 14K cells on a computational cluster (running with 24 cores and 64 GB memory) and have imported the results onto my laptop to proceed with the outstanding steps. When importing the scenicOptions.rds, 18 warning messages are given:

`

scenicOptions <- readRDS("int/scenicOptions.Rds") There were 18 warnings (use warnings() to see them) warnings() Warning messages: 1: In read.table(path, encoding = encoding, header = header, ... : line 2 appears to contain embedded nulls 2: In read.table(path, encoding = encoding, header = header, ... : line 3 appears to contain embedded nulls 3: In read.table(path, encoding = encoding, header = header, ... : line 4 appears to contain embedded nulls 4: In read.table(path, encoding = encoding, header = header, ... : line 5 appears to contain embedded nulls 5: In read.table(path, encoding = encoding, header = header, ... : incomplete final line found by readTableHeader on '~/Desktop/Dissertation/work_in_progress/scRNAseq_bioinformatic_analysis/SCENIC/21June/int/cellInfo.Rds' 6: 'default.stringsAsFactors' is deprecated. Use 'stringsAsFactors = FALSE' instead. See help("Deprecated") 7: In read.table(path, encoding = encoding, header = header, ... : line 2 appears to contain embedded nulls 8: In read.table(path, encoding = encoding, header = header, ... : line 3 appears to contain embedded nulls 9: In read.table(path, encoding = encoding, header = header, ... : line 4 appears to contain embedded nulls 10: In read.table(path, encoding = encoding, header = header, ... : line 5 appears to contain embedded nulls 11: In scan(file = file, what = what, sep = sep, quote = quote, ... : embedded nul(s) found in input 12: 'default.stringsAsFactors' is deprecated. Use 'stringsAsFactors = FALSE' instead. See help("Deprecated") 13: In read.table(path, encoding = encoding, header = header, ... : line 2 appears to contain embedded nulls 14: In read.table(path, encoding = encoding, header = header, ... : line 3 appears to contain embedded nulls 15: In read.table(path, encoding = encoding, header = header, ... : line 4 appears to contain embedded nulls 16: In read.table(path, encoding = encoding, header = header, ... : line 5 appears to contain embedded nulls 17: In scan(file = file, what = what, sep = sep, quote = quote, ... : embedded nul(s) found in input 18: 'default.stringsAsFactors' is deprecated. Use 'stringsAsFactors = FALSE' instead. See help("Deprecated") Warning message: Not a validObject(): no slot of name "status" for this object of class "ScenicOptions" `

This message and inability to conduct the subsequent steps of the SCENIC workflow remain even after removing the scenicOptions object and using the RDS function.

I am wondering if this is related to the results of GENIE3, as I received a warning message after having conducted it on the cluster, stating that my job on the cluster slurm queue had failed to not having allocated enough resources. However, when checking the log, it appears GENIE3 was successful but comes with warning messages.

Using 942 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 2
Running GENIE3 part 3
Running GENIE3 part 4
Running GENIE3 part 5
Running GENIE3 part 6
Running GENIE3 part 7
Running GENIE3 part 8
Running GENIE3 part 9
Running GENIE3 part 10
Finished running GENIE3.
Warning messages:
1: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 1, 2, 4, 9, 11, 12, 13, 16, 19, 21, 23 did not deliver results, all values of the jobs will be affected
2: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 1, 2, 3, 11, 16, 20, 22 did not deliver results, all values of the jobs will be affected
3: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 1, 2, 6, 7, 10, 19, 20, 21, 22 did not deliver results, all values of the jobs will be affected
4: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 1, 2, 4, 10, 22, 23 did not deliver results, all values of the jobs will be affected
5: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 1, 4, 5, 6, 7, 9, 11, 14, 24 did not deliver results, all values of the jobs will be affected
6: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 2, 8, 10, 11, 13, 15, 20, 22, 23 did not deliver results, all values of the jobs will be affected
7: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 2, 4, 7, 9, 11, 13, 16, 17, 18 did not deliver results, all values of the jobs will be affected
8: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 4, 7, 8, 9, 10, 12, 13, 14, 17, 20, 22, 24 did not deliver results, all values of the jobs will be affected
9: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 2, 4, 7, 8, 11, 12, 15, 16, 17, 21, 22, 23 did not deliver results, all values of the jobs will be affected
10: In mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed,  :
  scheduled cores 4, 6, 7, 8, 11, 15, 16, 19, 22, 23, 24 did not deliver results, all values of the jobs will be affected
[1] "2022-06-25 01:16:29 success-genie3 completed"

The "success-genie3 completed" message is a message I include to be reported at the end of my R script to track as to whether the script was able to proceed through each line of code.

In case it is needed: `

sessionInfo() R version 4.2.0 (2022-04-22) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Monterey 12.3.1 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] grid stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] SCENIC_1.3.1 ComplexHeatmap_2.13.0 data.table_1.14.2 BiocParallel_1.31.6
[5] KernSmooth_2.23-20 SCopeLoomR_0.13.0 RcisTarget_1.17.0 AUCell_1.19.1
[9] SingleCellExperiment_1.19.0 GENIE3_1.19.0 clustifyr_1.9.0 EnrichmentBrowser_2.27.0
[13] graph_1.75.0 SummarizedExperiment_1.27.1 Biobase_2.57.1 GenomicRanges_1.49.0
[17] GenomeInfoDb_1.33.3 IRanges_2.31.0 S4Vectors_0.35.0 BiocGenerics_0.43.0
[21] MatrixGenerics_1.9.0 matrixStats_0.62.0 biomaRt_2.53.2 GSVA_1.45.0
[25] dittoSeq_1.9.0 escape_1.7.0 drc_3.0-1 MASS_7.3-57
[29] ggrepel_0.9.1 ggbreak_0.1.0 viridis_0.6.2 viridisLite_0.4.0
[33] reshape_0.8.9 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.9
[37] purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.7
[41] ggplot2_3.3.6 tidyverse_1.3.1 sp_1.5-0 SeuratObject_4.1.0
[45] Seurat_4.1.1
`

Any thoughts in how I might be able to fix my issue in the scenicOptions object?

Thank you in advance for any and all input!

ahsr-cell commented 2 years ago

Just to follow up, this issue was fixed by downgrading to SCENIC_1.1.2-01