nsblab / dicer Goto Github PK
View Code? Open in Web Editor NEWDiffuse Cluster Estimation and Regression. A de-noising tool.
License: Apache License 2.0
Diffuse Cluster Estimation and Regression. A de-noising tool.
License: Apache License 2.0
Need to have a flag for it, for HCP comparisons.
Unfortunately this has been hard coded, but making this a parameter into the shell script makes it easier to change for studies.
This requires a little re-write of carpetCleaner.py this might break things so this will happen after a clean up.
This is what's causing issues with SPM first-level specification
@Marianne-Oldehinkel Wrote a nice little bash script for it
#generate tsv file
nRow=$(cat $outdir/DVARS.txt | wc -l)
zerofile=$outdir/zeros.txt
yes 0 | head -$nRow > $zerofile
echo "0
$(cat $outdir/FD.txt)" > $outdir/FD.txt
echo "FD
$(cat $outdir/FD.txt)" > $outdir/FD.txt
echo "DVARS
$(cat $outdir/DVARS.txt)" > $outdir/DVARS.txt
echo "col0
$(cat $zerofile)" > $zerofile
paste $zerofile $zerofile $zerofile $outdir/DVARS.txt $zerofile $zerofile $outdir/FD.txt > $outdir/confounds.tsv
Will implement it in the future!
I'm using DiCER, testing on a single subject that was preprocessed using fMRIPrep v20.2.6 (the latest version as of Nov 2021)
Because I'm using fMRIprep version > 1.1.1, I used DiCER_lightweight.sh instead of carpetCleaner.sh
Other dependencies I'm using are:
Python 3.9.7 (miniconda) with all required packages (scikit-learn, etc)
FSL v6.0.3
AFNI 21.2.04
My call to DiCER_lightweight.sh was as follows (with variables as shown), using a T1w in same space as the functional images (MNI152NLin2009cAsym, with both functional and anatomical images in 2x2x2 mm format).
subjid='001'
basefolder='/home/Chyatt/onrc/data/fmriprep/domino3/derivatives/fmriprep/'
pathToFiles=${basefolder}'sub-'${subjid}'/ses-01'
func='func/sub-'${subjid}'_ses-01_task-domino3_run-1_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz'
T1w='anat/sub-'${subjid}'_ses-01_space-MNI152NLin2009cAsym_res-2_desc-preproc_T1w.nii.gz'
sh DiCER_lightweight.sh -i $func -a $T1w -w
FAST and detrending/high pass filtering appeared to work fine.
The first error was:
ImportError: cannot import name 'izip' from 'itertools' (unknown location)
but this is due to using Python 3+. I don't think this is affecting the overall execution.
Additional errors are described in my attached my DiCER output.
Any suggestions would be helpful. Thank you!
Hi, thanks for the toolbox!
I run carpetCleaner.sh since I did the preprocessing with fmriprep (1.2.6-1), I had to modify the names in the script though in order to match with the fmriprep outputs. I got some errors and warnings, but did not crashed.
Are these all the output I should get in the dbscan folder? which is the one that contents the functional data denoised with DiCER?
Thank you so much in advance
AFNI commands does something strange to the headers :( thanks to @kristinasabaroedin for pointing it out!
Currently there are two problems:
Was brought up in analysis of the code.
Dear Kevin,
congratulations for the tool! I'm using it with my own pre-processed data (ICA-AROMA+2P), but DiCER_lightweight.sh returns me with the following error after performing correctly FAST:
./DiCER_lightweight.sh -i filtered_fmri.nii.gz -a structural.nii -w $subjects/BS_HC_01 -s BS_HC_01 -d
Unfolded 91x109x91x395 time-series matrix using Fortran ordering
Read in 902629x395 time series data
Unfolded 91x109x91x395 time-series matrix using Fortran ordering
Traceback (most recent call last):
File "carpetCleaning/clusterCorrect.py", line 376, in
X = fMRI_in_out.timeSeriesData(ts_file,mask_file,maskIndex=maskLabel)
File "/home/pnc/Desktop/Pipeline_imaging/scripts/DiCER/carpetCleaning/../utils/fMRI_in_out.py", line 55, in timeSeriesData
X = Xraw[M==maskIndex,:]
IndexError: too many indices for array
Do you have any idea where is the problem?
Lorenzo
This needs to be added as a default
Job doesn't show up when typing 'show_job' in terminal
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.