- Notifications
You must be signed in to change notification settings - Fork0
Java API for the extraction and management of MIAPE documents from standard proteomics data files
License
smdb21/java-miape-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
TheJava MIAPE API is an open source Java API designed for the extraction and management of MIAPE information from commonly used proteomics data files.
What is theMIAPE information?
- MIAPE stands for theMinimalInformationAbout aProteomicsExperiment, and it is a set of guidelines defined by the Human Proteome Organization'sProteomics Standard Initiative (HUPO-PSI)(1)
The Java MIAPE API is designed in 4 different modules:
- Themodel module: This module contains the classes needed to represent the MIAPE information of the different types of experiments. The interfaces (under packageorg.proteored.miapeapi.interfaces) MiapeGEDocument, MiapeGIDocument, MiapeMSDocumen and MiapeMSIDocument, define the MIAPE information for the Gel Electrophoresis(2), Gel Image Informatics(3), Mass Spectrometry(4) and Mass Spectrometry Informatics(5) MIAPE modules.
- Thefactory module: This module provides the util classes for the creation of the MIAPE document objects.
- TheXML module: This module provides the methods for the extraction of the MIAPE information from commonly used proteomics data files (most of them XML), such as:mzIdentML, mzML, pepXML, PRIDE XML, DtaSelect txt, pepXML orXTandem XML.
- Thepersistence model: This module provides the methods to be implemented by a persistence system, which will be able to persist the MIAPE information, on files, a database, etc...
This API was firstly designed by Emilio Salazar Do?ate andSalvador Martinez-Bartolome members of theProteoRed Bioinformatics Working Group, under the supervision of Juan Pablo Albar, at theProteomics Laboratory of theNational Center for Biotechnology (CNB-CSIC) in Madrid, Spain. Later, the project was continued by Salvador Martinez-Bartolome under the supervision of John R. Yates III at theJohn Yates laboratory atThe Scripps Research Institute, La Jolla, California, USA.
Latest build available at:http://sealion.scripps.edu/miape-api/
Using MAVEN:Add this to your pom.xml:
<repository> <id>internal</id> <name>John Yates lab Internal Repository</name> <url>http://sealion.scripps.edu/archiva/repository/internal/</url></repository><repository> <id>snapshots</id> <name>John Yates lab snapshots maven repository</name> <url>http://sealion.scripps.edu/archiva/repository/snapshots/</url></repository>
Including this dependency:
<dependency> <groupId>org.proteored.miape.api</groupId> <artifactId>miape-api</artifactId> <version>1.9.6</version><!-- or the latest version available--></dependency>
This example shows how a MIAPE MS document object (object module) is created using thefactory module and then is exported to a XML file (XML module) and stored in a database (persistence module):
publicclasscreateMiape(PersistenceManagerdatabaseManager,ControlVocabularyManagercvManager) {// projectProjectBuilderprojectBuilder =MiapeDocumentFactory.createProjectBuilder("my project").date(newMiapeDate(newDate()));// User (if needed for persistence, like a database)UserBuilderuserBuilder =MiapeDocumentFactory.createUserBuilder("myUserName","myPassword",databaseManager);// SpectrometerSpectrometerBuilderspectrometerBuilder = (SpectrometerBuilder)MiapeMSDocumentFactory .createSpectrometerBuilder(SpectrometerName.LTQ_ORBITRAP_XL_NAME).manufacturer("Thermo Scientific").version("version XL").catalogNumber("#12345").model("The new Orbitrap XL");// AnalyzerAnalyserBuilderanalyserBuilder =MiapeMSDocumentFactory.createAnalyserBuilder("orbitrap").description("Description of the orbitrap");// Ion sourceEsiBuilderesiBuilder =MiapeMSDocumentFactory.createEsiBuilder("nano-ESI").parameters("xx Volts").supplyType("regular supply");// Instrument Configuration (analiser + esi)InstrumentConfigurationBuilderinstrumentConfigurationBuilder =MiapeMSDocumentFactory.createInstrumentConfigurationBuilder("LTQ configuration").analyser(analyserBuilder.build()).esi(esiBuilder.build());// MIAPE MS document (user + miape project + spectrometer + instrument// configurationMiapeMSDocumentmiapeMS = (MiapeMSDocument)MiapeMSDocumentFactory.createMiapeMSDocumentBuilder(projectBuilder.build(),"my first miape document",userBuilder.build()).instrumentConfiguration(instrumentConfigurationBuilder.build()) .spectrometer(spectrometerBuilder.build()).cvManager(cvManager) .dbManager(databaseManager)// needed for later use of .store().build();// Save MIAPE MS to XML fileMiapeXmlFile<MiapeMSDocument>miapeMSXML =MiapeMSXmlFactory.getFactory().toXml(miapeMS,cvManager);try {miapeMSXML.saveAs("/home/username/myFirstMiapeMS.xml");System.out.println("New file created at :" +miapeMSXML.getPath());}catch (IOExceptione1) {e1.printStackTrace();}// Store it in the databasetry {intidentifier =miapeMS.store();System.out.println("Document stored in the database with identifier " +identifier);}catch (MiapeDatabaseException |MiapeSecurityExceptione) {e.printStackTrace();}}
This example shows how to extract the MIAPE information from commonly used proteomics data files:
publicvoidextractMIAPEInformationFromFiles(ControlVocabularyManagercvManager)throwsMiapeDatabaseException,MiapeSecurityException {FileprideXMLFile =newFile("path_to_pride_xml");FilextandemXMLFile =newFile("path_to_xtandem_xml");FilemzIdentMLFile =newFile("path_to_mzIdentML");FilemzMLFile =newFile("path_to_mzML");FiletsvFile =newFile("path_to_tsv_xml");FiledtaSelectFile =newFile("path_to_dtaSelect_xml");// PRIDE XMLMiapeFullPrideXMLFilemiapeFullPride =newMiapeFullPrideXMLFile(prideXMLFile);miapeFullPride.setCVManager(cvManager);// because all MIAPEs are under a projectmiapeFullPride.setProjectName("my project");MiapeMSDocumentmiapeMSFromPRIDEXML =miapeFullPride.toMiapeMS();MiapeMSIDocumentmiapeMSIromPRIDEXML =miapeFullPride.toMiapeMSI();printMiapeMS(miapeMSFromPRIDEXML);printMiapeMSI(miapeMSIromPRIDEXML);// XTANDEM XMLMiapeXTandemFilemiapeXTandemXMLFile =newMiapeXTandemFile(xtandemXMLFile);miapeXTandemXMLFile.setCvManager(cvManager);miapeXTandemXMLFile.setProjectName("my project");MiapeMSIDocumentmiapeMSIFromXTandem =miapeXTandemXMLFile.toDocument();printMiapeMSI(miapeMSIFromXTandem);// MZIDENTMLMiapeMzIdentMLFilemiapeMzIdentMLFile =newMiapeMzIdentMLFile(mzIdentMLFile);miapeMzIdentMLFile.setCvManager(cvManager);miapeMzIdentMLFile.setProjectName("my project");MiapeMSIDocumentmiapeMSIFromMzIdentML =miapeMzIdentMLFile.toDocument();printMiapeMSI(miapeMSIFromMzIdentML);// MZMLMiapeMzMLFilemiapeMzMLFile =newMiapeMzMLFile(mzMLFile);miapeMzMLFile.setCvManager(cvManager);miapeMzMLFile.setProjectName("my project");MiapeMSDocumentmiapeMSFromMzML =miapeMzMLFile.toDocument();printMiapeMS(miapeMSFromMzML);// TAB SEPARATED FILEMiapeTSVFilemiapeTSVFile =newMiapeTSVFile(tsvFile,TableTextFileSeparator.TAB);miapeTSVFile.setCvManager(cvManager);miapeTSVFile.setProjectName("my project");MiapeMSIDocumentmiapeMSIFromTSV =miapeTSVFile.toDocument();printMiapeMSI(miapeMSIFromTSV);// DTASELECTMiapeDTASelectFilemiapeDTASelectFile =newMiapeDTASelectFile(dtaSelectFile);miapeDTASelectFile.setCvManager(cvManager);miapeDTASelectFile.setProjectName("my project");MiapeMSIDocumentmiapeMSIFromDTASelect =miapeDTASelectFile.toDocument();printMiapeMSI(miapeMSIFromDTASelect);}
This example show theprintMiapeMS andprintMiapeMSI methods called in the previous example, showing how the information contained in each document can be extracted and printed
privatevoidprintMiapeMSI(MiapeMSIDocumentmiapeMSI) {System.out.println("MIAPE MSI: ");System.out.println("Name: " +miapeMSI.getName());System.out.println("");System.out.println("Total number of PSMs: " +miapeMSI.getIdentifiedPeptides().size());for (IdentifiedProteinSetproteinSet :miapeMSI.getIdentifiedProteinSets()) {InputParameterip =proteinSet.getInputParameter();System.out.println("Input parameters: " +ip.getName());System.out.println("Search engine: " +ip.getSoftware().getName());System.out.println("Parent tolerance: " +ip.getPrecursorMassTolerance() +" " +ip.getPrecursorMassToleranceUnit());System.out.println("Fragment tolerance: " +ip.getFragmentMassTolerance() +" " +ip.getFragmentMassToleranceUnit());System.out.println("Num miss-cleavages: " +ip.getMisscleavages());System.out.println("Number of proteins: " +proteinSet.getIdentifiedProteins().size());for (StringproteinACC :proteinSet.getIdentifiedProteins().keySet()) {IdentifiedProteinprotein =proteinSet.getIdentifiedProteins().get(proteinACC);System.out.println("Protein " +proteinACC +" contains " +protein.getIdentifiedPeptides().size() +" PSMs");for (IdentifiedPeptidepeptide :protein.getIdentifiedPeptides()) {System.out.println("PSM " +peptide.getSpectrumRef() +" with sequence " +peptide.getSequence()+" and charge " +peptide.getCharge());}}}}privatevoidprintMiapeMS(MiapeMSDocumentmiapeMS) {System.out.println("MIAPE MS: ");System.out.println("Name: " +miapeMS.getName());System.out.println("");for (InstrumentConfigurationic :miapeMS.getInstrumentConfigurations()) {for (Analyseranalyser :ic.getAnalyzers()) {System.out.println("Analyser: " +analyser.getName());System.out.println("Description: " +analyser.getDescription());}for (Esiesi :ic.getEsis()) {System.out.println("ESI: " +esi.getName());System.out.println("Parameters: " +esi.getParameters());System.out.println("Supply type: " +esi.getSupplyType());}for (ActivationDissociationad :ic.getActivationDissociations()) {System.out.println("Name: " +ad.getName());System.out.println("Activation type: " +ad.getActivationType());System.out.println("Gas type: " +ad.getGasType());System.out.println("Gas pressure: " +ad.getGasPressure() +" " +ad.getPressureUnit());}}}