physimals / hcp-asl Goto Github PK
View Code? Open in Web Editor NEWASL pipeline for the Human Connectome Project
License: Apache License 2.0
ASL pipeline for the Human Connectome Project
License: Apache License 2.0
the code uses image.data>0, not image.data>threshold
@jackt3, do you know why this is?
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
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)
hcp-asl/hcpasl/asl_correction.py
Line 52 in 1ad5d2a
Best,
-Cindy
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
hcp-asl/hcpasl/asl_differencing.py
Lines 63 to 64 in 518593a
Which seems to be caused by the first M0 volume ("calib0") being used as calibration image throughout the pipeline
Lines 228 to 230 in 518593a
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.