ISA_Tab

class mzml2isa.isa.ISA_Tab(out_dir, name, **kwargs)

Class to export a list of mzML or imzML metadata dictionnaries to ISA-Tab files

usermeta

dict – a dictionary containing metadata defined by the user, such as “Study Publication” or “Submission Date”. Defaults to None.

isa_env

dict – a dictionary containing various environment variables associated with the current ISA_Tab object (such as ‘Study file name’, ‘Written assays’, etc.)

create_assay(metalist, headers, data, **kwargs)

Write the assay file

Parameters:
  • metalist (list) – a list of mzml or imzml metadata dictionaries
  • datatype (str) – the datatype of the study (either ‘mzML’ or ‘imzML’)
  • headers (list) – the list containing the assay headers row
Keyword Arguments:
 

split (bool, optional) – a boolean stating if assay files should be split based on their polarities. [default: True]

create_investigation(metalist, datatype)

Write the investigation file

Parameters:
  • metalist (list) – a list of mzml or imzml metadata dictionaries
  • datatype (str) – the datatype of the study (either ‘mzML’ or ‘imzML’)
create_study(metalist, datatype)

Write the study file

Parameters:
  • metalist (list) – a list of mzml or imzml metadata dictionaries
  • datatype (str) – the datatype of the study (either ‘mzML’ or ‘imzML’)
make_assay_template(metalist, datatype)

Generate the assay template rows

Parameters:
  • metalist (list) – a list of mzml or imzml metadata dictionaries
  • datatype (str) – the datatype of the study (either ‘mzML’ or ‘imzML’)
Returns
tuple: a tuple containg the list containing the assay headers row
and the list containing the assay data row based on the cardinality of elements in the metalist
static unparameter(string)

Extract string ‘s’ from ‘Parameter Value[s]’

Parameters:string (str) – full string
Returns:the extracted substring
Return type:str
write(metalist, datatype, **kwargs)

Generate and write the ISA files

Parameters:
  • metalist (list) – a list of mzml or imzml metadata dictionaries
  • datatype (str) – the datatype of the study (either ‘mzML’ or ‘imzML’)
Keyword Arguments:
 

split (bool, optional) – a boolean stating if assay files should be split based on their polarities. [default: True]