Commit 13b81f5b authored by Mahdi Mahmoudy's avatar Mahdi Mahmoudy
Browse files

some attempts and WiP

parent dbdc091b
......@@ -188,8 +188,9 @@ app.controller('AnnotationListCtrl', function($rootScope, $scope, $http, $routeP
// idMatches[2] = mapping key (item from second semi-colon to end or next semi-colon, exludes isoforms)
// idMatches[3] = simple id (item from second semi-colon to the end, including other semi-colons)
var idMatches = annotation.geneProductId
.match(/(\w+):?(\w+)?(?:-\d+)?:?(.*)?/i);
.match(/([^:][a-z0-9-]+):?(.+[^:-])?(?:-\d+)?:?(.*)?/i);
// .match(/(\w+):?(\w+)?(?:-\d+)?:?(.*)?/i);
// console.log("matches:", annotation.geneProductId, idMatches);
if (idMatches[2]) {
annotation.geneProductSimpleId = (idMatches[3])
? idMatches[2] + ':' +idMatches[3]
......
......@@ -31,6 +31,7 @@ validationModule.factory('validationService', function() {
validationService.validateComplexes = function(id) {
var matches = id.match(/^(ComplexPortal:)?(CPX-[0-9]+)$/i);
console.log("cpx match:", matches);
return matches ? 'ComplexPortal:' + matches[2] : null;
};
......
......@@ -272,14 +272,18 @@ wsService.factory('geneProductService', [
function ($http, ENV) {
return {
getGeneProducts: function (ids) {
console.log("gene ids:", ids);
if (typeof ids === Array) {
return $http.get(ENV.apiEndpoint + '/geneproduct/' + ids.join(','));
// return $http.get('//wp-p1m-c9.ebi.ac.uk:8081/QuickGO/services/geneproduct/' + ids.join(','));
} else {
return $http.get(ENV.apiEndpoint + '/geneproduct/' + ids);
// return $http.get('//wp-p1m-c9.ebi.ac.uk:8081/QuickGO/services/geneproduct/' + ids);
}
},
getTargetSet: function (id) {
return $http.get(ENV.apiEndpoint + '/geneproduct/targetset/' + id);
// return $http.get('//wp-p1m-c9.ebi.ac.uk:8081/QuickGO/services/geneproduct/targetset/' + id);
}
};
}
......@@ -342,6 +346,7 @@ wsService.factory('searchService', [
},
findAnnotations: function (page, size, filters) {
return $http.get(ENV.apiEndpoint + '/annotation/search?page=' + page + '&limit=' + size + filters);
// return $http.get('//wp-p1m-c9.ebi.ac.uk:8080/QuickGO/services/annotation/search?page=' + page + '&limit=' + size + filters);
},
findAnnotationStatistics: function (filters) {
var url = ENV.apiEndpoint + '/annotation/stats';
......
Markdown is supported
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