NHighMannose CreateByAddFucCore() { var g = new NHighMannose(); g.SetTable(table_); g.table_[2] = 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Fuc); return(g); }
NHighMannose CreateByAddGlcNAc() { var g = new NHighMannose(); g.SetTable(table_); g.table_[0] = g.table_[0] + 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.GlcNAc); return(g); }
NHighMannose CreateByAddManCore() { var g = new NHighMannose(); g.SetTable(table_); g.table_[1] = g.table_[1] + 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Man); glycans.Add(g); return(g); }
List <NHighMannose> CreateByAddManBranch() { List <NHighMannose> glycans = new List <NHighMannose>(); for (int i = 0; i < 3; i++) { if (i == 0 || table_[i + 3] < table_[i + 2]) // make it order { var g = new NHighMannose(); g.SetTable(table_); g.table_[i + 3] = g.table_[i + 3] + 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Man); glycans.Add(g); } } return(glycans); }
public override List <IGlycan> Grow(Monosaccharide monosaccharide) { List <IGlycan> glycans = new List <IGlycan>(); switch (monosaccharide) { case Monosaccharide.GlcNAc: if (ValidAddGlcNAc()) { NHighMannose ptr = CreateByAddGlcNAc(); glycans.Add(ptr); } break; case Monosaccharide.Man: if (ValidAddManCore()) { NHighMannose ptr = CreateByAddManCore(); glycans.Add(ptr); } else if (ValidAddManBranch()) { List <NHighMannose> gs = CreateByAddManBranch(); glycans.AddRange(gs); } break; case Monosaccharide.Fuc: if (ValidAddFucCore()) { NHighMannose ptr = CreateByAddFucCore(); glycans.Add(ptr); } break; default: break; } return(glycans); }