<commit_before><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<link rel="stylesheet" href="lib/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="css/AliTV.css">

<script src="lib/d3.v3.min.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="lib/jquery-ui.min.js"></script>

<script src="js/AliTV.js"></script>

<script type="text/javascript">
	var wga;
	$(document).ready(function() {
		var svg = $('#wgaCanvas');
		wga = new AliTV(svg);
		$.getJSON('data/data.json', function(data) {
			wga.setData(data);
			$.getJSON('data/filters.json', function(filters) {
				wga.setFilters(filters);
				wga.drawLinear();
			});
		});
		
		//Set default values for API of graphical parameters
		$("#linearSpacer").val(wga.getLinearSpacer());
		$("#linearGenomeSpacer").val(wga.getLinearGenomeSpacer());
		$("#karyoHeight").val(wga.getKaryoHeight());
		$("#canvasWidth").val(wga.getCanvasWidth());
		$("#canvasHeight").val(wga.getCanvasHeight());
		$("#tickDistance").val(wga.getTickDistance());
		
		});
	$(function(){
		var identityRange;
		$("#identity-slider").slider({
			range: true,
			values: [75, 100],
			min: 0,
			max: 100,
			step: 5,
			slide: function(event, ui){
				identityRange = [ui.values[0], ui.values[1]];
		
				var layout = wga.getLayout();
				if(layout === "linear"){
					var filteredLinearLinks = wga.filterLinearLinksByIdentity(identityRange);
					wga.drawLinearLinks(filteredLinearLinks);
				} else {
					var filteredCircularLinks = wga.filterCircularLinksByIdentity(identityRange);
					wga.drawCircularLinks(filteredCircularLinks);
				}
			}
		});	
	});
	
	$(function() {
		$( "#accordion" ).accordion();
	});
	
	function changeLinearSpacer(){
		var spacer = $("#linearSpacer").val();
		try {
		wga.setLinearSpacer(spacer); 
		$("#linearSpacer").val(wga.getLinearSpacer());
		}
		catch(err){
			alert(err);
			$("#linearSpacer").val(wga.getLinearSpacer());
		}
	}
	function changeLinearGenomeSpacer(){
		var genomeSpacer = $("#linearGenomeSpacer").val(); 
		try {
		wga.setLinearGenomeSpacer(genomeSpacer); 	
		}
		catch(err){
			alert(err);
			$("#linearGenomeSpacer").val(wga.getLinearGenomeSpacer());
		}
	}
	function changeKaryoHeight(){
		var height = $("#karyoHeight").val(); 
		try {
		wga.setKaryoHeight(height); 	
		}
		catch(err){
			alert(err);
			$("#karyoHeight").val(wga.getKaryoHeight());
		}
	}
	function changeCanvasWidth(){
		var width = $("#canvasWidth").val(); 
		try {
		wga.setCanvasWidth(width); 	
		}
		catch(err){
			alert(err);
			$("#canvasWidth").val(wga.getCanvasWidth());
		}
	}
	function changeCanvasHeight(){
		var height = $("#canvasHeight").val(); 
		try {
		wga.setCanvasHeight(height); 
		}
		catch(err){
			alert(err);
			$("#canvasHeight").val(wga.getCanvasHeight());
		}
	}
	function changeTickDistance(){
		var distance = $("#tickDistance").val(); 
		try {
		wga.setTickDistance(distance); 	
		}
		catch(err){
			alert(err);
			$("#tickDistance").val(wga.getTickDistance());
		}
	}
	function setNewParameters(){
		changeLinearSpacer();
		changeLinearGenomeSpacer();
		changeKaryoHeight();
		changeCanvasWidth();
		changeCanvasHeight()
		changeTickDistance();
		
		var layout = wga.getLayout();
		wga.drawEqualLayout(layout);
	}
</script>
</head>
<body>

<div style="width: 100%; overflow: hidden;">
	<div id="accordion" class="form-style-5" style="float:left">
		<h3><span class="number">1</span> Choose your layout</h3>
		<div>
			<button type="submit" onclick="wga.drawCircular();">Draw Circular</button> 
			<button type="submit" onclick="wga.drawLinear();">Draw Linear</button> 
		</div>
		<h3><span class="number">2</span> Change graphical parameters</h3>
		<div>
			<form>
				<fieldset>
					Spacer between chromsomes:<br>
					<input type="text" id="linearSpacer" placeholder="Enter a spacer">
					<br>
					Spacer between genomes in the linear Layout:<br>
					<input type="text" id="linearGenomeSpacer" placeholder="Enter a spacer">
					<br>
					Height of chromosomes:<br>
					<input type="text" id="karyoHeight" placeholder="Enter a height">
					<br>
					Width:<br>
					<input type="text" id="canvasWidth" placeholder="Enter the svg-width">
					<br>
					Height:<br>
					<input type="text" id="canvasHeight" placeholder="Enter the svg-height">
					<br>
					Distance between ticks:<br>
					<input type="text" id="tickDistance" placeholder="Enter the distance between ticks">
					<br>
				</fieldset>
			</form>
		</div>
		<h3><span class="number">3</span> Filtering</h3>
		<div>
			<form>
				<fieldset>
					Filter link identity:<br>		
					<div id="identity-slider"></div>
				</fieldset>
			</form> 
		</div>
		<h3><span class="number">4</span> Set changes</h3>
		<div>
			<button type="submit" onclick="setNewParameters()">Apply</button>		
		</div>
	</div>
	<svg id='wgaCanvas' style="margin:50px"></svg>
</div>

</body>
</html>



<commit_msg>Slide button in the HTML file<commit_after><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<link rel="stylesheet" href="lib/jquery-ui-1.9.2.custom.min.css">
<link rel="stylesheet" href="css/AliTV.css">

<script src="lib/d3.v3.min.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="lib/jquery-ui.min.js"></script>

<script src="js/AliTV.js"></script>

<script type="text/javascript">
	var wga;
	$(document).ready(function() {
		var svg = $('#wgaCanvas');
		wga = new AliTV(svg);
		$.getJSON('data/data.json', function(data) {
			wga.setData(data);
			$.getJSON('data/filters.json', function(filters) {
				wga.setFilters(filters);
				wga.drawLinear();
			});
		});
		
		//Set default values for API of graphical parameters
		$("#linearSpacer").val(wga.getLinearSpacer());
		$("#linearGenomeSpacer").val(wga.getLinearGenomeSpacer());
		$("#karyoHeight").val(wga.getKaryoHeight());
		$("#canvasWidth").val(wga.getCanvasWidth());
		$("#canvasHeight").val(wga.getCanvasHeight());
		$("#tickDistance").val(wga.getTickDistance());
		
		});
	$(function(){
		var identityRange;
		$("#identity-slider").slider({
			range: true,
			values: [75, 100],
			min: 0,
			max: 100,
			step: 5,
			slide: function(event, ui){
				identityRange = [ui.values[0], ui.values[1]];
		
				var layout = wga.getLayout();
				if(layout === "linear"){
					var filteredLinearLinks = wga.filterLinearLinksByIdentity(identityRange);
					wga.drawLinearLinks(filteredLinearLinks);
				} else {
					var filteredCircularLinks = wga.filterCircularLinksByIdentity(identityRange);
					wga.drawCircularLinks(filteredCircularLinks);
				}
			}
		});	
	});
	
	$(function() {
		$( "#accordion" ).accordion();
	});
	
	function changeLinearSpacer(){
		var spacer = $("#linearSpacer").val();
		try {
		wga.setLinearSpacer(spacer); 
		$("#linearSpacer").val(wga.getLinearSpacer());
		}
		catch(err){
			alert(err);
			$("#linearSpacer").val(wga.getLinearSpacer());
		}
	}
	function changeLinearGenomeSpacer(){
		var genomeSpacer = $("#linearGenomeSpacer").val(); 
		try {
		wga.setLinearGenomeSpacer(genomeSpacer); 	
		}
		catch(err){
			alert(err);
			$("#linearGenomeSpacer").val(wga.getLinearGenomeSpacer());
		}
	}
	function changeKaryoHeight(){
		var height = $("#karyoHeight").val(); 
		try {
		wga.setKaryoHeight(height); 	
		}
		catch(err){
			alert(err);
			$("#karyoHeight").val(wga.getKaryoHeight());
		}
	}
	function changeCanvasWidth(){
		var width = $("#canvasWidth").val(); 
		try {
		wga.setCanvasWidth(width); 	
		}
		catch(err){
			alert(err);
			$("#canvasWidth").val(wga.getCanvasWidth());
		}
	}
	function changeCanvasHeight(){
		var height = $("#canvasHeight").val(); 
		try {
		wga.setCanvasHeight(height); 
		}
		catch(err){
			alert(err);
			$("#canvasHeight").val(wga.getCanvasHeight());
		}
	}
	function changeTickDistance(){
		var distance = $("#tickDistance").val(); 
		try {
		wga.setTickDistance(distance); 	
		}
		catch(err){
			alert(err);
			$("#tickDistance").val(wga.getTickDistance());
		}
	}
	function setNewParameters(){
		changeLinearSpacer();
		changeLinearGenomeSpacer();
		changeKaryoHeight();
		changeCanvasWidth();
		changeCanvasHeight()
		changeTickDistance();
		
		var layout = wga.getLayout();
		wga.drawEqualLayout(layout);
	}
</script>
</head>
<body>

<div style="width: 100%; overflow: hidden;">
	<div id="accordion" class="form-style-5" style="float:left">
		<h3><span class="number">1</span> Choose your layout</h3>
		<div>
			<button type="submit" onclick="wga.drawCircular();">Draw Circular</button> 
			<button type="submit" onclick="wga.drawLinear();">Draw Linear</button> 
		</div>
		<h3><span class="number">2</span> Change graphical parameters</h3>
		<div>
			<form>
				<fieldset>
					Spacer between chromsomes:<br>
					<input type="text" id="linearSpacer" placeholder="Enter a spacer">
					<br>
					Spacer between genomes in the linear Layout:<br>
					<input type="text" id="linearGenomeSpacer" placeholder="Enter a spacer">
					<br>
					Height of chromosomes:<br>
					<input type="text" id="karyoHeight" placeholder="Enter a height">
					<br>
					Width:<br>
					<input type="text" id="canvasWidth" placeholder="Enter the svg-width">
					<br>
					Height:<br>
					<input type="text" id="canvasHeight" placeholder="Enter the svg-height">
					<br>
					Distance between ticks:<br>
					<input type="text" id="tickDistance" placeholder="Enter the distance between ticks">
					<br>
				</fieldset>
			</form>
			<button type="submit" onclick="setNewParameters()">Apply</button>		
		</div>
		<h3><span class="number">3</span> Filtering</h3>
		<div>
			<form>
				<fieldset>
					Filter link identity:<br>		
					<div id="identity-slider"></div>
				</fieldset>
			</form> 
		</div>
	</div>
	<svg id='wgaCanvas' style="margin:50px"></svg>
</div>

</body>
</html>




{'fraction_non_alphanumeric': 0.19035897435897436, 'fraction_numerical': 0.007076923076923077, 'mean_word_length': 4.2005333333333335, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, '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': '2428979', 'n_tokens_mistral': 4015, 'n_tokens_neox': 3390, 'n_words': 585}