Giter Site home page Giter Site logo

james-cole / brainager Goto Github PK

View Code? Open in Web Editor NEW
73.0 73.0 26.0 290.26 MB

Software for generating a brain-predicted age value, using Gaussian Processes regression, implemented in R

License: GNU Lesser General Public License v3.0

Shell 52.21% R 14.45% MATLAB 33.34%

brainager's People

Contributors

james-cole avatar neurolabusc avatar rdoerfel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brainager's Issues

brainageR on MAC vs Linux

If you run this on MAC you need to have greadlink command to read the path to the T1 image but if you run this on Linux you need to have readlink command to be able to read T1 scan.

Difference in predicted age between standard and dockerised version of scipts

Hi, When running the docker version of the script I am getting predicted ages that are significantly younger than when running the standard script on the same data. For example with the standard script the predicted age was 47.37, but for the same data with the docker script the predicted age was 37.54.
I was expecting some minor variations of course, but this seems too large. Has anyone experienced this? If so what might be causing it, and do you know how I could I rectify this to align the predictions.

Make installation section more explicit

Hey!

While I installed the package on one of my machines, I ran into some struggles, which I believe could have been avoided in the first place if the installation guide had been a little more explicit. Nothing bad; I just had some moments of confusion while installing everything. Since I expect to install it on other machines in the future, I adapted your guide a little bit to what I believe is a little more instructive and explicit.

You can find the adapted version here.

If you feel like this would be an improvement to your installation guide, I'd be more than happy to open a PR to discuss and merge the changes into your repository. Otherwise, sorry for the noise :)

SPM12 version

Hi There,

May I ask what was the version of SPM12 you used when you developed this brainageR toolbox? Does it matter which version of SPM12 we are using to run this toolbox?

Error with failed to find grey matter

Hi brainageR experts,

I was running brainageR with Docker and an error occurred, as

Item 'Volumes', field 'val': Number of matching files (0) less than required (1).
error: No executable modules, but still unresolved dependencies or incomplete module inputs.
error: called from
spm_jobman>fill_run_job at line 472 column 5
spm_jobman at line 247 column 13
spm_preprocess_brainageR at line 102 column 1
init_octave at line 1 column 41
Processed grey matter file not found: SPM12 pre-processing probably failed

The full log was also uploaded, please check it in attachment.
Bug_log.txt

However, this error only occurred when the input T1w image is the preprocessed T1w image using fMRIprep (sub-xxx_desc-preproc_T1w.nii.gz). It would not appear using the raw T1w image. I am not sure if the inputs make the difference.

And I would like to ask a following question. In a previous dataset, I ran brainageR successfully for each subject. The dataset has 91 depression patients with another 91 matched health controls. As a result, the correlation between predicted age and real age is 0.77 for the patients and 0.78 for the controls. Do you have any ideas about why the predicted efficiency shows relatively low comparing with your reports.

Thanks in advance.

How to correct predicted brain age?

Hi,

Brain age model are often impacted by the regression to the mean, resulting an overestimation of the age of younger subjects and an underestimation of the age of older subjects. I tested this model on PPMI dataset, but found that most subjects are with much younger brain age.

I think some correction should be conducted here. For example, one way is to rely on the slope (alpha) and intercept (beta) of a linear regression model of BrainAGE against chronological age in the training set. This way an offset is calculated (as alpha * omega + beta) and then subtracted from the estimated brain-age to yield a bias-free BrainAGE.

Could you offer the the alpha, beta value of this BrainAgeR model? or any suggestions on correcting brain age when using BrainAgeR model?

Thanks!

Setup issue (with [[ and modules not found)

Hello!

I was trying to test drive brainageR, but ran into some setup issues. I wasn't sure what I might be doing wrong. I'm on an ubuntu machine, with everything installed (as far as I can tell).

Here's my directory structure...
setup
(FYI- I initially cloned the git repo, but then pulled the Zenodo files... but ran into an issue removing that brainageR-master directory)

And then here's my command line output--
untitled

Thoughts on what I might be doing incorrectly? I've uploaded the brainageR script with appropriate paths, etc. Other thoughts? Thanks much in advance!

All the best,
Jamie.

readlink on Mac not working on v2.1

Turns out readlink on Mac doesn't have a -f option. There are several work-arounds for this for Mac users (it's not an issue for 'nix). The most simple is to edit the brainageR script and use 'realpath' instead of 'readlink'.
Alternatively you can install the GNU coreutils package and get the correct version of readlink for your system.

Fatal error with slicesdir.braingeR

Hello,

Thank you for making an exceptional program and addition to the scientific literature on brain health! I have used brainageR before with no problem but we upgraded to a new MAC and new Matlab ect. and I have it working (it generates a brain age estimate), but right before it finishes I get this error below and I am not sure how to resolve it... or what the issue is? Could it be something with our T1s? Or my guess is something not 100% set up on the new machine MAC OS? Any thoughts much appreciated!

/Users/lab/Desktop/BrainAge_TestData//c1MPRAGE

Fatal error: cannot open file: -
Function: (main)

/Users/lab/Desktop/brainageR//software/slicesdir.brainageR: line 149: [: -lt: unary operator expected

brainageR command not found

Hi,

I'm a beginner at working with codes and commands. I've tried to follow the instructions to set up brainageR, by making the directories, cloning the repository, downloading the 3 .rds files and editing the paths in the brainageR script. However, the terminal is still unable to recognise brainageR as a command.

Refer to images below for the path references:
brainageR_dir=/home/nicky155/Documents/brainageR/software/
spm_dir=/home/nicky155/Documents/MRI/SPM12/
matlab_path=/usr/local/MATLAB/R2023a/bin/matlab
FSLDIR=/home/nicky155/fsl/

image

image

image

image

Question about extra preprocessing in containerized version

Thanks for providing this repo! I am very interested in using it to generate predictions for a fairly large study (currently have around 600 participants).

In our analysis pipeline, the different steps need to be containerized. I am aware that there is a containerized version of brainageR: https://github.com/fprados/brainageR_dockerfile. It looks like the containerized version includes a few extra preprocessing steps: https://github.com/fprados/brainageR_dockerfile/blob/51d9a62146465d033dfca17beaac34f294a1ec5c/brainageR#L60-L63. Why are those included there but not this uncontainerized repo?

RH Age

Would it be possible to train the models on RH and LH separately.
This would be great for those looking at unilateral stroke.
The ability to chart the health of the intact hemisphere over time could really help us get a grasp of how stroke in one hemisphere affects the other.
Best,
Roger

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.