示例#1
0
        //
        public void Start()
        {
            Debug.Log("DNAPanelController.Start()");

            DNA_Model = DNAModel.Instance;              //get the DNA Model.
            key       = DNA_Model.niceName["Rattus norvegicus"];
            seqLength = DNA_Model.data[key][1].Length;
            textureY  = seqLength / textureX;
            numRows   = 24;

            Debug.Log("numRows: " + numRows + " seqLength: " + seqLength + " textureX: " + textureX);
            //Load UIs
            DNAUI = GameObject.Find("CursorRenderers/Look/DNA_Letter_UI");
            DNAUI.SetActive(false);
            RightIndexUI = GameObject.Find("CursorRenderers/RightIndex/DNA_Letter_UI");
            RightIndexUI.SetActive(false);
            RightIndexSelection = GameObject.Find("CursorRenderers/RightIndex/HoverOpaqueCursorArcRenderer-Default");


            // DNA_Model.readFile(Application.dataPath + "/StreamingAssets/Gria2Data/1L2Y_nuc.fasta");

            //figure out where the user is looking and pointing.
            HoverLookCursor          = Look.GetComponent <HoverCursorFollower>();
            HoverRightIndexTransform = RightIndex.transform;

            //subscribe updateUV method to UVCoordChangedEvent.
            UVCoordChangedEvent += updateRightIndexUV;
            // UVCoordChangedEvent += updateLookUV;
            NiceNameChangedEvent += updateNiceNameKey;
            Debug.Log("added UVCoordChangedEvent events");
        }
示例#2
0
        //public getXPeptide() { ...@todo } not really sure what this method is planned to be.

        //niceName: rattus, mus musculus, etc.
        //int pos: the position we are interested in
        //Nuc n : whether it's A|T|C|G
        //Seq type: DNA or RNA. shouldn't be AA.
        //returns the residue number of the 3d protein to which the Nuc n int pos refers.

        //everything is aligned with respect to Rattus nrovegicus
        //what kind of output are we trying to get?
        // position => % consensus as float, List<string> agree, List<string> disagree
        // consensus class.
        // public Consensus align(List<string> niceName, Seq type) {

        // }

        // //DNA, at certain position ==> RNA or AA at another position.
        // public Consensus crossAlign(string niceName, Seq inSeqType, Seq outSeqType) {

        // }


        private DNAModel registerDNAModel()
        {
            if (dna == null)               //guarantees instance is only set once.
            {
                dna = DNAModel.Instance;
            }
            // niceNameDNA = dna.niceName;
            Debug.Log("SeqModel: registered DNA.");
            return(dna);
        }