<commit_before>// This is for the moustache-like templates
// prevents collisions with JSP tags
$(document).ready(function() {
	_.templateSettings = {
		interpolate: /\{\{(.+?)\}\}/g
	};
	$('#oncoprint_controls').html(_.template($('#main-controls-template').html())());

	/*
	var geneDataColl = new GeneDataColl();

	geneDataColl.fetch({
		type: "POST",
		data: {
			cancer_study_id: cancer_study_id_selected,
			oql: $('#gene_list').val(),
			case_list: window.PortalGlobals.getCases(),
			geneticProfileIds: window.PortalGlobals.getGeneticProfiles(),
			z_score_threshold: window.PortalGlobals.getZscoreThreshold(),
			rppa_score_threshold: window.PortalGlobals.getRppaScoreThreshold()
		},
		success: function (response) {
	*/
       window.PortalDataManager.getGenomicEventData().then(function(response) {
			(function invokeDataManager() {
				/*var genes = {};
				_.each(response.models, function(d) {
					genes[d.attributes.gene] = true;
				});
				genes = Object.keys(genes);*/
				var genes = window.PortalDataManager.getQueryGenes();
				//window.PortalGlobals.setGeneData(geneDataColl.toJSON());// <- just replace argument
				window.PortalGlobals.setGeneData(response)
				//window.PortalDataColl.setOncoprintData(utils.process_data(response.toJSON(), genes));
				window.PortalDataColl.setOncoprintData(utils.process_data(response, genes));
				//PortalDataColl.setOncoprintStat(utils.alteration_info(geneDataColl.toJSON()));// <- just replace argument
				PortalDataColl.setOncoprintStat(utils.alteration_info(response));
			})();
			$('#outer_loader_img').hide();
			$('#oncoprint #everything').show();
			window.onc_obj = setUpOncoprint('oncoprint_body', {
				sample_to_patient: window.PortalGlobals.getPatientSampleIdMap(),
				//gene_data: response.toJSON(),
				gene_data: response,
				toolbar_selector: '#oncoprint-diagram-toolbar-buttons',
				toolbar_fade_hitzone_selector: '#oncoprint',
				sample_list: window.PortalGlobals.getCases().trim().split(/\s+/),
				cancer_study_id: cancer_study_id_selected,
				gene_order: window.PortalGlobals.getGeneListString().split(/\s+/),

				load_clinical_tracks: true,
				swap_patient_sample: true,
				sort_by: true,

				link_out_in_tooltips: true,
				percent_altered_indicator_selector: '#altered_value',
			});
		});
	//});
});<commit_msg>Use portal data manager for oncoprint<commit_after>// This is for the moustache-like templates
// prevents collisions with JSP tags
$(document).ready(function() {
	_.templateSettings = {
		interpolate: /\{\{(.+?)\}\}/g
	};
	$('#oncoprint_controls').html(_.template($('#main-controls-template').html())());

	
	window.PortalDataManager.getGenomicEventData().then(function(response) {
			(function invokeOldDataManagers() {
				var genes = window.PortalDataManager.getQueryGenes();
				window.PortalGlobals.setGeneData(response)
				window.PortalDataColl.setOncoprintData(utils.process_data(response, genes));
				PortalDataColl.setOncoprintStat(utils.alteration_info(response));
			})();
			$('#outer_loader_img').hide();
			$('#oncoprint #everything').show();
			window.onc_obj = setUpOncoprint('oncoprint_body', {
				sample_to_patient: window.PortalGlobals.getPatientSampleIdMap(),
				gene_data: response,
				toolbar_selector: '#oncoprint-diagram-toolbar-buttons',
				toolbar_fade_hitzone_selector: '#oncoprint',
				sample_list: window.PortalGlobals.getCases().trim().split(/\s+/),
				cancer_study_id: cancer_study_id_selected,
				gene_order: window.PortalGlobals.getGeneListString().split(/\s+/),

				load_clinical_tracks: true,
				swap_patient_sample: true,
				sort_by: true,

				link_out_in_tooltips: true,
				percent_altered_indicator_selector: '#altered_value',
			});
		});
});
{'fraction_non_alphanumeric': 0.15156418554476808, 'fraction_numerical': 0.0, 'mean_word_length': 5.03089430894309, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2269980', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1235, 'n_words': 160}