Hi! I am working with the species Atlantic salmon (sasa), and I have performed RNAseq on some tissues. I want to visualize the pathways sasa01040 - Biosynthesis of unsaturated fatty acids (number 85) and sasa01212 Fatty acid metabolism (89) using pathview, comparing two tissues with eachother. I have already visualized other pathways using this code, which has worked, and the figures are looking good. When putting in number 85 and 89, I get this error message as seen below. I have tried adjusting kegg.native = F and same.layer = F, but these figures are not usable.
Thank you in advance for tips how to get around this problem.
> for(i in 85) {
+
+ pv.out<-pathview(gene.data = mat2c[,1],pathway.id = sasa_kegg_pw_2025[i,1],
+ species = "sasa", out.suffix = sasa_kegg_pw_2025[i,2], kegg.native = T,
+ low = list(gene = "blue"), mid = list(gene = "gray"),
+ high = list(gene = "red"), na.col = "transparent",
+ same.layer = T, limit = 3)
+ print(pv.out)
+
+
+ }
Warning: No annotation package for the species sasa, gene symbols not mapped!
Info: Working in directory C:/Users/ingholml/OneDrive - Universitetet i Oslo/rnaseq_oct24/ncbi/kegg2
Info: Writing image file sasa01040.Biosynthesis of unsaturated fatty acids.png
Info: some node width is different from others, and hence adjusted!
Error in array(col.rgb[, i], dim(node.rgb)[3:1]) :
negative length vectors are not allowed
sessionInfo( )
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] C
time zone: Europe/Oslo
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pathview_1.40.0 clusterProfiler_4.8.3 ggpubr_0.6.0 ggplot2_3.5.1
[5] AnnotationHub_3.8.0 BiocFileCache_2.8.0 dbplyr_2.3.4 BiocGenerics_0.46.0
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 rstudioapi_0.15.0 jsonlite_1.8.8
[4] magrittr_2.0.3 farver_2.1.1 fs_1.6.3
[7] zlibbioc_1.46.0 vctrs_0.6.5 memoise_2.0.1
[10] RCurl_1.98-1.14 ggtree_3.8.2 rstatix_0.7.2
[13] htmltools_0.5.7 S4Arrays_1.0.5 curl_6.0.1
[16] broom_1.0.5 gridGraphics_0.5-1 plyr_1.8.9
[19] cachem_1.0.8 igraph_2.1.2 mime_0.12
[22] lifecycle_1.0.4 pkgconfig_2.0.3 Matrix_1.6-5
[25] R6_2.5.1 fastmap_1.1.1 gson_0.1.0
[28] shiny_1.8.0 GenomeInfoDbData_1.2.10 MatrixGenerics_1.12.3
[31] digest_0.6.34 aplot_0.2.4 enrichplot_1.20.3
[34] colorspace_2.1-0 patchwork_1.2.0 AnnotationDbi_1.62.2
[37] S4Vectors_0.38.1 DESeq2_1.40.2 GenomicRanges_1.52.0
[40] RSQLite_2.3.4 org.Hs.eg.db_3.17.0 filelock_1.0.3
[43] fansi_1.0.6 httr_1.4.7 polyclip_1.10-6
[46] abind_1.4-5 compiler_4.3.2 bit64_4.0.5
[49] withr_2.5.2 downloader_0.4 backports_1.4.1
[52] BiocParallel_1.34.2 carData_3.0-5 viridis_0.6.4
[55] DBI_1.2.1 ggforce_0.4.1 ggsignif_0.6.4
[58] MASS_7.3-60.0.1 rappdirs_0.3.3 DelayedArray_0.26.7
[61] HDO.db_0.99.1 tools_4.3.2 interactiveDisplayBase_1.38.0
[64] ape_5.7-1 scatterpie_0.2.4 httpuv_1.6.13
[67] glue_1.7.0 promises_1.2.1 nlme_3.1-163
[70] GOSemSim_2.26.1 grid_4.3.2 shadowtext_0.1.4
[73] reshape2_1.4.4 fgsea_1.26.0 generics_0.1.3
[76] gtable_0.3.4 tidyr_1.3.1 data.table_1.14.10
[79] tidygraph_1.3.1 car_3.1-2 utf8_1.2.4
[82] XVector_0.40.0 BiocVersion_3.17.1 ggrepel_0.9.5
[85] pillar_1.9.0 stringr_1.5.1 yulab.utils_0.1.9
[88] later_1.3.2 splines_4.3.2 dplyr_1.1.4
[91] tweenr_2.0.2 treeio_1.24.3 lattice_0.22-5
[94] bit_4.0.5 tidyselect_1.2.0 GO.db_3.17.0
[97] locfit_1.5-9.8 Biostrings_2.68.1 gridExtra_2.3
[100] IRanges_2.34.1 SummarizedExperiment_1.30.2 stats4_4.3.2
[103] graphlayouts_1.2.1 Biobase_2.60.0 matrixStats_1.2.0
[106] KEGGgraph_1.60.0 stringi_1.8.3 yaml_2.3.8
[109] lazyeval_0.2.2 ggfun_0.1.8 codetools_0.2-19
[112] ggraph_2.2.1 tibble_3.2.1 qvalue_2.32.0
[115] Rgraphviz_2.44.0 graph_1.78.0 BiocManager_1.30.25
[118] ggplotify_0.1.2 cli_3.6.2 xtable_1.8-4
[121] munsell_0.5.0 Rcpp_1.0.12 GenomeInfoDb_1.36.4
[124] png_0.1-8 XML_3.99-0.16 parallel_4.3.2
[127] ellipsis_0.3.2 blob_1.2.4 DOSE_3.26.2
[130] bitops_1.0-7 viridisLite_0.4.2 tidytree_0.4.6
[133] scales_1.3.0 purrr_1.0.2 crayon_1.5.2
[136] rlang_1.1.3 cowplot_1.1.2 fastmatch_1.1-4
[139] KEGGREST_1.40.1
FYI: a similar, if not identical issue has been reported before (
pathview
has problems visualizing some pathways, but not all). You likely have seen that thread: pathview error "negative length vectors are not allowedAFAIK no solution has been found... unfortunately.