cwatson / brainGraph

Graph theory analysis of brain MRI data
166 stars 48 forks source link

error in running make_brainGraphList #23

Closed lupbla closed 3 years ago

lupbla commented 3 years ago

I followed the brainGraph user guide for version 3.0.0., but when I get to the make_brainGraphList command I get the following error: Error in { : task 1 failed - "invalid 'length.out' value" This is a sample of the adjacency matrices adjmats.zip Could you help fix this error?

cwatson commented 3 years ago

Sorry, I thought I had replied to this sooner. I need the code you used and all the data that would allow me to reproduce this error.

lupbla commented 3 years ago

Hi, Thank you for your response. I send the code I used, I tried to make it as straightforward as possible. I think it's still messy, but I'm not very good at coding, sorry. the first two files are the data and the last one has the scripts.

The graphs_old code kind of works, but when I try to get the results into object g with script 04_save it gives me an error. the makeGraphs code gives the length.out error Thank you

El mar., 10 nov. 2020 a las 9:05, Chris Watson (notifications@github.com) escribió:

Sorry, I thought I had replied to this sooner. I need the code you used and all the data that would allow me to reproduce this error.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cwatson/brainGraph/issues/23#issuecomment-724760320, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTBPRPJGLYIGTMFP5V33DSPFJCNANCNFSM4TKV5GLQ . 2020scripts https://drive.google.com/drive/folders/1RDCJ17Hgjzk4FSQ8_-5Ne71asHu0neC9

cwatson commented 3 years ago

I still have not received any code. I cannot debug your issue without it.

lupbla commented 3 years ago

I apologize, I sent you a link to my Google Drive because I got a message that the email was too big. The data is in the drive link: https://drive.google.com/drive/folders/1RDCJ17Hgjzk4FSQ8_-5Ne71asHu0neC9?usp=sharing and the scripts are in the zipped folder I attach. Thank you

El jue., 12 nov. 2020 a las 7:59, Chris Watson (notifications@github.com) escribió:

I still have not received any code. I cannot debug your issue without it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cwatson/brainGraph/issues/23#issuecomment-726094964, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTBPQ2AJLEH6T7W6QQMF3SPPS4FANCNFSM4TKV5GLQ .

cwatson commented 3 years ago

Please do not use code from older versions, as v3.0.0 is not backwards compatible. I have a few other comments:

Otherwise, I did not get any errors. Please make sure you read through the current User Guide. Specifically Chapter 7.3; there is a code block that you can try and it should work for you. If you are new to R programming/scripting, I recommend taking some kind of introductory (short) course or following some tutorials (which can be found online), or if you have the time to read an introductory book (there should be some free e-books out there somewhere).

I will close the issue for now, but please try my suggestions and if there continues to be a problem let me know. You may want to join the Google Group, as I think it is more appropriate for small errors such as this. But if you feel it is necessary, you may reopen the issue.

lupbla commented 3 years ago

thank you very much. What should I set the weighting to instead? I will look up for the google group

El El vie, 13 de noviembre de 2020 a la(s) 7:35, Chris Watson < notifications@github.com> escribió:

Closed #23 https://github.com/cwatson/brainGraph/issues/23.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cwatson/brainGraph/issues/23#event-3993499724, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTBPSCA423BBDRQNI3LKLSPUY2HANCNFSM4TKV5GLQ .

lupbla commented 3 years ago

I tried your suggestions, instead of using the power atlas as custom I used yours and it looked like it was working, but when I check the g object I get this Error in seqlen(no) : argument must be coercible to non-negative integer Is installing the previous version my only option? I attach the code I used and the data is the same as I had shared https://drive.google.com/drive/folders/1RDCJ17Hgjzk4FSQ8-5Ne71asHu0neC9?usp=sharing This is my session info

sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 10 (buster)

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

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] data.table_1.12.8 doMC_1.3.6 iterators_1.0.12 foreach_1.4.8 [5] brainGraph_3.0.0 igraph_1.2.4.2

loaded via a namespace (and not attached): [1] lattice_0.20-40 codetools_0.2-16 permute_0.9-5 MASS_7.3-51.5 [5] grid_3.6.3 magrittr_1.5 doParallel_1.0.15 Matrix_1.2-18 [9] tools_3.6.3 abind_1.4-5 compiler_3.6.3 pkgconfig_2.0.3

El vie., 13 nov. 2020 a las 7:35, Chris Watson (notifications@github.com) escribió:

Please do not use code from older versions, as v3.0.0 is not backwards compatible. I have a few other comments:

  • In your 03_makeGraphs.R script, change the argument groups to grpNames.
  • You set weighting='sld' but your modality is fmri; this does not fit as sld is specific to DTI (streamline density).
  • I do not understand why you load so many packages in your initial script. I presume you use them for some purposes in another script, but it might not be necessary. It could introduce issues with function names conflicting across packages.

Otherwise, I did not get any errors. Please make sure you read through the current User Guide. Specifically Chapter 7.3; there is a code block that you can try and it should work for you. If you are new to R programming/scripting, I recommend taking some kind of introductory (short) course or following some tutorials (which can be found online), or if you have the time to read an introductory book (there should be some free e-books out there somewhere).

I will close the issue for now, but please try my suggestions and if there continues to be a problem let me know. You may want to join the Google Group, as I think it is more appropriate for small errors such as this. But if you feel it is necessary, you may reopen the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cwatson/brainGraph/issues/23#issuecomment-726767912, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTBPXONYIMWBBB6ZKMSZLSPUY2FANCNFSM4TKV5GLQ .

cwatson commented 3 years ago

I assume you are referring to the error you see when you simply type g. That error is specific to igraph, and it is not a critical error, so you would have to contact the igraph developers to solve it. However, it should not affect data analysis.

lupbla commented 3 years ago

thank you, I think I just panicked.

El mié, 18 nov 2020 a las 22:57, Chris Watson (notifications@github.com) escribió:

I assume you are referring to the error you see when you simply type g. That error is specific to igraph, and it is not a critical error, so you would have to contact the igraph developers to solve it. However, it should not affect data analysis.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cwatson/brainGraph/issues/23#issuecomment-730129573, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTBPWGLFBYEEE7YZP5G3DSQSQUNANCNFSM4TKV5GLQ .

lupbla commented 3 years ago

I just noticed that when the make_brainGraphList command ran was when I set atlas <- 'power264' but I excluded five regions when I created the correlation matrix. When I use subnet= regions and set regions to the names of the excluded regions it gives me the same error Error in { : task 1 failed - "invalid subscript type 'list'"

I just don't know how can the graphs be made if the atlas does not match the dimensions of the matrix? I suppose it's taking the first 259 regions and leaving the remaining five out. The code and data I used i exactly the same as the previous I sent you. I'm really sorry to continue to ask about the same question, I was running the previous version and it was working fine. When I saw the new release I didn't think twice before updating.

El jue, 19 nov 2020 a las 15:19, María del Lucero Pacheco Blas (< lupbla@ciencias.unam.mx>) escribió:

thank you, I think I just panicked.

El mié, 18 nov 2020 a las 22:57, Chris Watson (notifications@github.com) escribió:

I assume you are referring to the error you see when you simply type g. That error is specific to igraph, and it is not a critical error, so you would have to contact the igraph developers to solve it. However, it should not affect data analysis.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cwatson/brainGraph/issues/23#issuecomment-730129573, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZTBPWGLFBYEEE7YZP5G3DSQSQUNANCNFSM4TKV5GLQ .

cwatson commented 3 years ago

You are doing it backwards; subnet should include the names of the regions you want to keep. Please read the documentation carefully.