-
Notifications
You must be signed in to change notification settings - Fork 43
ISA conversions
David Johnson edited this page Feb 26, 2016
·
1 revision
The ISA API includes a set of functions to allow you to convert between ISA formats, as well as between ISA formats and other formats such as SRA. These converters can be found in the isatools.convert package.
To convert from a directory ./tabdir/ containing valid ISA tab files (e.g. i_investigation.txt, s_...txt and a_...txt files) to a write the target JSON to another directory ./outdir/:
from isatools.convert import isatab2json
isatab2json.convert('./tabdir/', './outdir/')
To convert from a ISA JSON file isa.jsondirectory to write out ISA tab files to a target directory ./outdir/:
from isatools.convert import json2isatab
json2isatab.convert(open('isa.json')), './outdir/')