cBioPortal/iViz

View on GitHub

Showing 156 of 1,095 total issues

Function ready has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ready: function() {
      var _self = this;
      var _attrId = _self.attributes.attr_id;
      var _cluster = _self.ndx.dimension(function(d) {
        if (typeof d[_attrId] === 'undefined') {
Severity: Minor
Found in app/scripts/views/components/pieChart/pieChartTemplate.js - About 1 hr to fix

    Function drawMarker has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function drawMarker(_slice) {
          var _path = $(_slice).find('path');
          var _pointsInfo = _path
            .attr('d')
            .split(/[\s,MLHVCSQTAZ]/);
    Severity: Minor
    Found in app/scripts/views/components/pieChart/pieChart.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                if (_.isObject(configs_)) {
                  fetch_promise.resolve(configs_);
                } else {
                  $.getJSON(window.cbioResourceURL + 'configs.json?' + window.appVersion)
                    .then(function(data) {
      Severity: Critical
      Found in app/scripts/model/dataProxy.js - About 1 hr to fix

        Function initTsvDownloadData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function initTsvDownloadData() {
              var data = [];
              var _cases = _.sortBy(chartInst_.dimension().top(Infinity), function(item) {
                return isNaN(item[data_.attrId]) ? Infinity : -item[data_.attrId];
              });
        Severity: Minor
        Found in app/scripts/views/components/barChart/barChart.js - About 1 hr to fix

          Function getCaseLists has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function(self, fetch_promise) {
                    var _responseStudyCaseList = {};
                    var _sampleLists = [];
          
                    _.each(self.getCancerStudyIds(), function(studyId) {
          Severity: Minor
          Found in app/scripts/model/dataProxy.js - About 1 hr to fix

            Function openCases has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                openCases: function() {
                  var _selectedCasesMap = {};
                  var _patientData = data_.groups.patient.data;
                  $.each(vm_.selectedpatientUIDs, function(key, patientUID) {
                    var _caseDataObj = _patientData[patientUID];
            Severity: Minor
            Found in app/scripts/main.js - About 1 hr to fix

              Function show has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          show: function() {
                            var tooltip = $('.iviz-virtual-study-btn-qtip .qtip-content');
                            var showThis = this;
                            self_.updateSavingMessage(tooltip, 'Loading');
                            self_.updateStats = true;
              Severity: Minor
              Found in app/scripts/views/components/virtualStudy/virtualStudy.js - About 1 hr to fix

                Function getMutationCount has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function(self, fetch_promise) {
                          var fetch_promises = [];
                          var _ajaxMutationCountData = {};
                          $.when(self.getGeneticProfiles()).then(function(_profiles) {
                            var _mutationProfiles = _.filter(_profiles, function(_profile) {
                Severity: Minor
                Found in app/scripts/model/dataProxy.js - About 1 hr to fix

                  Function getDataWithAttrs has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      getDataWithAttrs: function(type, attrIds) {
                        var def = new $.Deferred();
                        var isPatientAttributes = (type === 'patient');
                        var hasAttrDataMap = isPatientAttributes ? data_.groups.patient.has_attr_data : data_.groups.sample.has_attr_data;
                        var attrDataToGet = [];
                  Severity: Minor
                  Found in app/scripts/main.js - About 1 hr to fix

                    Function update-filters has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          'update-filters': function(redrawGroup) {
                            if (!this.clearGroup) {
                              if (redrawGroup) {
                                dc.redrawAll(this.id);
                              }
                    Severity: Minor
                    Found in app/scripts/views/chartGroupTemplate.js - About 1 hr to fix

                      Function generateVSDescription_ has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var generateVSDescription_ = function(_studies, _filters) {
                            var _desp = '';
                            if (_studies.studies.length > 0) {
                              _desp = _studies.count + (_studies.count > 1 ? ' samples ' : ' sample ')
                                + 'from ' + _studies.studies.length +
                      Severity: Minor
                      Found in app/scripts/session/sessionUtil.js - About 1 hr to fix

                        Function getClinicalAttributesByStudy has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function(self, fetch_promise) {
                                  $.get(window.cbioURL + 'api/clinical-attributes?projection=SUMMARY&pageSize=100000&pageNumber=0&direction=ASC')
                                    .done(function(data) {
                                      var attributes = {};
                                      _.each(data, function(attribute) {
                        Severity: Minor
                        Found in app/scripts/model/dataProxy.js - About 1 hr to fix

                          Function initTsvDownloadData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function initTsvDownloadData() {
                                var attrs =
                                  iViz.util.tableView.getAttributes(type_).filter(function(attr) {
                                    return attr.attr_id !== 'uniqueId' && (_.isBoolean(attr.show) ? attr.show : true);
                                  });
                          Severity: Minor
                          Found in app/scripts/views/components/dataTable/tableView.js - About 1 hr to fix

                            Function ready has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                ready: function() {
                                  var _self = this;
                                  var attrId =
                                    this.attributes.group_type === 'patient' ? 'patient_uid' : 'sample_uid';
                                  this.invisibleDimension = this.ndx.dimension(function(d) {
                            Severity: Minor
                            Found in app/scripts/views/components/survivalChart/template.js - About 1 hr to fix

                              Function getCnaFractionData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function(self, fetch_promise) {
                                        var _ajaxCnaFractionData = {};
                                        var cancer_study_ids = self.getCancerStudyIds();
                                        var _studyCasesMap = self.getStudyCasesMap();
                                        var fetch_promises = [];
                              Severity: Minor
                              Found in app/scripts/model/dataProxy.js - About 1 hr to fix

                                Function data has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    data: function() {
                                      return {
                                        chartDivId:
                                          iViz.util.getDefaultDomId('chartDivId', this.attributes.attr_id),
                                        resetBtnId:
                                Severity: Minor
                                Found in app/scripts/views/components/dataTable/tableViewTemplate.js - About 1 hr to fix

                                  Function ready has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                            }, ready: function() {
                                              $('#iviz-header-left-patient-select').qtip({
                                                content: {text: 'View the selected patients.'},
                                                style: {classes: 'qtip-light qtip-rounded qtip-shadow'},
                                                show: {event: 'mouseover'},
                                  Severity: Minor
                                  Found in app/scripts/vueCore.js - About 1 hr to fix

                                    Function submitClick has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          submitClick: function(_selectedRowData) {
                                            var selectedSamplesUnion = [];
                                            var selectedRowsUids = _.pluck(_selectedRowData, 'uniqueid');
                                    
                                            this.madeSelection = true;
                                    Severity: Minor
                                    Found in app/scripts/views/components/dataTable/tableViewTemplate.js - About 1 hr to fix

                                      Function updateGrid has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            updateGrid: function(ChartsIds) {
                                              var self_ = this;
                                              if (this.grid_ === '') {
                                                self_.grid_ = new Packery(document.querySelector('.grid'), {
                                                  itemSelector: '.grid-item',
                                      Severity: Minor
                                      Found in app/scripts/views/mainTemplate.js - About 1 hr to fix

                                        Function ready has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            ready: function() {
                                              var _self = this;
                                              _self.showLoad = true;
                                        
                                              // make scatterplot can be closed even if ajax fails
                                        Severity: Minor
                                        Found in app/scripts/views/components/scatterPlot/scatterPlotTemplate.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language