コード例 #1
0
        private List <NGlycanPeak> Hybrid(int level = 0)
        {
            List <NGlycanPeak> res = new List <NGlycanPeak>();
            int hexNAc             = 2 + 2 * level;
            int hex = 3 + 2 * level;

            //HexNAc
            for (int a = 0; a <= 2; a++)
            {
                // Hex
                for (int b = 0; b <= a; b++)
                {
                    // mannose
                    for (int man = 0; man <= Hex - hex; man++)
                    {
                        //Fuc
                        for (int c = 0; c <= Math.Min(Fuc, a); c++)
                        {
                            // NeuAc
                            for (int d = 0; d <= Math.Min(NeuAc, b); d++)
                            {
                                if (Valid(hexNAc + a, hex + b + man, c, d, 0))
                                {
                                    NGlycanPeak temp = new NGlycanPeak(permethylated, hexNAc + a, hex + b + man, c, d, 0);
                                    res.Add(temp);
                                    if (Valid(hexNAc + a, hex + b + man, c + 1, d, 0))
                                    {
                                        temp = new NGlycanPeak(permethylated, hexNAc + a, hex + b + man, c + 1, d, 0);
                                        res.Add(temp);
                                    }
                                }
                            }

                            // NeuGc
                            for (int e = 0; e <= Math.Min(NeuGc, b); e++)
                            {
                                if (Valid(hexNAc + a, hex + b + man, c, 0, e))
                                {
                                    NGlycanPeak temp = new NGlycanPeak(permethylated, hexNAc + a, hex + b + man, c, 0, e);
                                    res.Add(temp);
                                    if (Valid(hexNAc + a, hex + b + man, c + 1, 0, e))
                                    {
                                        temp = new NGlycanPeak(permethylated, hexNAc + a, hex + b + man, c + 1, 0, e);
                                        res.Add(temp);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return(res);
        }
コード例 #2
0
        private List <NGlycanPeak> HighMannose(int level = 0)
        {
            List <NGlycanPeak> res = new List <NGlycanPeak>();
            int hexNAc             = 2 + 2 * level;
            int hex = 3 + 2 * level;

            // mannose
            for (int man = 0; man <= Hex - hex; man++)
            {
                NGlycanPeak temp = new NGlycanPeak(permethylated, hexNAc, hex + man, 0, 0, 0);
                res.Add(temp);
            }

            return(res);
        }