NGlycanComplex CreateByAddFucCore() { var g = new NGlycanComplex(); g.SetTable(table_); g.table_[2] = 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Fuc); return(g); }
NGlycanComplex CreateByAddGlcNAcBisect() { var g = new NGlycanComplex(); g.SetTable(table_); g.table_[3] = 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.GlcNAc); return(g); }
NGlycanComplex CreateByAddMan() { var g = new NGlycanComplex(); g.SetTable(table_); g.table_[1] = g.table_[1] + 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Man); glycans.Add(g); return(g); }
List <NGlycanComplex> CreateByAddNeuGc() { List <NGlycanComplex> glycans = new List <NGlycanComplex>(); for (int i = 0; i < 4; i++) { if (i == 0 || table_[i + 20] < table_[i + 19]) // make it order { if (table_[i + 4] > 0 && table_[i + 4] == table_[i + 8] && table_[i + 16] == 0 && table_[i + 20] == 0) { var g = new NGlycanComplex(); g.SetTable(table_); g.table_[i + 20] = 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.NeuGc); glycans.Add(g); } } } return(glycans); }
List <NGlycanComplex> CreateByAddFucTerminal() { List <NGlycanComplex> glycans = new List <NGlycanComplex>(); for (int i = 0; i < 4; i++) { if (i == 0 || table_[i + 12] < table_[i + 11]) // make it order { if (table_[i + 12] == 0 && table_[i + 4] > 0) { var g = new NGlycanComplex(); g.SetTable(table_); g.table_[i + 12] = 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Fuc); glycans.Add(g); } } } return(glycans); }
List <NGlycanComplex> CreateByAddGal() { List <NGlycanComplex> glycans = new List <NGlycanComplex>(); for (int i = 0; i < 4; i++) { if (i == 0 || table_[i + 8] < table_[i + 7]) // make it order { if (table_[i + 4] == table_[i + 8] + 1) { var g = new NGlycanComplex(); g.SetTable(table_); g.table_[i + 8] = g.table_[i + 8] + 1; g.SetComposition(composite); g.AddMonosaccharide(Monosaccharide.Gal); glycans.Add(g); } } } return(glycans); }
public override List <IGlycan> Grow(Monosaccharide monosaccharide) { List <IGlycan> glycans = new List <IGlycan>(); switch (monosaccharide) { case Monosaccharide.GlcNAc: if (ValidAddGlcNAcCore()) { NGlycanComplex ptr = CreateByAddGlcNAcCore(); glycans.Add(ptr); } else if (ValidAddGlcNAc()) { if (ValidAddGlcNAcBisect()) { NGlycanComplex ptr = CreateByAddGlcNAcBisect(); glycans.Add(ptr); } if (ValidAddGlcNAcBranch()) { List <NGlycanComplex> gs = CreateByAddGlcNAcBranch(); glycans.AddRange(gs); } } break; case Monosaccharide.Man: if (ValidAddMan()) { NGlycanComplex ptr = CreateByAddMan(); glycans.Add(ptr); } break; case Monosaccharide.Gal: if (ValidAddGal()) { List <NGlycanComplex> gs = CreateByAddGal(); glycans.AddRange(gs); } break; case Monosaccharide.Fuc: if (ValidAddFucCore()) { NGlycanComplex ptr = CreateByAddFucCore(); glycans.Add(ptr); } if (ValidAddFucTerminal()) { List <NGlycanComplex> gs = CreateByAddFucTerminal(); glycans.AddRange(gs); } break; case Monosaccharide.NeuAc: if (ValidAddNeuAc()) { List <NGlycanComplex> gs = CreateByAddNeuAc(); glycans.AddRange(gs); } break; case Monosaccharide.NeuGc: if (ValidAddNeuGc()) { List <NGlycanComplex> gs = CreateByAddNeuGc(); glycans.AddRange(gs); } break; default: break; } return(glycans); }