1/* 2 * Copyright (c) 2016 Memorial Sloan-Kettering Cancer Center. 3 * 4 * This library is distributed in the hope that it will be useful, but WITHOUT 5 * ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS 6 * FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder 7 * is on an "as is" basis, and Memorial Sloan-Kettering Cancer Center has no 8 * obligations to provide maintenance, support, updates, enhancements or 9 * modifications. In no event shall Memorial Sloan-Kettering Cancer Center be 10 * liable to any party for direct, indirect, special, incidental or 11 * consequential damages, including lost profits, arising out of the use of this 12 * software and its documentation, even if Memorial Sloan-Kettering Cancer 13 * Center has been advised of the possibility of such damage. 14 */ 15 16/* 17 * This file is part of cBioPortal Cancer Hotspots. 18 * 19 * cBioPortal is free software: you can redistribute it and/or modify 20 * it under the terms of the GNU Affero General Public License as 21 * published by the Free Software Foundation, either version 3 of the 22 * License. 23 * 24 * This program is distributed in the hope that it will be useful, 25 * but WITHOUT ANY WARRANTY; without even the implied warranty of 26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 * GNU Affero General Public License for more details. 28 * 29 * You should have received a copy of the GNU Affero General Public License 30 * along with this program. If not, see <http://www.gnu.org/licenses/>. 31 */ 32 33/** 34 * Designed to retrieve hotspots data from server. 35 * 36 * @param options proxy options 37 * @author Selcuk Onur Sumer 38 */ 39function HotspotDataProxy(options) 40{ 41 var _defaultOpts = { 42 serviceUrl: "api/hotspots/single", 43 byGene: "byGene" 44 }; 45 46 // merge options with default options to use defaults for missing values 47 var _options = jQuery.extend(true, {}, _defaultOpts, options); 48 49 function getAllHotspots(callback) 50 { 51 // retrieve data from the server (use v3 data by default for the website) 52 $.ajax(ProxyUtils.ajaxOpts(_options.serviceUrl + "?version=v3", [], callback)); 53 } 54 55 function getHotspotsByGene(genes, callback) 56 { 57 var hugoSymbols = genes == null ? [] : [].concat(genes); 58 59 // retrieve data from the server (use v3 data by default for the website) 60 $.ajax(ProxyUtils.ajaxOpts(_options.serviceUrl + "/" + _options.byGene + "?version=v3", 61 hugoSymbols, 62 callback)); 63 } 64 65 this.getAllHotspots = getAllHotspots; 66 this.getHotspotsByGene = getHotspotsByGene; 67}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.