示例#1
0
 public Element(string name, string type, Element src, Element tgt)
 {
     this.name = name;
     this.type = type;
     this.src = src;
     this.tgt = tgt;
 }
示例#2
0
        private static Element GenerateTerminationSequence(List<Element> elements, Element prevNode)
        {
            Element[] n = new Element[24 * 2];

            // CCCACT
            n[0*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[0*2+1] = new Element(getNodeName(), CYTOSIN);
            n[1*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[1*2+1] = new Element(getNodeName(), CYTOSIN);
            n[2*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[2*2+1] = new Element(getNodeName(), CYTOSIN);
            n[3*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[3*2+1] = new Element(getNodeName(), ADENIN);
            n[4*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[4*2+1] = new Element(getNodeName(), CYTOSIN);
            n[5*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[5*2+1] = new Element(getNodeName(), THYMIN);

            // ......
            n[6*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[6*2+1] = new Element(getNodeName(), drawAminoAcid());
            n[7*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[7*2+1] = new Element(getNodeName(), drawAminoAcid());
            n[8*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[8*2+1] = new Element(getNodeName(), drawAminoAcid());
            n[9*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[9*2+1] = new Element(getNodeName(), drawAminoAcid());
            n[10*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[10*2+1] = new Element(getNodeName(), drawAminoAcid());
            n[11*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[11*2+1] = new Element(getNodeName(), drawAminoAcid());
            
            // AGTGGG = invers und gespiegelt zu CCCACT
            n[12*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[12*2+1] = new Element(getNodeName(), ADENIN);
            n[13*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[13*2+1] = new Element(getNodeName(), GUANIN);
            n[14*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[14*2+1] = new Element(getNodeName(), THYMIN);
            n[15*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[15*2+1] = new Element(getNodeName(), GUANIN);
            n[16*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[16*2+1] = new Element(getNodeName(), GUANIN);
            n[17*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[17*2+1] = new Element(getNodeName(), GUANIN);
            
            // AAAAAA
            n[18*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[18*2+1] = new Element(getNodeName(), ADENIN);
            n[19*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[19*2+1] = new Element(getNodeName(), ADENIN);
            n[20*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[20*2+1] = new Element(getNodeName(), ADENIN);
            n[21*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[21*2+1] = new Element(getNodeName(), ADENIN);
            n[22*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[22*2+1] = new Element(getNodeName(), ADENIN);
            n[23*2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[23*2+1] = new Element(getNodeName(), ADENIN);

            for (int i = 0; i < 24*2; ++i)
            {
                elements.Add(n[i]);
            }

            Element currNode = null;
            Element nucleotideNode = null;
            for (int i = 0; i < 24*2; i+=2)
            {
                currNode = n[i];
                nucleotideNode = n[i+1];
                elements.Add(new Element(getEdgeName(), BINDING, currNode, nucleotideNode));
                if (prevNode != null) elements.Add(new Element(getEdgeName(), PHOSPHATE_GROUP, prevNode, currNode));
                prevNode = currNode;
            }

            return currNode;
        }
示例#3
0
        private static Element GenerateDNAChain(List<Element> elements,
            int length, Element prevNode, string comment)
        {
            Element currNode = null;
            Element currNucleotideNode = null;
            Element prevNucleotideNode = null;
            for (int i = 1; i <= length; ++i)
            {
                currNode = new Element(getNodeName(), DESOXYRIBOSE);
                currNucleotideNode = new Element(getNodeName(), drawAminoAcid());
                while(currNucleotideNode.type==ADENIN && prevNucleotideNode!=null && prevNucleotideNode.type==THYMIN) 
                    currNucleotideNode.type = drawAminoAcid();
                if(i==1) currNode.comment = currNucleotideNode.comment = comment + "/first of " + length.ToString();
                if(i==length) currNode.comment = currNucleotideNode.comment = comment + "/last of " + length.ToString();
                elements.Add(currNode);
                elements.Add(currNucleotideNode);
                elements.Add(new Element(getEdgeName(), BINDING, currNode, currNucleotideNode));
                if (prevNode != null) elements.Add(new Element(getEdgeName(), PHOSPHATE_GROUP, prevNode, currNode));
                prevNode = currNode;
                prevNucleotideNode = currNucleotideNode;
            }

            return currNode; 
        }
示例#4
0
        private static Element GenerateCorruptDNAChain(List<Element> elements,
            int length, Element prevNode)
        {
            Element currNode = null;
            Element currNucleotideNode = null;
            Element prevNucleotideNode = null;
            bool isCorrupt = false;
            for(int i = 1; i <= length; ++i)
            {
                currNode = new Element(getNodeName(), DESOXYRIBOSE);
                currNucleotideNode = new Element(getNodeName(), drawMaybeCorruptAminoAcid());
                while(currNucleotideNode.type==ADENIN && prevNucleotideNode!=null && prevNucleotideNode.type==THYMIN)
                    currNucleotideNode.type = drawAminoAcid();
                if (currNucleotideNode.type == URACIL || currNucleotideNode.type == HYDROXYGUANIN) isCorrupt = true;
                if(i==length && !isCorrupt) currNucleotideNode.type = URACIL;
                elements.Add(currNode);
                elements.Add(currNucleotideNode);
                elements.Add(new Element(getEdgeName(), BINDING, currNode, currNucleotideNode));
                if (prevNode != null) elements.Add(new Element(getEdgeName(), PHOSPHATE_GROUP, prevNode, currNode));
                prevNode = currNode;
                prevNucleotideNode = currNucleotideNode;
            }

            return currNode;
        }
示例#5
0
        private static Element GenerateTATABox(List<Element> elements, Element prevNode)
        {
            Element[] n = new Element[6*2];

            // TATAAA
            n[0] = new Element(getNodeName(), DESOXYRIBOSE);
            n[0 + 1] = new Element(getNodeName(), THYMIN);
            n[2] = new Element(getNodeName(), DESOXYRIBOSE);
            n[2 + 1] = new Element(getNodeName(), ADENIN);
            n[4] = new Element(getNodeName(), DESOXYRIBOSE);
            n[4 + 1] = new Element(getNodeName(), THYMIN);
            n[6] = new Element(getNodeName(), DESOXYRIBOSE);
            n[6 + 1] = new Element(getNodeName(), ADENIN);
            n[8] = new Element(getNodeName(), DESOXYRIBOSE);
            n[8 + 1] = new Element(getNodeName(), ADENIN);
            n[10] = new Element(getNodeName(), DESOXYRIBOSE);
            n[10 + 1] = new Element(getNodeName(), ADENIN);

            for (int i = 0; i < 6*2; ++i)
            {
                elements.Add(n[i]);
            }

            Element currNode = null;
            Element nucleotideNode = null;
            for (int i = 0; i < 6*2; i+=2)
            {
                currNode = n[i];
                nucleotideNode = n[i+1];
                elements.Add(new Element(getEdgeName(), BINDING, currNode, nucleotideNode));
                if (prevNode != null) elements.Add(new Element(getEdgeName(), PHOSPHATE_GROUP, prevNode, currNode));
                prevNode = currNode;
            }

            return currNode;
        }