PageSourceSearch

https://www.cancerhotspots.org/src/js/render/FoundInRender.js

js cancerhotspots.org collected 2026-10-03 21:18:27 UTC 2,318 bytes, 66 lines download raw bytes

1
2/*
3 * Copyright (c) 2016 Memorial Sloan-Kettering Cancer Center.
4 *
5 * This library is distributed in the hope that it will be useful, but WITHOUT
6 * ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS
7 * FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder
8 * is on an "as is" basis, and Memorial Sloan-Kettering Cancer Center has no
9 * obligations to provide maintenance, support, updates, enhancements or
10 * modifications. In no event shall Memorial Sloan-Kettering Cancer Center be
11 * liable to any party for direct, indirect, special, incidental or
12 * consequential damages, including lost profits, arising out of the use of this
13 * software and its documentation, even if Memorial Sloan-Kettering Cancer
14 * Center has been advised of the possibility of such damage.
15 */
16
17/*
18 * This file is part of cBioPortal Cancer Hotspots.
19 *
20 * cBioPortal is free software: you can redistribute it and/or modify
21 * it under the terms of the GNU Affero General Public License as
22 * published by the Free Software Foundation, either version 3 of the
23 * License.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28 * GNU Affero General Public License for more details.
29 *
30 * You should have received a copy of the GNU Affero General Public License
31 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
32 */
33
34/**
35 * @author Ino de Bruijn
36 */
37
38function FoundInRender(options)
39{
40    var _defaultOpts = {
41        templateId: "found_in_column"
42    };
43
44    // merge options with default options to use defaults for missing values
45    var _options = jQuery.extend(true, {}, _defaultOpts, options);
46
47    function render (data, type, row, meta)
48    {
49        //var templateFn = _.template($("#" + _options.templateId).html());
50        //return templateFn(data);
51
52		let hotspotsv3_info = HOTSPOTS_V3.find((x) => x.Hugo_Symbol === row.hugoSymbol && x.Residue === row.residue)
53		if (hotspotsv3_info) {
54			return "Bandlamudi et al., 2026"
55		} else {
56			return "Chang et al. 2017"
57		}
58    }
59
60    function postRender(td, cellData, rowData, row, col)
61    {
62    }
63
64    this.render = render;
65    this.postRender = postRender;
66}

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.