Commit 96255173 authored by Aflitos, Saulo Alves's avatar Aflitos, Saulo Alves
Browse files

fix bug not resetting gene names on database change

parent fe3df23c
......@@ -592,6 +592,7 @@ def get_tree(db_name, chrom, gene):
abort(404)
if gene not in genes:
print 'gene',gene, 'not in genes'#,genes
abort(404)
tree = get_tree_raw(man, chrom, gene)
......@@ -633,7 +634,7 @@ def get_aln(db_name, chrom, gene):
abort(404)
if gene not in genes:
print "gene not in genes"
print "gene",gene,"not in genes"#,genes
abort(404)
aln = get_aln_raw(man, chrom, gene)
......@@ -663,7 +664,7 @@ def get_matrix(db_name, chrom, gene):
abort(404)
if gene not in genes:
print "gene",gene,"not in genes"
print "gene",gene,"not in genes"#,genes
abort(404)
matrix = get_matrix_raw(man, chrom, gene)
......@@ -697,7 +698,7 @@ def get_report(db_name, chrom, gene):
abort(404)
if gene not in genes:
print "gene",gene,"not in genes"
print "gene",gene,"not in genes"#,genes
abort(404)
#print "getting report", db_name, chrom, gene
......
......@@ -458,12 +458,14 @@ var mainController = function ( $scope, $http, mySharedService ) {
console.log('cluster keys', Object.keys($scope.cluster));
for ( var c in $scope.cluster ) {
console.log('adding cluster', c);
$scope.clusterNames.push( c );
$scope.vars.order.rows[ c ] = $scope.cluster[ c ].rows.rowsOrder;
$scope.vars.order.cols[ c ] = $scope.cluster[ c ].cols.colsOrder;
}
console.log($scope.vars.order.cols);
if ( $scope.clusterNames.indexOf( $scope.vars.nextRowOrder) < 0 ) {
......@@ -599,6 +601,11 @@ var mainController = function ( $scope, $http, mySharedService ) {
// FUNCTIONS
//
$scope.cleanVars = function () {
$scope.zeroeVars();
$scope.startup();
};
$scope.zeroeVars = function () {
$scope.databaseQry = null;
$scope.specieQry = null;
$scope.chromosomeQry = null;
......@@ -631,13 +638,17 @@ var mainController = function ( $scope, $http, mySharedService ) {
$scope.clusterlistchrom = null;
$scope.clusterNames = null;
$scope.genes = null;
$scope.startup();
};
$scope.updateFields = function () {
console.log('database changed %o', $scope.database);
if ($scope.databaseQry) {
$scope.specieQry = null;
$scope.chromosomeQry = null;
$scope.geneQry = null;
$scope.groupByQry = null;
$scope.groupByValQry = null;
$scope.getMtime();
$scope.getSpecies();
$scope.getChromosomes();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment