public PrositPingRequest(string ms2Model, string rtModel, SrmSettings settings, PeptideDocNode peptide, TransitionGroupDocNode precursor, int nce, Action updateCallback) : base(null, null, null, settings, peptide, precursor, null, nce, updateCallback) { Client = PrositPredictionClient.CreateClient(PrositConfig.GetPrositConfig()); IntensityModel = PrositIntensityModel.GetInstance(ms2Model); RTModel = PrositRetentionTimeModel.GetInstance(rtModel); if (IntensityModel == null && RTModel == null) { throw new PrositNotConfiguredException(); } }
public PrositLibraryBuilder(SrmDocument doc, string name, string outPath, Func <bool> replaceLibrary, IrtStandard irtStandard, IList <PeptideDocNode> peptides, IList <TransitionGroupDocNode> precursors, int nce) { _prositClient = PrositPredictionClient.Current; _intensityModel = PrositIntensityModel.Instance; _rtModel = PrositRetentionTimeModel.Instance; _peptides = peptides; _precursors = precursors; _document = doc; LibrarySpec = new BiblioSpecLiteSpec(name, outPath); // Needs to be created before building _replaceLibrary = replaceLibrary; IrtStandard = irtStandard; _nce = nce; }
public bool TestClient(PrositPredictionClient client) { var pingPep = new Peptide(@"PING"); var peptide = new PeptideDocNode(pingPep); var precursor = new TransitionGroupDocNode(new TransitionGroup(pingPep, Adduct.SINGLY_PROTONATED, IsotopeLabelType.light), new TransitionDocNode[0]); var input = new PrositIntensityModel.PeptidePrecursorNCE(peptide, precursor, IsotopeLabelType.light, 32); var intensityModel = PrositIntensityModel.GetInstance(PrositIntensityModel.Models.First()); try { intensityModel.PredictSingle(client, SrmSettingsList.GetDefault(), input, CancellationToken.None); return(true); } catch (Exception) { return(false); } }