Showing 82 of 230 total issues
Function controller
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function(Experiment, Sample, $log) {
var ctrl = this;
ctrl.$onInit = function() {
ctrl.experiment = {
Function build_search_kwargs
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_search_kwargs(self,
Function controller
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($log, Heatmap, HeatmapSpec, Sample) {
var ctrl = this;
// objects needed for Vega
ctrl.heatmapSpec = HeatmapSpec;
Function calculateEnrichments
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var calculateEnrichments = function(geneGenesets, allGenesetInfo,
totalGeneNum, cutoff) {
var N = totalGeneNum;
// This will be the number of genes from the high weight gene list
Function controller
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function(Sample, Experiment, $log) {
var ctrl = this;
ctrl.makeHref = Experiment.makeHref;
ctrl.$onInit = function() {
Function EnrichedSignatureController
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
function EnrichedSignatureController($stateParams, Signature, Participation,
Gene, MlModelTracker, MathFuncts, pValueCutoff, pValueDigits, $scope, $q,
$log, errGen) {
var self = this;
self.isValidModel = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AnalysisCtrl
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AnalysisCtrl($scope, $log, $q, $state, $stateParams,
SampleBin, Sample) {
$scope.isValidModel = false;
// Do nothing if mlmodel in URL is falsey. The error will be taken
// care of by "<ml-model-validator>" component.
Function calculateEnrichments
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var calculateEnrichments = function(typeName, genesBySignatures) {
var m = genesInUrl.length,
N = self.geneNum,
pValueArray = [],
matchedGenesBySignature = [],
Function controller
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($scope, $state, Gene, SelectedGenesFactory, CommonGeneFuncts) {
var numResultsToReturn = 10;
$scope.errors = null;
$scope.autocompleteQuery = '';
$scope.selectedGenes = SelectedGenesFactory.returnGenes();
Function link
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope) {
$scope.queryStatus = 'Connecting to the server ...';
$scope.topMode = true;
$scope.topNum = 3;
Function controller
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($log, Genesets, Gene, errGen) {
var self = this;
self.search = {};
Function SearchCtrl
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SearchCtrl($scope, $log, $location, Search) {
$scope.results = [];
$scope.search = {
query: {
text: '',
Function get_annotations
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_annotations(request=None, **kwargs):
"""
Return a tab-delimited file containing all samples for every Experiment
with Sample properties for each and all annotations (by default) or, if
`annotation_types` is specified, return only those annotation types for
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function controller
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($scope, SelectedGenesFactory) {
$scope.currentPage = 1;
$scope.itemsPerPage = 10;
$scope.totalResults = 0;
$scope.maxSize = 10;
Function mapSignaturesToSignatureInfo
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var mapSignaturesToSignatureInfo = function() {
// (2a) next, we build an array (replacing `volcanoData.source`)
// comprised of `signatureObject`s by walking through the
// `firstSampleSignatures` and constructing a `signatureObject` for
// each. [outer .map()]
Function handleExperimentResponse
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var handleExperimentResponse = function(response) {
// enhanceExpData: a function that enhances the given experiment.
// The enhancements include:
// (1) Convert entries in sample_set from sample URI to sample ID,
// and delete samples that are not related to current signature;
Function searchGenesets
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.searchGenesets = function() {
self.searchStatus = 'Searching for gene sets...';
var qparams = {
'query': self.search.query,
'organism__scientific_name': self.organism,
Function VolcanoPlotViewCtrl
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function VolcanoPlotViewCtrl(SampleBin, $stateParams) {
var ctrl = this;
ctrl.isValidModel = false;
// Do nothing if mlmodel in URL is falsey. The error will be taken
// care of by "<ml-model-validator>" component.
Function setSpec
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.setSpec = function(activities) {
var activityArr = [];
var samples = Object.keys(activities);
samples.forEach(function(sampleID, index) {
activityArr.push({
Function showEdgeTip
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showEdgeTip(data) {
geneTip.hide(); // Hide gene-tip window (if any) first.
var weightPrecision = 3;
var htmlText = 'Edge weight: ';
htmlText += data.weight.toFixed(weightPrecision);