private void OnObjectTypesRemoved(object sender, StringListEventArgs args) { foreach (ActionButtonWithIconRemovable btn in Content.GetComponentsInChildren <ActionButtonWithIconRemovable>()) { if (args.Data.Contains(btn.GetLabel())) { Destroy(btn.gameObject); } } }
public static void SingleEventArgsTest() { Protein parentProteinForMatch = new Protein("MEK", null); CommonParameters commonParameters = new CommonParameters(digestionParams: new DigestionParams(minPeptideLength: 1)); var fsp = new List <(string fileName, CommonParameters fileSpecificParameters)>(); fsp.Add(("", commonParameters)); ModificationMotif.TryGetMotif("E", out ModificationMotif motif); List <Modification> variableModifications = new List <Modification> { new Modification(_originalId: "21", _target: motif, _locationRestriction: "Anywhere.", _monoisotopicMass: 21.981943) }; List <PeptideWithSetModifications> allPeptidesWithSetModifications = parentProteinForMatch.Digest(commonParameters.DigestionParams, new List <Modification>(), variableModifications).ToList(); Assert.AreEqual(4, allPeptidesWithSetModifications.Count()); PeptideWithSetModifications ps = allPeptidesWithSetModifications.First(); PeptideWithSetModifications pepWithSetModsForSpectrum = allPeptidesWithSetModifications[1]; MsDataFile myMsDataFile = new TestDataFile(new List <PeptideWithSetModifications> { pepWithSetModsForSpectrum }); Tolerance fragmentTolerance = new AbsoluteTolerance(0.01); Ms2ScanWithSpecificMass scan = new Ms2ScanWithSpecificMass(myMsDataFile.GetAllScansList().Last(), pepWithSetModsForSpectrum.MonoisotopicMass.ToMz(1), 1, null, new CommonParameters()); var theoreticalProducts = new List <Product>(); ps.Fragment(DissociationType.HCD, FragmentationTerminus.Both, theoreticalProducts); var matchedIons = MetaMorpheusEngine.MatchFragmentIons(scan, theoreticalProducts, new CommonParameters()); PeptideSpectralMatch newPsm = new PeptideSpectralMatch(ps, 0, 0, 2, scan, commonParameters, matchedIons); LocalizationEngine f = new LocalizationEngine(new List <PeptideSpectralMatch> { newPsm }, myMsDataFile, new CommonParameters(), fsp, new List <string>()); var singleEngine = new SingleEngineEventArgs(f); Assert.That(singleEngine.MyEngine.Equals(f)); var singleFile = new SingleFileEventArgs("", new List <string>()); Assert.That(singleFile.WrittenFile.Equals("")); var stringList = new StringListEventArgs(new List <string>()); var rr = (stringList.StringList.DefaultIfEmpty().First()); Assert.That(stringList.StringList.DefaultIfEmpty().First() == null); }
private void AddNewRnaSeqFastq(object sender, StringListEventArgs e) { if (!Dispatcher.CheckAccess()) { Dispatcher.BeginInvoke(new Action(() => AddNewRnaSeqFastq(sender, e))); } else { foreach (var uu in RnaSeqFastqCollection) { uu.Use = false; } foreach (var newRnaSeqFastqData in e.StringList) { RnaSeqFastqCollection.Add(new RNASeqFastqDataGrid(newRnaSeqFastqData)); } UpdateOutputFolderTextbox(); } }
private void AddNewSpectra(object sender, StringListEventArgs e) { if (!Dispatcher.CheckAccess()) { Dispatcher.BeginInvoke(new Action(() => AddNewSpectra(sender, e))); } else { foreach (var uu in rawDataObservableCollection) { uu.Use = false; } foreach (var newRawData in e.StringList) { rawDataObservableCollection.Add(new RawDataForDataGrid(newRawData)); } UpdateOutputFolderTextbox(); } }
private void OnObjectTypesAdded(object sender, StringListEventArgs args) { foreach (string objectTypeName in args.Data) { if (ActionsManager.Instance.ActionObjectsMetadata.TryGetValue(objectTypeName, out ActionObjectMetadata actionObjectMetadata) && !actionObjectMetadata.Abstract && !actionObjectMetadata.CollisionObject) { ActionButtonWithIconRemovable btn = CreateBtn(actionObjectMetadata); foreach (ActionButtonWithIconRemovable t in Content.GetComponentsInChildren <ActionButtonWithIconRemovable>()) { if (t.GetLabel().CompareTo(btn.GetLabel()) > 0) { btn.transform.SetSiblingIndex(t.transform.GetSiblingIndex()); return; } } } } }
void _listView_SourceListUpdated(object sender, StringListEventArgs e) { throw new System.NotImplementedException(); }