
var RmodulesView = function () {}

RmodulesView.prototype.clear_high_dimensional_input = function (div) {
    //Clear the drag and drop div.
    var qc = Ext.get(div);

    for (var i = qc.dom.childNodes.length - 1; i >= 0; i--) {
        var child = qc.dom.childNodes[i];
        qc.dom.removeChild(child);
    }
    clearHighDimDataSelections(div);
    clearSummaryDisplay(div);
}

RmodulesView.prototype.register_drag_drop = function () {
    //Set up drag and drop for Dependent and Independent variables on the data association tab.
    //Get the Independent DIV
    var independentDiv = Ext.get("divIndependentVariable");

    dtgI = new Ext.dd.DropTarget(independentDiv, {ddGroup : 'makeQuery'});
    dtgI.notifyDrop =  dropOntoCategorySelection;
}


RmodulesView.prototype.get_parameters_for_mrna = function (jobType) {
    var _div_name = "divIndependentVariable";

    return {
        "job_type" : jobType,
        "data_type": window[_div_name + 'markerType'],
        "assayConstraints": {
        "patient_set": [GLOBAL.CurrentSubsetIDs[1], GLOBAL.CurrentSubsetIDs[2]],
            "ontology_term": readConceptVariables("divIndependentVariable"),
            "trial_name": null
    },
        "dataConstraints": {
        "search_keyword_ids": [window[_div_name + 'pathway']],
            "disjunctions": null
    },
        projections: ["default_real_projection"]
    }
}

RmodulesView.prototype.get_parameters_for_mirna = function (jobType) {
    var _div_name = "divIndependentVariable";

    return {
        "job_type" : jobType,
        "data_type": window[_div_name + 'markerType'],
        "assayConstraints": {
            "patient_set": [GLOBAL.CurrentSubsetIDs[1], GLOBAL.CurrentSubsetIDs[2]],
            "ontology_term": readConceptVariables("divIndependentVariable"),
            "trial_name": null
        },
        "dataConstraints": {
            "mirnas": [window[_div_name + 'pathwayName']],
            "disjunctions": null
        },
        projections: ["default_real_projection"]
    }
}


RmodulesView.prototype.get_parameters_for_rbm = function (jobType) {
    var _div_name = "divIndependentVariable";

    return {
        "job_type" : jobType,
        "data_type": window[_div_name + 'markerType'],
        "assayConstraints": {
            "patient_set": [GLOBAL.CurrentSubsetIDs[1], GLOBAL.CurrentSubsetIDs[2]],
            "ontology_term": readConceptVariables("divIndependentVariable"),
            "trial_name": null
        },
        "dataConstraints": {
            "disjunctions": null
        },
        projections: ["default_real_projection"]
    }
}

RmodulesView.prototype.get_analysis_constraints = function (jobType) {
    var _div_name = "divIndependentVariable";
    var data_type = window[_div_name + 'markerType'];

    if (data_type == 'Gene Expression') {
        return this.get_parameters_for_mrna(jobType);
    } else if (data_type == "QPCR MIRNA") {
        return this.get_parameters_for_mirna(jobType);
    } else if (data_type == "RBM") {
        return this.get_parameters_for_rbm(jobType);
    }
}
@@ -2595,32 +2595,618 @@
 tion%22%5D%0A    %7D%0A%7D%0A%0A
+RmodulesView.prototype.get_parameters_for_proteomics = function (jobType) %7B%0A    var _div_name = %22divIndependentVariable%22;%0A%0A    return %7B%0A        %22job_type%22 : jobType,%0A        %22data_type%22: window%5B_div_name + 'markerType'%5D,%0A        %22assayConstraints%22: %7B%0A            %22patient_set%22: %5BGLOBAL.CurrentSubsetIDs%5B1%5D, GLOBAL.CurrentSubsetIDs%5B2%5D%5D,%0A            %22ontology_term%22: readConceptVariables(%22divIndependentVariable%22),%0A            %22trial_name%22: null%0A        %7D,%0A        %22dataConstraints%22: %7B%0A            %22disjunctions%22: null%0A        %7D,%0A        projections: %5B%22default_real_projection%22%5D%0A    %7D%0A%7D%0A%0A
 RmodulesView.pro
@@ -3252,32 +3252,56 @@
 ion (jobType) %7B%0A
+    var _retVal = null;%0A
     var _div_nam
@@ -3389,18 +3389,22 @@
 %5D;%0A%0A    
-if
+switch
  (data_t
@@ -3406,19 +3406,32 @@
 ata_type
- ==
+) %7B%0A        case
  'Gene E
@@ -3440,20 +3440,22 @@
 ression'
-) %7B%0A
+:%0A    
         
@@ -3508,33 +3508,37 @@
     
-%7D else if (data_type == %22
+        break;%0A        case '
 QPCR
@@ -3543,29 +3543,31 @@
 CR MIRNA
-%22) %7B%0A
+':%0A    
         
 return t
@@ -3550,38 +3550,41 @@
 A':%0A            
+_
 ret
-urn
+Val =
  this.get_parame
@@ -3616,55 +3616,170 @@
     
-%7D else if (data_type == %22RBM%22) %7B%0A        return
+        break;%0A        case 'RBM':%0A            _retVal = this.get_parameters_for_rbm(jobType);%0A            break;%0A        case 'PROTEOMICS':%0A            _retVal =
  thi
@@ -3791,35 +3791,42 @@
 _parameters_for_
-rbm
+proteomics
 (jobType);%0A    %7D
@@ -3820,15 +3820,55 @@
 bType);%0A    
-%7D
+        break;%0A    %7D%0A%0A    return _retVal;
 %0A%7D

add method to generate params for proteomics data