Skip to content

alife-data-standards/converters-mabe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data conversion tools for the Modular Agent Based Evolver (MABE)

Build Status Codacy Badge

Phylogeny Converter

The MABE to standard phylogeny converter can be found in ./mabe_converters/phylogeny.py

This converter can be used as either a command line tool (usage below) or be imported and used as a function in your own python scripts.

User must provide:

  • mabe file format for files to convert: either snapshot or SSwD (snapshot with delay)
  • other parameters are optional... see usage.

Usage

usage: phylogeny.py [-h] [-path PATH] [-fileType TYPE]
                    [-output_file_path OUTPUT_FILE_PATH] [-format FORMAT]
                    [-verbose] [-oldColumnNames COLUMN_NAME [COLUMN_NAME ...]]
                    [-newColumnNames COLUMN_NAME [COLUMN_NAME ...]]

Converts .csv files generated by MABE to the standard phylogeny format

optional arguments:
  -h, --help            show this help message and exit
  -path PATH            path to files - default : none (will read files in
                        current directory)
  -fileType TYPE        type of file, either snapshot or SSwD; default:
                        snapshot
  -output_file_path OUTPUT_FILE_PATH, -out OUTPUT_FILE_PATH
                        Name to assign to standard-compliant output file.
  -format FORMAT, -f FORMAT
                        What standard file format should this script output?
                        Valid options: ['csv', 'json']
  -verbose              adding -verbose will provide more text output while
                        running (useful if you are working with a lot of data
                        to make sure that you are not hanging) - default (if
                        not set) : OFF
  -oldColumnNames COLUMN_NAME [COLUMN_NAME ...]
                        column names of data to read from source files -
                        default : "score_AVE" ("ID", "timeOfBirth", and the
                        correct ancestors list are added to the list
                        automatically)
  -newColumnNames COLUMN_NAME [COLUMN_NAME ...]
                        column names of data to be copied into new data file -
                        default : NONE, if blank, copy oldColumnNames ("id",
                        "origin_time", and "parents" are added to the list
                        automatically)

Author(s)/Maintainer(s)

  • Cliff Bohm

About

Converters from MABE data formats to standard formats.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages