Giter VIP home page Giter VIP logo

hcp-asl's Issues

Error on the step of asl_correction, number of TIs unmatch

Hi hcp-asl team,

I met an error on the step of asl_correction when running hcp-asl pipeline on HCPD data. I successfully installed hcp-asl pipeline and set up the environment.

Here is my executive command:

studydir=/ibmgpfs/cuizaixu_lab/xuxiaoyu/HCPD/bidsorig
subid=$1
export StudyFolder="$studydir"
struct=$studydir/${subid}/T1w/T1w_acpc_dc_restore.nii.gz
sbrain=$studydir/${subid}/T1w/T1w_acpc_dc_restore_brain.nii.gz
mbpcasl=$studydir/${subid}/mbPCASLhr/${subid}_V1_MR_mbPCASLhr_PA.nii.gz
fmap_ap=$studydir/${subid}/mbPCASLhr/${subid}_V1_MR_PCASLhr_SpinEchoFieldMap_AP.nii.gz
fmap_pa=$studydir/${subid}/mbPCASLhr/${subid}_V1_MR_PCASLhr_SpinEchoFieldMap_PA.nii.gz
WMPARC=$studydir/${subid}/T1w/wmparc.nii.gz
RIBBON=$studydir/${subid}/T1w/ribbon.nii.gz
cores=4
Atlas=/ibmgpfs/cuizaixu_lab/xuxiaoyu/softwarepackages/hcp-asl/hcpasl/resources/vascular_territories_atlas.nii.gz
Labels=/ibmgpfs/cuizaixu_lab/xuxiaoyu/softwarepackages/hcp-asl/hcpasl/resources/vascular_territories_atlas_labels.txt
outdir=/ibmgpfs/cuizaixu_lab/xuxiaoyu/HCPD/aslresults

echo "running hcpasl for ${subid}"
# hcpasl
hcp_asl --studydir $studydir --subid ${subid} -s $struct --sbrain $sbrain --mbpcasl $mbpcasl --fmap_ap $fmap_ap --fmap_pa $fmap_pa --use_t1 --wmparc $WMPARC --ribbon $RIBBON -c $cores --outdir $outdir -v

And I tested this script on one subject 'HCD0001305'. The error occurred on the step of asl_correction.

0%Traceback (most recent call last):
  File "/home/cuizaixu_lab/xuxiaoyu/.local/bin/hcp_asl", line 8, in <module>
    sys.exit(main())
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/scripts/run_pipeline.py", line 613, in main
    wbdir=args.wbdir
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/scripts/run_pipeline.py", line 172, in process_subject
    outdir=outdir)
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/hcpasl/asl_correction.py", line 574, in single_step_resample_to_asl0
    t1_name = _saturation_recovery(asl_corr, satrecov_dir, NTIS, IAF, IBF, TIS, RPTS)
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/hcpasl/asl_correction.py", line 243, in _saturation_recovery
    _satrecov_worker(control_name, results_dir, tis, rpts, ibf, spatial=False)
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/hcpasl/asl_correction.py", line 162, in _satrecov_worker
    run = fab.run(options, progress_cb=percent_progress(sys.stdout))# Basic interaction with the run output
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/fabber/api_cl.py", line 263, in run
    self._call(options, output=out_subdir, stdout_handler=stdout_handler, simple_output=True, data_options=True)
  File "/home/cuizaixu_lab/xuxiaoyu/.local/lib/python3.7/site-packages/fabber/api_cl.py", line 355, in _call
    raise FabberClException(errmsg, retcode, options.get("output", ""))
fabber.api_cl.FabberClException: FabberException: 1: Invalid value given for option: ti<n>=5 (Number of TIs does not match number of volumes in data)

I checked the files generated by the program interrupt, the volume number of tis.nii.gz is 86, tis_mtcorr.nii.gz is 86, and tis_mtcorr_odd & tis_mtcorr_even both have 43 volumes.
Do you have any suggestion about how to avoid this error?

Thanks a lot!
With regards,
Xiaoyu Xu

wrong TIs?

Hi,

I am aware this code might change but I wanted to point out that TIs might be wrong. Just if you want to double-check. I already downloaded the pipeline, so I am not sure if I can change this while running it (I'm not an advanced coder)

TIS = [1.7, 2.2, 2.7, 3.2, 3.7]

Best,

-Cindy

NaNs encountered during tag-control differencing

Hi! We've collected some pilot data using the HCP-PCASL sequence and stumbled upon this repo when investigating how to integrate the ASL-analysis with the other parts of the HCP-pipeline.

With a few edits I managed to run our data through most of the pipeline. Was struggling a bit with NaNs, affecting the calculations here

B_perf = (Y_odd - Y_even) / (X_odd - X_even)
B_baseline = (X_odd*Y_even - X_even*Y_odd) / (X_odd - X_even)

Which seems to be caused by the first M0 volume ("calib0") being used as calibration image throughout the pipeline

hcp-asl/hcpasl/utils.py

Lines 228 to 230 in 518593a

fslroi(str(mbpcasl), str(tis_name), 0, 86)
fslroi(str(mbpcasl), str(calib0_name), 88, 1)
fslroi(str(mbpcasl), str(calib1_name), 89, 1)

In our data (collected using the "official" HCP-PCASL sequence on a Prisma), the first of the two M0-images is dislocated anteriorly by one voxel relative to the tag/control images and the second M0-image. Is this, something you've observed in developing/running the hcp-asl pipeline?

Also, are you planning to develop the pipeline further, or do you consider it "production-ready"?

Thanks!

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.