private static double GetUncalibratedSilacMass(SilacCluster sc, SilacType type, IsotopeCluster[] isotopeClusters, double[] centerMz, float[] intensities) { return (GetUncalibratedFullIsotopePatternMassEstimate(sc.GetIsotopeClusterIndices(type), sc.GetIsotopePatternStarts(type), sc.GetMassDiffs(type), isotopeClusters, centerMz, intensities)); }
private static double GetCalibratedSilacMassStat(SilacCluster sc, double[,] mzCalibrationPar, double[,] intensityCalibrationPar, SilacType type, IsotopeCluster[] isotopeCluster, IPeakList peakList, float[] intensities) { int dummy; return (GetFullIsotopePatternMassEstimateNoBootstrapStat(sc.GetIsotopeClusterIndices(type), sc.GetIsotopePatternStarts(type), sc.GetMassDiffs(type), mzCalibrationPar, intensityCalibrationPar, true, out dummy, isotopeCluster, peakList, intensities)); }
public static double[] CalcSilacClusterProfile(SilacCluster cl, out int minIndex, SilacType type, IsotopeCluster[] isotopeClusters, IPeakList peakList, float[] intensities) { int[] m = cl.GetIsotopeClusterIndices(type); int n = m.Length; if (n == 1) { return(T03SilacAssembly.CalcIsotopeClusterProfile(isotopeClusters[m[0]], out minIndex, peakList)); } double[][] profiles = new double[n][]; int[] mins = new int[n]; int[] ends = new int[n]; double[] intens = new double[n]; for (int i = 0; i < n; i++) { if (m[i] == -1) { continue; } IsotopeCluster ic = isotopeClusters[m[i]]; profiles[i] = T03SilacAssembly.CalcIsotopeClusterProfile(ic, out mins[i], peakList); intens[i] = T03SilacAssembly.GetIsotopeClusterIntensity(ic, intensities); ends[i] = mins[i] + profiles[i].Length; } minIndex = ArrayUtil.Min(mins); int maxEnd = ArrayUtil.Max(ends); int len = maxEnd - minIndex; double[] result = new double[len]; double norm = 0; for (int i = 0; i < n; i++) { if (m[i] == -1) { continue; } norm += intens[i]; for (int j = 0; j < profiles[i].Length; j++) { result[j + mins[i] - minIndex] += profiles[i][j] * intens[i]; } } for (int i = 0; i < len; i++) { result[i] /= norm; } return(result); }