예제 #1
0
        NHighMannose CreateByAddFucCore()
        {
            var g = new NHighMannose();

            g.SetTable(table_);
            g.table_[2] = 1;
            g.SetComposition(composite);
            g.AddMonosaccharide(Monosaccharide.Fuc);
            return(g);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }