McIntosh-Lab / tvb-ukbb

TVB-UKBB Pipeline: TheVirtualBrain implementation of the UK Biobank pipeline
Other
23 stars 12 forks source link

Question about input file of the `tvb_FC` script to calculate the FC matrix #163

Closed yilewang closed 2 years ago

yilewang commented 2 years ago

Hey everyone, I just have a question about my preprocessing in rfMRI signal.

The question is about getting time-series data of the rfMRI. I am wondering how should I get my time-series results? When I ran the pipeline, I got error like this:

/opt/tvb-ukbb/bb_functional_pipeline/tvb_FC: line 25: mri_segstats: command not found
Traceback (most recent call last):
  File "/opt/tvb-ukbb/bb_functional_pipeline/tvb_FC_compute", line 78, in <module>
    main()
  File "/opt/tvb-ukbb/bb_functional_pipeline/tvb_FC_compute", line 50, in main
    TS_old = np.loadtxt(ts_rois)
  File "/opt/tvb-pipeline/software/env/lib/python3.7/site-packages/numpy/lib/npyio.py", line 981, in loadtxt
    fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
  File "/opt/tvb-pipeline/software/env/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 269, in open
    return ds.open(path, mode, encoding=encoding, newline=newline)
  File "/opt/tvb-pipeline/software/env/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 623, in open
    raise IOError("%s not found." % path)
OSError: /work/08008/yilewang/ls6/hsam/s123873/fMRI/rfMRI.ica/ts_roied_TVBSchaeferTian420.txt not found.

https://github.com/yilewang/tvb-ukbb/blob/ADNI3/bb_functional_pipeline/tvb_FC#L14

After running the pipeline, I didn't generate the ts_roied.txt file in my rfMRI.ica folder... Does it come with FIX? I got error in FIX process too but I am not sure if this file is part of the FIX output..

However, I tried to look around the bb_pipeline_func but I didn't find a script or function whose output is ts_roi*... Could you please help me on it? Thanks!

I am using ADNI3 branch with singularity container and TACC HPC system, ROCKY Linux with SLURM to run my job, just FYI.

yilewang commented 2 years ago

Problem solved! It looks like my freesurfer path is wrong so it caused the func pipeline issues. However, I still have ANTs dependencies issues right now. In the TVB-UKBB singularity container, the glibc version is 2.27. However, the ANTs may require glibc version higher than 2.28 to run it... A possible solution is to install another version of the glibc in the container. I will work on it but now I will close this issue

noahfl commented 2 years ago

Hey Yile, which version of ANTS are you running and which glibc does it require? I can look at putting it in the container. I'm also looking at putting everything, including ANTS, Free/FastSurfer, and AFNI into the container to fully encapsulate all dependencies. This will be a little more complicated though since the container will be too large to upload to Singularity's container repository.

yilewang commented 2 years ago

Hey Yile, which version of ANTS are you running and which glibc does it require? I can look at putting it in the container. I'm also looking at putting everything, including ANTS, Free/FastSurfer, and AFNI into the container to fully encapsulate all dependencies. This will be a little more complicated since the container will be too large to upload to Singularity's container repository.

Hey Noah! The reason why I mentioned glibc in that comment is because at the beginning I am trying to mount ANTs package into the container, however, since ANTs need to be built and compiled directly inside the system, it didn't work at the beginning. Actually putting everything into the container is also the thing I am doing right now! Usually I will build the container locally then scp it to the server to use it. I don't need to upload it to the cloud so I can circumvent their disk quotes limitation.

I have installed the FreeSurfer 7.2, afnibinary 21.0.06 and ANTs 2.3.5 into the container. The FreeSurfer and AFNI worked great now since it's easy to put in. However, ANTs is a little bit tricky to deal with since it requires compiling. But the good news is that last night I successfully built and compiled the ANTs inside the container! Since ANTs required cmake version over 3.19, I had to install newer cmake version inside the container first in order to install ANTs. I will try to run a subject on the server today to see if everything goes well!

Thanks for offering help!

noahfl commented 2 years ago

Oh nice! Would you mind sharing the container recipe you have whenever you get the chance? I'd love to take a look and see what you've added.

yilewang commented 2 years ago

I would love to! The script is in here: https://github.com/yilewang/TVBdemos/tree/master/container

The sing.def file is the file to build the container. I have tested it and it should work fine!

The install_ants.sh file should be put into container by the %files part in def file, which is used to build the ANTs

Please let me know if you have any question about this~ I would love to talk about it with you