Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archi2treeQSM #14

Open
GakenouOF opened this issue Sep 26, 2023 · 2 comments
Open

archi2treeQSM #14

GakenouOF opened this issue Sep 26, 2023 · 2 comments

Comments

@GakenouOF
Copy link

GakenouOF commented Sep 26, 2023

Hello @oliviermartin7,

Thank you for this excellent package.

I would like to understand the archi2treeQSM function well. Does the function convert the archi file to the same output generated in Matlab when you run TreeQSM? I am not familiar with Matlab and i have not run TreeQSM before.

However, I have used your package to create QSM which works perfectly well, and i want to extract the structural metrics from the qsm using ITSMe package (the package only recognize QSM from TreeQSM (.mat files)).

I used the archi2treeQSM function to generate a qsm in treeQSM format, then used the writeMat function from R.matlab to convert the dataframe to .mat file.

When i tried reading in the data using the ITMSe package, i get an error

Error in qsm[, , i] : incorrect number of dimensions

So, i treid using the read_QSM function in aRchi to read in the file, i also get this error

Error in data$startX : object of type 'closure' is not subsettable
In addition: Warning message:
In read_QSM("./output/eucs_arch2.mat", model = "treeQSM") : No QSM found

Please, kindly let me know if i misunderstood the function. It will be of great help if i can convert aRchi file to TreeQSM format

image
image

Thank you.

@j-miszczyszyn
Copy link

Hello @oliviermartin7
I have the same questions @GakenouOF
Conversion to Matlab file and integration with ITSMe package could be a powerfull tool.
Best regards,
Jakub

@oliviermartin7
Copy link
Collaborator

Hello,

aRchi2treeQSM() : creates a data.table with the same order and columns names as in treeQSM. However it does not write a .mat file. This is on the to do list but I unfortunately lack of time to improve the package. But you can maybe write such a file by yourself (package R.matlab ?).

Please note that there are many functions to extract metrics from QSMs with aRchi (treebiomass, treevolume, pathfraction, WBEparameters, fork rate....).

Best,

Olivier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants