How to use the pyopenms.TransformationXMLFile function in pyopenms

To help you get started, we’ve selected a few pyopenms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenMS / OpenMS / src / pyOpenMS / pyTOPP / OpenSwathRTNormalizer.py View on Github external
def main(options):

    # load chromatograms
    chromatograms = pyopenms.MSExperiment()
    fh = pyopenms.FileHandler()
    fh.loadExperiment(options.infile, chromatograms)

    # load TraML file
    targeted = pyopenms.TargetedExperiment();
    tramlfile = pyopenms.TraMLFile();
    tramlfile.load(options.traml_in, targeted);

    trafo_out = algorithm(chromatograms, targeted)

    pyopenms.TransformationXMLFile().store(options.outfile, trafo_out);
github OpenMS / OpenMS / src / pyOpenMS / pyTOPP / MRMTransitionGroupScorer.py View on Github external
scorer = pyopenms.MRMFeatureFinderScoring()
    scoring_params = scorer.getDefaults();
    # Only report the top 5 features
    scoring_params.setValue("stop_report_after_feature", 5, '')
    scoring_params.setValue("rt_normalization_factor", rt_normalization_factor, '')
    scorer.setParameters(scoring_params);

    chromatograms = pyopenms.MSExperiment()
    fh = pyopenms.FileHandler()
    fh.loadExperiment(chromat_in, chromatograms)
    targeted = pyopenms.TargetedExperiment();
    tramlfile = pyopenms.TraMLFile();
    tramlfile.load(traml_in, targeted);

    trafoxml = pyopenms.TransformationXMLFile()
    trafo = pyopenms.TransformationDescription()
    if trafo_in is not None:
        model_params = pyopenms.Param()
        model_params.setValue("symmetric_regression", "false", "", [])
        model_type = "linear"
        trafoxml.load(trafo_in, trafo, True)
        trafo.fitModel(model_type, model_params);


    light_targeted = pyopenms.LightTargetedExperiment();
    pyopenms.OpenSwathDataAccessHelper().convertTargetedExp(targeted, light_targeted)
    output = algorithm(chromatograms, light_targeted, pp, scorer, trafo)

    pyopenms.FeatureXMLFile().store(out, output);
github OpenMS / OpenMS / pyOpenMS / pyTOPP / OpenSwathRTNormalizer.py View on Github external
def main(options):

    # load chromatograms
    chromatograms = pyopenms.MSExperiment()
    fh = pyopenms.FileHandler()
    fh.loadExperiment(options.infile, chromatograms)

    # load TraML file
    targeted = pyopenms.TargetedExperiment();
    tramlfile = pyopenms.TraMLFile();
    tramlfile.load(options.traml_in, targeted);

    trafo_out = algorithm(chromatograms, targeted)

    pyopenms.TransformationXMLFile().store(options.outfile, trafo_out);
github OpenMS / OpenMS / src / pyOpenMS / pyTOPP / MapAlignerPoseClustering.py View on Github external
pms.MapAlignmentTransformer.transformRetentionTimes(map_, trafo)
                addDataProcessing(map_, params, pms.ProcessingAction.ALIGNMENT)
                f_fxml_tmp.store(out_files[i], map_)
        else:
            map_ = pms.MSExperiment()
            pms.MzMLFile().load(in_file, map_)
            if in_file == file_:
                trafo.fitModel("identity")
            else:
                algorithm.align(map_, trafo)
            if out_files:
                pms.MapAlignmentTransformer.transformRetentionTimes(map_, trafo)
                addDataProcessing(map_, params, pms.ProcessingAction.ALIGNMENT)
                pms.MzMLFile().store(out_files[i], map_)
        if out_trafos:
            pms.TransformationXMLFile().store(out_trafos[i], trafo)

        plog.setProgress(i+1)

    plog.endProgress()