Examples of MzData


Examples of org.mcisb.massspectrometry.pride.model.ExperimentType.MzData

   * @throws JAXBException
   * @throws FileNotFoundException
   */
  public static void addContact( final File mzDataFile, final String name, final String institution, final String contactInfo ) throws JAXBException, FileNotFoundException
  {
    final MzData mzData = read( mzDataFile );
   
    for( final PersonType contact : mzData.getDescription().getAdmin().getContact() )
    {
      contact.setName( name );
      contact.setInstitution( institution );
      contact.setContactInfo( contactInfo );
    }
View Full Code Here

Examples of org.mcisb.massspectrometry.pride.model.ExperimentType.MzData

   * @throws JAXBException
   */
  public static ExperimentCollection getExperimentCollection( final File mzDataFile ) throws JAXBException
  {
    final String mzDataFilename = mzDataFile.getName();
    final MzData mzData = JAXBContext.newInstance( "org.mcisb.massspectrometry.pride.model" ).createUnmarshaller().unmarshal( new StreamSource( mzDataFile ), MzData.class ).getValue(); //$NON-NLS-1$
   
    final Protocol protocol = new Protocol();
    protocol.setProtocolName( "undefined" ); //$NON-NLS-1$
   
    final ExperimentType experimentType = new ExperimentType();
View Full Code Here

Examples of org.mcisb.massspectrometry.pride.model.ExperimentType.MzData

    final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
   
    setMessage( resourceBundle.getString( "PrideConverter.generating" ) ); //$NON-NLS-1$
   
    // Get MzData:
    final MzData mzData = getMzData();
   
    // addCvParamOrUserParam to MzData:
    final Map<String,String> userParams = new HashMap<String,String>();
    final Collection<CvParamType> sampleDescriptionCvParams = ( samples == null ) ? new ArrayList<CvParamType>() : getSampleDescriptionCvParams( userParams );
    addCvParamOrUserParam( mzData.getDescription().getAdmin().getSampleDescription(), userParams, sampleDescriptionCvParams );

    // Get GelFreeIdentificationTypes:
    final List<GelFreeIdentificationType> gelFreeIdentificationTypes = getGelFreeIdentificationTypes();
   
    setMessage( resourceBundle.getString( "PrideConverter.generating" ) ); //$NON-NLS-1$
View Full Code Here

Examples of org.mcisb.massspectrometry.pride.model.ExperimentType.MzData

   * @throws IOException
   */
  private static File getMzDataFile( final ExperimentCollection experimentCollection ) throws JAXBException, IOException
  {
    final File mzDataFile = File.createTempFile( "temp", ".mzData" ); //$NON-NLS-1$ //$NON-NLS-2$
    final MzData mzData = experimentCollection.getExperiment().get( FIRST ).getMzData();
    XmlUtils.getMarshaller( "org.mcisb.massspectrometry.pride.model" ).marshal( new JAXBElement<MzData>( new QName( "", "mzData" ), MzData.class, mzData ), mzDataFile )//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
    return mzDataFile;
  }
View Full Code Here

Examples of org.mcisb.massspectrometry.pride.model.ExperimentType.MzData

  {
    final String STABLE_ISOTOPE_RATIO_ACCESSION_ERROR_ID = "STABLE_ISOTOPE_RATIO_ACCESSION_ERROR_ID"; //$NON-NLS-1$
    final String NUM_OBSERVATIONS_ID = "NUM_OBSERVATIONS_ID"; //$NON-NLS-1$
   
    final Set<Integer> matchedSpectrumReferences = new TreeSet<Integer>();
    final MzData mzData =  experimentCollection.getExperiment().get( FIRST ).getMzData();
    final List<org.mcisb.massspectrometry.pride.model.ExperimentType.MzData.SpectrumList.Spectrum> spectra = mzData.getSpectrumList().getSpectrum();
   
    initSpectra( mzData );
   
    final PrecursorSpectrumFactory precursorSpectrumFactory = new PrecursorSpectrumFactory( mzData, mzDataValues, intenValues, rtValues, labelAccessions, spectrumId );
    final XicFactory xicFactory = new XicFactory( mzData, mzDataValues, intenValues, rtValues, massTolerance, massToleranceUnit, RT_TOLERANCE, spectrumId );
View Full Code Here

Examples of org.mcisb.massspectrometry.pride.model.ExperimentType.MzData

   * @throws SAXException
   *
   */
  public void update( final File mzDataFile ) throws JAXBException, IOException, SAXException
  {
    final MzData mzData = MzDataFormatter.read( mzDataFile );
   
    final CvLookupType cvLookupType = new CvLookupType();
    cvLookupType.setCvLabel( "PSI" ); //$NON-NLS-1$
    cvLookupType.setFullName( "The PSI Ontology" ); //$NON-NLS-1$
    cvLookupType.setVersion( "1.0.0" ); //$NON-NLS-1$
    cvLookupType.setAddress( "http://psidev.sourceforge.net/ontology/" ); //$NON-NLS-1$
    mzData.getCvLookup().add( cvLookupType );
   
    final DescriptionType description = mzData.getDescription().getAdmin().getSampleDescription();
    final List<Object> descriptionCvParamOrUserParam = description.getCvParamOrUserParam();
    descriptionCvParamOrUserParam.add( PrideParamFactory.getCvParam( "NEWT", "4932", "Saccharomyces cerevisiae (Baker's yeast)", "SUBSAMPLE_1" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    descriptionCvParamOrUserParam.add( PrideParamFactory.getCvParam( "PRIDE", "PRIDE:0000205", "Heavy stable isotope label", "SUBSAMPLE_2" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    descriptionCvParamOrUserParam.add( PrideParamFactory.getCvParam( "MOD", "MOD:00544", "6x(13)C labeled residue", "SUBSAMPLE_2" ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    descriptionCvParamOrUserParam.add( PrideParamFactory.getUserParam( "SUBSAMPLE_1", "Sample" ) ); //$NON-NLS-1$ //$NON-NLS-2$
    descriptionCvParamOrUserParam.add( PrideParamFactory.getUserParam( "SUBSAMPLE_2", "QconCAT" ) ); //$NON-NLS-1$ //$NON-NLS-2$
   
    SourceFileType sourceFileType = mzData.getDescription().getAdmin().getSourceFile();
   
    if( sourceFileType == null )
    {
      sourceFileType = new SourceFileType();
    }
   
    sourceFileType.setPathToFile( mzDataFile.getParentFile().toURI().toURL().toString() );
    sourceFileType.setNameOfFile( mzDataFile.getName().replace( ".mzData", ".raw" ) ); //$NON-NLS-1$ //$NON-NLS-2$
   
    final String sampleName = mzData.getDescription().getAdmin().getSampleName();
    Integer replicateCountInteger = sampleNameToReplicateCount.get( sampleName );
    int replicateCount = 1;
   
    if( replicateCountInteger != null )
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.