コード例 #1
0
ファイル: REVC.cs プロジェクト: AlterCodex/Bioinformatics
        public override string Solve(AdnReader Reader)
        {
            string Revc = "";

            while (Reader.CanRead())
            {
                char c = Reader.ReadChar();
                switch (c)
                {
                case 'A':
                    Revc = 'T' + Revc;
                    continue;

                case 'C':
                    Revc = 'G' + Revc;
                    continue;

                case 'G':
                    Revc = 'C' + Revc;
                    continue;

                case 'T':
                    Revc = 'A' + Revc;
                    continue;
                }
            }
            return(Revc);
        }
コード例 #2
0
        public override string Solve(AdnReader Reader)
        {
            int A, G, C, T;

            A = 0;
            G = 0;
            C = 0;
            T = 0;
            while (Reader.CanRead())
            {
                char c = Reader.ReadChar();
                switch (c)
                {
                case 'A':
                    A++;
                    continue;

                case 'C':
                    C++;
                    continue;

                case 'G':
                    G++;
                    continue;

                case 'T':
                    T++;
                    continue;
                }
            }
            return("" + A + " " + C + " " + " " + G + " " + T);
        }
コード例 #3
0
        public override string Solve(AdnReader Reader)
        {
            string RNA = "";

            while (Reader.CanRead())
            {
                char c = Reader.ReadChar();
                switch (c)
                {
                case 'T':
                    RNA += 'U';
                    continue;

                case 'A':
                case 'C':
                case 'G':
                    RNA += c;
                    continue;
                }
            }
            return(RNA);
        }