The squirrel command line program allows converstion of DICOM to squirrel, BIDS to squirrel, modification of existing squirrel packages, and listing of information from packages.
sudoaptinstallp7zip# p7zip required by squirrelsudodpkg-isquirrel_xxxx.xx.xxx.deb
Too many open files error
If you encounter an error "too many open files", or you are unable to write squirrel packages, try increasing the open files limit within Linux
# increase open file limit (temporarily for the current session)ulimit-n2048# increase open file limit (permanently)# append these lines to /etc/security/limits.conf* soft nofile 2048* hard nofile 2048
Basic Command Line Usage
Convert DICOM to squirrel
# Default DICOM to squirrel conversionsquirreldicom2squirrel/path/to/dicomsoutPackgeName.sqrl# Specify the output formatsquirreldicom2squirrel/path/to/dicomsoutPackge.sqrl--dataformatniti4gz# Specify the package directory formatsquirreldicom2squirrel/path/to/dicomsoutPackage.sqrl--dirformatseq
Convert BIDS to squirrel
squirrelbids2squirrel/path/to/bidsoutPackage.sqrl
Modify existing squirrel package
# add a subject to a packagesquirrelmodify/path/to/package.sqrl--addsubject--datapath/path/to/new/data--objectdata'SubjectID=S1234ABC&DateOfBorth=199-12-31&Sex=M&Gender=M'# remove a study (remove study 1 from subject S1234ABC)squirrelmodify/path/to/package.sqrl--removestudy--subjectidS1234ABC--objectid1
List information about a squirrel package
#list package information[user@hostname]$ squirrel info ~/testing.sqrlSquirrelPackage:/home/nidb/testing.sqrlDataFormat:origDate:ThuMay2316:16:162024Description:DatasetdescriptionDirectoryFormat (subject, study,series): orig, orig, origFileMode:ExistingPackageFiles:314files19181701506bytes (unzipped)PackageName:SquirrelpackageSquirrelBuild:2024.5.218SquirrelVersion:1.0Objects:├──8subjects│├──8measures│├──0drugs│├──11studies│├────314series│└────0analyses├──0experiments├──0pipelines├──0groupanalyses└──0datadictionary# list subjects[user@hostname]$ squirrel info ~/testing.sqrl --object subjectSubjects:sub-ASDS3050KAEsub-ASDS6316BWHsub-ASDS6634GJKsub-ASDS7478SKAsub-ASDS8498GQDCBTsub-HCS8276XPSsub-S4328FSCsub-S7508DDH# list studies for a specific subject[user@hostname]$ squirrel info ~/testing.sqrl --object study --subjectid sub-ASDS3050KAEStudies:12#list all subjects as CSV format[user@hostname]$ squirrel info ~/testing.sqrl --object subject --csvID,AlternateIDs,DateOfBirth,Ethnicity1,Ethnicity2,GUID,Gender,Sex"sub-ASDS3050KAE","","","","","","U","U""sub-ASDS6316BWH","","","","","","U","U""sub-ASDS6634GJK","","","","","","U","U""sub-ASDS7478SKA","","","","","","U","U""sub-ASDS8498GQDCBT","","","","","","U","U""sub-HCS8276XPS","","","","","","U","U""sub-S4328FSC","","","","","","","""sub-S7508DDH","","","","","","",""