/** * <p> * Constructor for MatchAlignerMethod. * </p> * * @param featureTables a {@link java.util.List} object. * @param mzTolerance an objectt * @param rtTolerance a {@link io.github.msdk.util.tolerances.RTTolerance} object. */ public JoinAlignerMethod(@Nonnull List<FeatureTable> featureTables, @Nonnull MzTolerance mzTolerance, @Nonnull RTTolerance rtTolerance) { this.featureTables = featureTables; this.mzTolerance = mzTolerance; this.rtTolerance = rtTolerance; // Make a new feature table this.result = new SimpleFeatureTable(); }
private void addColumns(@Nonnull FeatureTable featureTable, @Nonnull MZTabFile mzTabFile) { // Sample specific columns SortedMap<Integer, MsRun> msrun = mzTabFile.getMetadata().getMsRunMap(); List<Sample> allSamples = new ArrayList<>(); for (Entry<Integer, MsRun> entry : msrun.entrySet()) { // Sample File file = new File(entry.getValue().getLocation().getPath()); String fileName = file.getName(); Sample sample = new SimpleSample(fileName); allSamples.add(sample); sampleMap.put(entry.getValue(), sample); } newFeatureTable.setSamples(allSamples); }
newPeakList = new SimpleFeatureTable(); newSample = new SimpleSample(rawDataFile.getName(), rawDataFile); newPeakList.addRow(newRow); if (debug > 0) logger.debug("Peak added id=" + sx.spotId + " " + sx.center.mzCenter + " mz, time=" logger.info("Detected " + newPeakList.getRows().size() + " peaks");
newFeatureTable = new SimpleFeatureTable(); newFeatureTable.setSamples(Collections.singletonList(fileSample)); boolean normalizeColumnNames = false; newFeatureTable.addRow(row); SimpleFeature feature = new SimpleFeature(); row.setFeature(fileSample, feature);
allSamples.addAll(featureTable.getSamples()); result.setSamples(allSamples); result.addRow(targetRow);
private void addRows(@Nonnull FeatureTable featureTable, @Nonnull MZTabFile mzTabFile) { // Loop through small molecules data Collection<SmallMolecule> smallMolecules = mzTabFile.getSmallMolecules(); for (SmallMolecule smallMolecule : smallMolecules) { parsedRows++; SimpleFeatureTableRow currentRow = new SimpleFeatureTableRow(featureTable); currentRow.setCharge(smallMolecule.getCharge()); // Add data to sample specific columns SortedMap<Integer, Assay> assayMap = mzTabFile.getMetadata().getAssayMap(); for (Entry<Integer, Assay> entry : assayMap.entrySet()) { Assay sampleAssay = assayMap.get(entry.getKey()); Sample sample = sampleMap.get(sampleAssay.getMsRun()); MzTabFeature newFeature = new MzTabFeature(smallMolecule, sampleAssay); currentRow.setFeature(sample, newFeature); } // Add row to feature table newFeatureTable.addRow(currentRow); // Check if cancel is requested if (canceled) return; } }
newPeakList = new SimpleFeatureTable(); newSample = new SimpleSample(rawDataFile.getName(), rawDataFile); newPeakList.addRow(newRow); if (debug > 0) logger.debug("Peak added id=" + sx.spotId + " " + sx.center.mzCenter + " mz, time=" logger.info("Detected " + newPeakList.getRows().size() + " peaks");
allSamples.addAll(featureTable.getSamples()); result.setSamples(allSamples); result.addRow(targetRow);
result.addRow(targetRow);
/** * <p> * Constructor for MatchAlignerMethod. * </p> * * @param featureTables a {@link java.util.List} object. * @param mzTolerance an objectt * @param rtTolerance a {@link io.github.msdk.util.tolerances.RTTolerance} object. */ public JoinAlignerMethod(@Nonnull List<FeatureTable> featureTables, @Nonnull MzTolerance mzTolerance, @Nonnull RTTolerance rtTolerance) { this.featureTables = featureTables; this.mzTolerance = mzTolerance; this.rtTolerance = rtTolerance; // Make a new feature table this.result = new SimpleFeatureTable(); }
result.addRow(targetRow);
/** * <p> * Constructor for FeatureNormalizationByCompoundMethod. * </p> * * @param featureTable a {@link io.github.msdk.datamodel.FeatureTable} object. * @param normalizationType a * {@link io.github.msdk.normalization.compound.NormalizationType} object. * @param internalStandardRows a {@link java.util.List} object of * {@link io.github.msdk.datamodel.FeatureTableRow} . * @param mzRtWeight a {@link java.lang.Integer} object. */ public FeatureNormalizationByCompoundMethod(@Nonnull FeatureTable featureTable, @Nonnull NormalizationType normalizationType, @Nonnull List<FeatureTableRow> internalStandardRows, @Nonnull Integer mzRtWeight) { this.featureTable = featureTable; this.normalizationType = normalizationType; this.mzRtWeight = mzRtWeight; this.internalStandardRows = internalStandardRows; // Make a copy of the feature table result = new SimpleFeatureTable(); }
/** * <p> * Constructor for IsotopeGrouperMethod. * </p> * * @param featureTable a {@link io.github.msdk.datamodel.FeatureTable} object. * @param featureTableName a {@link java.lang.String} object. * @param mzTolerance a {@link io.github.msdk.util.tolerances.MzTolerance} object. * @param rtTolerance a {@link io.github.msdk.util.tolerances.RTTolerance} object. * @param maximumCharge a {@link java.lang.Integer} object. * @param requireMonotonicShape a {@link java.lang.Boolean} object. */ public IsotopeGrouperMethod(@Nonnull FeatureTable featureTable, @Nonnull MzTolerance mzTolerance, @Nonnull RTTolerance rtTolerance, @Nonnull Integer maximumCharge, @Nonnull Boolean requireMonotonicShape) { this.featureTable = featureTable; this.mzTolerance = mzTolerance; this.rtTolerance = rtTolerance; this.maximumCharge = maximumCharge; this.requireMonotonicShape = requireMonotonicShape; // Make a new feature table result = new SimpleFeatureTable(); }
/** * <p> * Constructor for FeatureNormalizationByCompoundMethod. * </p> * * @param featureTable a {@link io.github.msdk.datamodel.FeatureTable} object. * @param normalizationType a * {@link io.github.msdk.normalization.compound.NormalizationType} object. * @param internalStandardRows a {@link java.util.List} object of * {@link io.github.msdk.datamodel.FeatureTableRow} . * @param mzRtWeight a {@link java.lang.Integer} object. */ public FeatureNormalizationByCompoundMethod(@Nonnull FeatureTable featureTable, @Nonnull NormalizationType normalizationType, @Nonnull List<FeatureTableRow> internalStandardRows, @Nonnull Integer mzRtWeight) { this.featureTable = featureTable; this.normalizationType = normalizationType; this.mzRtWeight = mzRtWeight; this.internalStandardRows = internalStandardRows; // Make a copy of the feature table result = new SimpleFeatureTable(); }
/** * <p> * Constructor for IsotopeGrouperMethod. * </p> * * @param featureTable a {@link io.github.msdk.datamodel.FeatureTable} object. * @param featureTableName a {@link java.lang.String} object. * @param mzTolerance a {@link io.github.msdk.util.tolerances.MzTolerance} object. * @param rtTolerance a {@link io.github.msdk.util.tolerances.RTTolerance} object. * @param maximumCharge a {@link java.lang.Integer} object. * @param requireMonotonicShape a {@link java.lang.Boolean} object. */ public IsotopeGrouperMethod(@Nonnull FeatureTable featureTable, @Nonnull MzTolerance mzTolerance, @Nonnull RTTolerance rtTolerance, @Nonnull Integer maximumCharge, @Nonnull Boolean requireMonotonicShape) { this.featureTable = featureTable; this.mzTolerance = mzTolerance; this.rtTolerance = rtTolerance; this.maximumCharge = maximumCharge; this.requireMonotonicShape = requireMonotonicShape; // Make a new feature table result = new SimpleFeatureTable(); }
/** * <p> * Constructor for RansacAlignerMethod. * </p> * * @param featureTables a {@link java.util.List} object. * @param dataStore a {@link io.github.msdk.datamodel.datastore.DataPointStore} object. * @param mzTolerance a {@link io.github.msdk.util.MZTolerance} object. * @param featureTableName a {@link java.lang.String} object. * @param rtTolerance a {@link io.github.msdk.util.RTTolerance} object. * @param t a threshold value for determining when a data point fits a mode * @param linear a {@link java.lang.Boolean} object. * @param dataPointsRate % of datapoints from the data required to assert that a model fits well * to data. If it is 0, the variable will be set as 0.1 */ public RansacAlignerMethod(@Nonnull List<FeatureTable> featureTables, @Nonnull MzTolerance mzTolerance, @Nonnull RTTolerance rtTolerance, @Nonnull String featureTableName, @Nonnull double t, @Nonnull boolean linear, @Nonnull double dataPointsRate) { this.featureTables = featureTables; this.mzTolerance = mzTolerance; this.rtToleranceAfterCorrection = rtTolerance; this.rtTolerance = new RTTolerance(rtToleranceAfterCorrection.getTolerance() * 2, false); this.featureTableName = featureTableName; this.t = t; this.linear = linear; this.dataPointsRate = dataPointsRate; // Make a new feature table result = new SimpleFeatureTable(); }
/** * <p> * Constructor for RansacAlignerMethod. * </p> * * @param featureTables a {@link java.util.List} object. * @param dataStore a {@link io.github.msdk.datamodel.datastore.DataPointStore} object. * @param mzTolerance a {@link io.github.msdk.util.MZTolerance} object. * @param featureTableName a {@link java.lang.String} object. * @param rtTolerance a {@link io.github.msdk.util.RTTolerance} object. * @param t a threshold value for determining when a data point fits a mode * @param linear a {@link java.lang.Boolean} object. * @param dataPointsRate % of datapoints from the data required to assert that a model fits well * to data. If it is 0, the variable will be set as 0.1 */ public RansacAlignerMethod(@Nonnull List<FeatureTable> featureTables, @Nonnull MzTolerance mzTolerance, @Nonnull RTTolerance rtTolerance, @Nonnull String featureTableName, @Nonnull double t, @Nonnull boolean linear, @Nonnull double dataPointsRate) { this.featureTables = featureTables; this.mzTolerance = mzTolerance; this.rtToleranceAfterCorrection = rtTolerance; this.rtTolerance = new RTTolerance(rtToleranceAfterCorrection.getTolerance() * 2, false); this.featureTableName = featureTableName; this.t = t; this.linear = linear; this.dataPointsRate = dataPointsRate; // Make a new feature table result = new SimpleFeatureTable(); }
newFeatureTable = new SimpleFeatureTable();