Skip to content

Commit

Permalink
finished quick search implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-kopczynski committed Oct 10, 2023
1 parent 49b552a commit fad7018
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions LipidCreator/CreatorGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public CreatorGUI(string _inputParameters)
medNegAdductCheckbox2.Enabled = false;
medNegAdductCheckbox3.Enabled = false;
medNegAdductCheckbox4.Enabled = false;
changeTab(6);
changeTab(0);

// add instruments into menu for collision energy optimization
for (int i = 1; i < lipidCreator.availableInstruments.Count; ++i)
Expand Down Expand Up @@ -1481,9 +1481,10 @@ public void changeTabElements(int index)
break;
}

menuResetCategory.Enabled = currentIndex != LipidCategory.NoLipid;
menuMS2Fragments.Enabled = currentIndex != LipidCategory.NoLipid;
menuIsotopes.Enabled = currentIndex != LipidCategory.NoLipid;
HashSet<LipidCategory> acceptedLipids = new HashSet<LipidCategory>(){LipidCategory.Glycerolipid, LipidCategory.Glycerophospholipid, LipidCategory.Sphingolipid, LipidCategory.Sterollipid, LipidCategory.LipidMediator};
menuResetCategory.Enabled = acceptedLipids.Contains(currentIndex);
menuMS2Fragments.Enabled = acceptedLipids.Contains(currentIndex);
menuIsotopes.Enabled = acceptedLipids.Contains(currentIndex);

if (currentLipid != null)
{
Expand Down
3 changes: 3 additions & 0 deletions LipidCreator/LipidCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,8 @@ public Lipid translateLipid(csgoslin.LipidAdduct lipidAdduct, bool allowSpecies
((Glycerolipid)lipid).fag3 = new FattyAcidGroup(false, true);
((Glycerolipid)lipid).containsSugar = lipidAdduct.contains_sugar();
fagEnum = new FattyAcidGroupEnumerator((Glycerolipid)lipid);
string hgGL = lipidAdduct.get_lipid_string(csgoslin.LipidLevel.CLASS);
if ((new HashSet<string>(){"DGDG", "MGDG", "SQDG"}).Contains(hgGL)) ((Glycerolipid)lipid).containsSugar = true;
break;

case csgoslin.LipidCategory.GP:
Expand All @@ -2014,6 +2016,7 @@ public Lipid translateLipid(csgoslin.LipidAdduct lipidAdduct, bool allowSpecies
string hg = lipidAdduct.get_lipid_string(csgoslin.LipidLevel.CLASS);
if ((new HashSet<string>(){"PC", "PE", "LPC", "LPE"}).Contains(hg))
{
((Phospholipid)lipid).hasPlasmalogen = true;
if (lipidAdduct.lipid.fa_list.Count > 0)
{
if (lipidAdduct.lipid.fa_list[0].lipid_FA_bond_type == csgoslin.LipidFaBondType.ETHER_PLASMANYL) hg += " O";
Expand Down

0 comments on commit fad7018

Please sign in to comment.