Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
Manuel Bernal Llinares edited this page Oct 18, 2016 · 23 revisions

jmzTab Core Model

jmzTab can read, write and convert mzTab files. jmzTab is free, open-source software written in Java.

jmztab-uml.png

As shown in the figure, MZTabFile class is the central entry point to manage the internal relationships among the different sections in the file. The MZTabFile class contains three key components:

  • Metadata: a mandatory metamodel which provides the definitions contained in the dataset reported in the mzTab file;
  • MZTabColumnFactory: a factory class that can be used to generate stable MZTabColumn elements, and to add dynamically different optional columns, such as AbundanceColumn, OptionColumn and CVParamOptionColumn. The Metadata and MZTabColumnFactory work together to build the framework for the MZTabFile class;
  • Consistency constraints among different sections of the model. Thus, a couple of convenient methods are provided to keep these constraints. For example, MZTabFile class support iterative modify ms_run, sample, study variable, and assay identification number, maintain the consistency between the Metadata section and related abundance columns header; and moves corresponding data values when user modify the position of optional columns. These methods are very useful to overcome the identification confliction when user wants to merge multiple MZTabFile models together.

API Tutorial

Create Metadata and Fill Data

The Metadata and MZTabColumnFactory constitute the framework for the MZTabFile class. Here, we provide a couple of demo classes to introduce how to generate a metadata, different types of section header lines by using the column factory, and how to fill data into a MZTabFile model.

Convert to MZTabFile

For users who would like to convert their data to the mzTab format. Here, we provide a couple of demo classes to introduce how to generate a MZTabFile model by extending ConvertProvider class. MZTabUtils play a very important role during translate the String object into mzTab objects, such as Modification, SplitList, MZBoolean, Param, CVParam and so on. In the following examples, we try to use a different way: one is to construct the mzTab objects manually. Another one is to parse the user input string by calling methods in MZTabUtils. Users can compare them, and choose the best way to convert their data into the mzTab model.

  • ConvertSilacExperiment: This example is a SILAC experiment with quantification on 2 study variables (control/treatment), 3+3 assays (replicates) reported, identifications reported. In the demo, we show how to create metadata, the protein header line, one protein record, one PSM header line, and one PSM record by manual.
  • ConvertPeptideSQ: A minimal "Summary Quantification report" experiment, quantification on 2 study variables (control/treatment), no assays (replicates) reported, no identifications reported. In this demo, we show how to generate metadata, peptide header line, and one peptide record by using a couple parse functions in MZTabUtils.

Getting jmzTab

For a list of changes in the latest version of jmzTab see the ReleaseNotes.

GitHub

The latest version of jmzTab can always be found in the GitHub project at https://github.com/PRIDE-Utilities/jmztab.git.

To check out the latest version of jmzTab run:

git clone https://github.com/PRIDE-Utilities/jmztab.git

Maven

The jmzTab library can easily be used in Maven projects. You can include the following snippets in your Maven pom file.

For parsing and writing mzTab

<properties>
  <jmztab.version>3.0.4</jmztab.version>
</properties>

<dependency>
  <groupId>uk.ac.ebi.pride</groupId>
  <artifactId>jmztab-modular-model</artifactId>
  <version>${jmztab.version}</version>
  <!-- based on mzTab specification version 1.0 -->
</dependency>
<dependency>
  <groupId>uk.ac.ebi.pride</groupId>
  <artifactId>jmztab-modular-util</artifactId>
  <version>${jmztab.version}</version>
  <!-- based on mzTab specification version 1.0 -->
</dependency>

For converting to mzTab

<properties>
  <jmztab.version>3.0.4</jmztab.version>
</properties>

<dependency>
  <groupId>uk.ac.ebi.pride</groupId>
  <artifactId>jmztab-modular-converters</artifactId>
  <version>${jmztab.version}</version>
  <!-- based on mzTab specification version 1.0 -->
</dependency>

The jmzTab library can currently only be found in the EBI's maven repository:

<repository>
  <id>nexus-ebi-repo</id>
  <name>EBI Nexus Repository (Release)</name>
  <url>http://www.ebi.ac.uk/Tools/maven/repos/content/repositories/pst-release/</url>
  <releases/>
  <snapshots>
      <enabled>false</enabled>
  </snapshots>
</repository>
  • Introduction
  • [Create Metadata](jmzTab Metadata)
  • [Create Header and Fill Data](jmzTab Columns)
  • [Utilities](jmzTab Utilities)
  • [Warn/Error Messages](jmzTab Messages)
  • JavaDoc
  • [Release Notes](jmzTab Release Notes)
Clone this wiki locally