Showing 156 of 1,095 total issues
Function ready
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ready: function() {
var _self = this;
var _attrId = _self.attributes.attr_id;
var _cluster = _self.ndx.dimension(function(d) {
if (typeof d[_attrId] === 'undefined') {
Function drawMarker
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawMarker(_slice) {
var _path = $(_slice).find('path');
var _pointsInfo = _path
.attr('d')
.split(/[\s,MLHVCSQTAZ]/);
Consider simplifying this complex logical expression. Open
Open
if (_.isObject(configs_)) {
fetch_promise.resolve(configs_);
} else {
$.getJSON(window.cbioResourceURL + 'configs.json?' + window.appVersion)
.then(function(data) {
Function initTsvDownloadData
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initTsvDownloadData() {
var data = [];
var _cases = _.sortBy(chartInst_.dimension().top(Infinity), function(item) {
return isNaN(item[data_.attrId]) ? Infinity : -item[data_.attrId];
});
Function getCaseLists
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function(self, fetch_promise) {
var _responseStudyCaseList = {};
var _sampleLists = [];
_.each(self.getCancerStudyIds(), function(studyId) {
Function openCases
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
openCases: function() {
var _selectedCasesMap = {};
var _patientData = data_.groups.patient.data;
$.each(vm_.selectedpatientUIDs, function(key, patientUID) {
var _caseDataObj = _patientData[patientUID];
Function show
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show: function() {
var tooltip = $('.iviz-virtual-study-btn-qtip .qtip-content');
var showThis = this;
self_.updateSavingMessage(tooltip, 'Loading');
self_.updateStats = true;
Function getMutationCount
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function(self, fetch_promise) {
var fetch_promises = [];
var _ajaxMutationCountData = {};
$.when(self.getGeneticProfiles()).then(function(_profiles) {
var _mutationProfiles = _.filter(_profiles, function(_profile) {
Function getDataWithAttrs
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 = [];
Function update-filters
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'update-filters': function(redrawGroup) {
if (!this.clearGroup) {
if (redrawGroup) {
dc.redrawAll(this.id);
}
Function generateVSDescription_
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 +
Function getClinicalAttributesByStudy
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Function initTsvDownloadData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initTsvDownloadData() {
var attrs =
iViz.util.tableView.getAttributes(type_).filter(function(attr) {
return attr.attr_id !== 'uniqueId' && (_.isBoolean(attr.show) ? attr.show : true);
});
Function ready
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ready: function() {
var _self = this;
var attrId =
this.attributes.group_type === 'patient' ? 'patient_uid' : 'sample_uid';
this.invisibleDimension = this.ndx.dimension(function(d) {
Function getCnaFractionData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function(self, fetch_promise) {
var _ajaxCnaFractionData = {};
var cancer_study_ids = self.getCancerStudyIds();
var _studyCasesMap = self.getStudyCasesMap();
var fetch_promises = [];
Function data
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function() {
return {
chartDivId:
iViz.util.getDefaultDomId('chartDivId', this.attributes.attr_id),
resetBtnId:
Function ready
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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'},
Function submitClick
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
submitClick: function(_selectedRowData) {
var selectedSamplesUnion = [];
var selectedRowsUids = _.pluck(_selectedRowData, 'uniqueid');
this.madeSelection = true;
Function updateGrid
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateGrid: function(ChartsIds) {
var self_ = this;
if (this.grid_ === '') {
self_.grid_ = new Packery(document.querySelector('.grid'), {
itemSelector: '.grid-item',
Function ready
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ready: function() {
var _self = this;
_self.showLoad = true;
// make scatterplot can be closed even if ajax fails