.. _converting-files: Converting Files at NERSC and Making them Accessible ==================================================== To convert a mass spectrometry imaging file, e.g., in img or bruckerflex format, to HDF5 do the following: .. code-block:: none ssh cori.nersc.gov cd /project/projectdirs/openmsi/devel/convert source setupEnvironment.csh python convertToOMSI.py Note if you use the bash shell then use ``setupEnvironment.bash`` instead. Note, if you want to use the output file from openmsi.nersc.gov then the output file path should be: .. code-block:: none /project/projectdirs/openmsi/omsi_data_private// where username is the name of the primary user that owns the file. Making a converted file accessible to OpenMSI (Private) ------------------------------------------------------- The conversion script will by default automatically try to register new files with the OpenMSI site and assign them private to a single user if the output file is placed in the OpenMSI private data location: .. code-block:: none python convertToOMSI.py /project/projectdirs/openmsi/omsi_data_private// The username in the path will determine the user the file is assigned to. E.g: The filename will also be the name used in the listing on the site. In order to generate the HDF5 file without adding to the database, use the ``--no-add-to-db`` command line option, e.g,: Changing file permissions: -------------------------- Using the OpenMSI website the owner of the file can assign permissions to files online: https://openmsi.nersc.gov/openmsi/resources/filemanager?file= ``convertToOMSI``: Usage and Options ------------------------------------ NOTE: In order to view a current, complete list of conversions options use: .. code-block:: bash python convertToOMSI.py --help .. code-block:: none python convertToOMSI.py --help USAGE: Call "convertToOMSI [options] imgBaseFile1 imgBaseFile2 ... imgBaseFileN HDF5File" This converter script takes the basename (i.e., path+basefilename) of a single or multiple MSI files as input and converts them to HDF5. Each MSI file is stored as a separate experiment in the output HDF5 file. If an input file defines multiple regions, then those regions can either be stored as separate datasets of the same experiment and/or merged to a single MSI dataset. Using the various paramter settings described below, one can define how the conversion should be performed, how the data should be stored in HDF5, and indicate which analyses should be executed. ===HELPER OPTIONS=== --suggest-chunking : Iterate over all given input files and suggest a chunking strategy. No data is converted when this option is given, i.e., no name for the HDF5File should be given, but only input files should be listed. ===ERROR HANDLING OPTIONS=== --error-handling : Define how errors should be handled. Options are: i) terminate-and-cleanup (default) : Terminate the conversion, delete the the HDF5 file and do not add the file to the database. ii) terminate-only, : Leave the generated HDF5 output file in place but do not add the file to the database. iii) continue-on-error: Ignore errors if possible and continue, even if this means that some data may be missing from the output. --email : Send notification in case of both error or success to the email address. --email-success >: Send notification in case of success to the given email address. --email-error >: Send notification in case of error to the given email address. ===INPUT DATA OPTIONS=== Default input data options: --format auto --regions split+merge --format