coinstacparsers
This package includes fsl_parser, vbm_parser and csv parser. fsl_parser parses the freesurfer files (specified in inputspec.json) as dependencies and returns
the covariates (X) and dependent (y) matrices as dataframes. The format of inputspec.json should be as shown in the example inputspec.json here.
Similarly vbm_parser parses NIfTI images as dependencies and returns the covariates (X) and dependent (y) matrices as dataframes.
csv_parser reads the values specified in inputspec.json file and returns the covariates (X) and dependent (y) matrices as dataframes.
How to install
pip install coinstacparsers
How to run
for fsl parser:
import coinstacparsers
from coinstacparsers import parsers
args = json.loads(sys.stdin.read())
(X, y) = parsers.fsl_parser(args)
for vbm parser:
import coinstacparsers
from coinstacparsers import parsers
args = json.loads(sys.stdin.read())
mask = os.path.join('/computation', mask_directory, mask_file_name)
(X, y) = parsers.vbm_parser(args, mask)
for csv parser:
import coinstacparsers
from coinstacparsers import parsers
args = json.loads(sys.stdin.read())
(X, y) = parsers.csv_parser(args)