med_to_csv

A simple way to parse MedAssociate output file in tidy data

https://github.com/hedjour/med_to_csv

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

A simple way to parse MedAssociate output file in tidy data

Basic Info
  • Host: GitHub
  • Owner: hedjour
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 4.18 MB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 7
Created about 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.rst

.. role:: raw-html(raw)
   :format: html

|Contributors| |Forks| |Stargazers| |Issues| |GPLv3.0 License| |Doc| |DOI|

.. _top:

.. image:: /docs/img/intro_light.png#gh-light-mode-only
.. image:: /docs/img/intro_dark.png#gh-dark-mode-only

MedAssociates to CSV file
==========================

A simple way to parse MedAssociate output file in tidy data :
   * 1 row = 1 observation
   * 1 col = 1 var
   

`Explore the docs » `_

`View Demo `_ ·
`Report Bug `_ ·
`Request Feature `_

.. TABLE OF CONTENTS
.. .. contents:: Table of Contents
..    :depth: 2

.. raw:: html

   

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements
About The Project ----------------- This program parses MedAssociates data files and transforms them into tidy csv files, containing the information selected by the user .. raw:: html

(back to top)

Built With ^^^^^^^^^^ * `Python 3 `_ * `Gooey `_ .. `back to top <#top>_` .. raw:: html

(back to top)

Getting Started --------------- To get a local copy up and running follow these simple steps. Prerequisites ^^^^^^^^^^^^^ This is an example of how to list things you need to use the software and how to install them. * pip .. code-block:: bash pip install numpy argparse pyaml pandas pip install Gooey #For graphical interface Installation ^^^^^^^^^^^^ #. Clone the repository .. code-block:: bash git clone https://sourcesup.renater.fr/anonscm/git/medanalysis/medanalysis.git #. Install the required packages .. code-block:: bash pip install numpy argparse yaml pandas pip install Gooey #For graphical interface cd path/to/directory_of_git_clone and one of the two lines below : .. code-block:: bash python setup.py install python setup.py install --user #For windows users or .. code-block:: bash pip install . .. raw:: html

(back to top)

Make Executable (Portable) ^^^^^^^^^^^^^^^^^^^^^^^^^^ To make a gui onefile executable run these commands in terminal. .. code-block:: bash cd path/to/directory_of_git_clone pyinstaller build_gui.spec To make a cli onefile executable run these commands in terminal. .. code-block:: bash cd path/to/directory_of_git_clone pyinstaller build_cli.spec Data organisation ------------------- The file is just an output of MedAssociate software. The path directorie can contains the sub_directories of sessions that containing the raw data files, or just Medassociate files. .. warning:: Your raw data directories must only contain med output files. Example of data organisation for batch run ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. note:: Experiment directorie/ └── dir 01 ├── file_med_associates_to_compil ├── file_med_associates_to_compil └── file_med_associates_to_compil └── dir 02 ├── file_med_associates_to_compil ├── file_med_associates_to_compil └── file_med_associates_to_compil or Experiment directorie/ ├── file_med_associates_to_compil ├── file_med_associates_to_compil └── file_med_associates_to_compil Example ----------------- Graphical User Interface ^^^^^^^^^^^^^^^^^^^^^^^^ Run the application and follow the steps on the interface .. code-block:: bash ./main_gui Command Line Interface ^^^^^^^^^^^^^^^^^^^^^^ The software runs on the experiment directory that contains the directories containing the raw data files or on the file itself and returns a csv file .. code-block:: bash ./main_cli.py path_to_medassociate_file config_file.yml output_csv_file .. warning:: Your path must contain only ASCII characters (No : éèàï) Config file ^^^^^^^^^^^ The config file is a necessary file that specifies the setup of your data to the software. You can find as an example the config.yml which contains all possibilities of setup. You can mix 1 col file dir and annotated directory file in experiment dir. #. There are three types of parameters: * info_col : One column file * info_lab : annotated file * options : further options #. For the first two types of parameters. You need to indicate the information in this format: "Key : Value" * Keys are the column names that you want in the output file * Values are: * for infos_col: row number - 1 (Start index :0) * for infos_lab: letters used in medAssociate exercise * for infos_opt: (see next point) #. Options: * remove_zero_ending : True or False to keep or remove Zeros at the end of arrays * Cut : for cutting an output on a special character usually a dot into 2 columns. The value must be a list of list of 4 elements : * key to cut * separator usually the dot character * Col names of first sub-element * Col names of second sub-element * Eval : for some columns the values must be the result of a Python command line (e.g to get information in a path). It must be a python dictionary with Key as column name and value a short command line as a string. #. The following Keys are med associate keywords only usable with annotated file : * Start Date (automatically added) * End Date * Subject * Experiment * Group * Box * Start Time (automatically added) * End Time * MSN: Medassociate exercice names .. note:: Templates are available in the config.yml file .. raw:: html

(back to top)

Roadmap ------- * Add possibility for annotated file to not specify the YAML file and use YAML in parameter path with the same names as MPC name obtained from MSN [] .. raw:: html

(back to top)

FAQ ----- If you get the .. code-block:: python A problem has occured while processing the data : local variable 'lab_folder' referenced before assignment Have you filled your sub_directories with med associates output files ? Contributing ------------ Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. If you have any suggestion that would improve this software, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again! #. Fork the Project #. Create your Feature Branch (\ ``git checkout -b feature/AmazingFeature``\ ) #. Commit your Changes (\ ``git commit -m 'Add some AmazingFeature'``\ ) #. Push to the Branch (\ ``git push origin feature/AmazingFeature``\ ) #. Open a Pull Request .. raw:: html

(back to top)

License ------- Distributed under the GPL v3.0 License. See ``LICENSE.txt`` for more information. .. raw:: html

(back to top)

Contact ------- * Jean-Emmanuel Longueville - jean.emmanuel.longueville@univ-poitiers.fr * Myriam Hanna - myriam.hanna@univ-poitiers.fr * Marcello Solinas Project Link: `https://github.com/hedjour/med_to_csv `_ .. raw:: html

(back to top)

Acknowledgments --------------- * `IRESP `_: This work was supported by a grant from the IRESP « IRESP-19-ADDICTIONS-20 » to MS * `LNEC `_ * `Université de Poitiers `_ * `INSERM `_ * `Logo FreeVector.com `_ * Thanks to our old contributors as Ekter, Myriam Hanna. .. raw:: html

(back to top)

.. MARKDOWN LINKS & IMAGES .. https://www.markdownguide.org/basic-syntax/#reference-style-links .. |Contributors| image:: https://img.shields.io/github/contributors/hedjour/med_to_csv.svg?style=for-the-badge :target: https://github.com/hedjour/med_to_csv/graphs/contributors .. |Forks| image:: https://img.shields.io/github/forks/hedjour/med_to_csv.svg?style=for-the-badge :target: https://github.com/hedjour/med_to_csv/network/members .. |Stargazers| image:: https://img.shields.io/github/stars/hedjour/med_to_csv.svg?style=for-the-badge :target: https://github.com/hedjour/med_to_csv/stargazers .. |Issues| image:: https://img.shields.io/github/issues/hedjour/med_to_csv.svg?style=for-the-badge :target: https://github.com/hedjour/med_to_csv/issues .. |GPLv3.0 License| image:: https://img.shields.io/github/license/hedjour/med_to_csv.svg?style=for-the-badge :target: https://github.com/hedjour/med_to_csv/blob/master/LICENSE .. |Doc| image:: https://readthedocs.org/projects/med-to-csv/badge/?version=latest :target: https://med-to-csv.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. |DOI| image:: https://zenodo.org/badge/447657017.svg :target: https://zenodo.org/badge/latestdoi/447657017

Owner

  • Name: Jean-Emmanuel Longueville
  • Login: hedjour
  • Kind: user
  • Location: France
  • Company: Université Poitier

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Longueville"
  given-names: "Jean-Emmanuel"
  orcid: " https://orcid.org/0000-0002-9057-1602 "
- family-names: "Hanna"
  given-names: "Myriam"
  # orcid: ""
- family-names: "Mulac"
  given-names: "Nino"
  # orcid: ""
- family-names: "Solinas"
  given-names: "Marcello"
  orcid: " https://orcid.org/0000-0002-0664-5964"
title: "med_to_csv Software"
version: 1.1
doi: 10.5281/zenodo.6241131
date-released: 2025-01-15
url: "https://github.com/hedjour/med_to_csv"

GitHub Events

Total
  • Release event: 2
  • Watch event: 1
  • Push event: 12
  • Create event: 4
Last Year
  • Release event: 2
  • Watch event: 1
  • Push event: 12
  • Create event: 4

Dependencies

docs/requirements.txt pypi
  • furo ==2021.11.16
requirements.txt pypi
  • Gooey *
  • altgraph >=0.17
  • argparse *
  • colored >=1.4.2
  • future >=0.18.2
  • numpy *
  • pandas *
  • pefile >=2019.4.18
  • pillow *
  • psutil >=5.7.0
  • pyInstaller *
  • pyaml *
  • pywin32-ctypes >=0.2.0
  • six >=1.15.0
  • wxPython >=4.0.7
setup.py pypi
  • argparse *
  • gooey *
  • numpy *
  • pandas *
  • pyaml *
.github/workflows/pyinstLin.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
.github/workflows/pyinstMac.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
.github/workflows/pyinstWin.yml actions
  • JackMcKew/pyinstaller-action-windows main composite
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
.github/workflows/sphinx_docs_to_gh_pages.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
  • uibcdf/action-sphinx-docs-to-gh-pages v1.0-beta.2 composite