<commit_before><!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <?php
			//your connection string here
			// $connectionString = "host= dbname= user= password=";
			include('../../uploadsConnectionString.php');
			$dbconn = pg_connect($connectionString)
					or die('Could not connect: ' . pg_last_error());
			$uid = $_GET["uid"];
			$query = "SELECT links, filename, layout, fasta, annot FROM upload WHERE rand = '" . $uid . "';";
			// echo $query;
			$result = pg_query($query) or die('Query failed: ' . pg_last_error());
			$line = pg_fetch_array($result, null, PGSQL_ASSOC);
			$clmsCsv = $line['links'];
			$filename = $line['filename'];
			$layout = $line['layout'];
			$fasta = $line['fasta'];
			$annot = $line['annot'];
			echo ('<title> xiNET | ' . $filename . '</title>');
        ?>
			<meta http-equiv="content-type" content="text/html; charset=utf-8" />
			<meta name="description" content="xiNET is a visualisation tool for cross-linking and mass spectrometry data." />
			<meta name="keywords" content="xiNET, biologists, mass-spectrometrists, cross-linking, protein, complexes, 3d, models, rappsilber, software" />	
			<meta name="viewport" content="initial-scale=1, maximum-scale=1">
			<meta name="apple-mobile-web-app-capable" content="yes">
			<meta name="apple-mobile-web-app-status-bar-style" content="black">
			<link rel="icon" type="image/ico" href="images/logos/favicon.ico">
			<link rel="stylesheet" href="../demo/css/reset.css" />
			<link rel="stylesheet" href="../demo/css/noscript.css" />
			<link rel="stylesheet" href="../demo/css/style.css" />
			<link rel="stylesheet" href="../demo/css/noNav.css" />
			<link rel="stylesheet" href="../demo/css/xiNET.css">
		<!--
		<script type="text/javascript" src="./xiNET_2.0.0.js"></script>
		-->
        <!--libraries-->
        <script type="text/javascript" src="../vendor/d3.js"></script>
        <script type="text/javascript" src="../vendor/colorbrewer.js"></script>
       	<script type="text/javascript" src="../vendor/FileSaver.js"></script>
        <script type="text/javascript" src="../vendor/rgbcolor.js"></script>   
        <!--xiNET-->
        <script type="text/javascript" src="../src/controller/Init.js"></script>
        <script type="text/javascript" src="../src/controller/MouseEvents.js"></script>
        <script type="text/javascript" src="../src/controller/Layout.js"></script>
        <script type="text/javascript" src="../src/controller/Refresh.js"></script>
        <script type="text/javascript" src="../src/controller/ToolTips.js"></script>
        <script type="text/javascript" src="../src/model/Match.js"></script>
        <script type="text/javascript" src="../src/model/Link.js"></script>
        <script type="text/javascript" src="../src/model/Protein.js"></script>
        <script type="text/javascript" src="../src/model/Annotation.js"></script>
        <script type="text/javascript" src="../src/model/ProteinLink.js"></script>
        <script type="text/javascript" src="../src/model/ResidueLink.js"></script>
        <script type="text/javascript" src="../src/controller/ExternalControls.js"></script>
        <script type="text/javascript" src="../src/controller/Rotator.js"></script>
        <script type="text/javascript" src="../src/controller/xiNET_Storage.js"></script>
        <script type="text/javascript" src="../src/controller/ReadCSV.js"></script>
        <script type="text/javascript" src="../src/controller/Fasta.js"></script>
    </head>
    <body>

	<!-- Slidey panels -->	
	<div class="overlay-box" id="infoPanel">
	<div id="networkCaption">
		<p>No selection.</p>
	</div>
	</div>

	<div class="overlay-box" id="helpPanel">
	<table class="overlay-table"  bordercolor="#eee" >
		<tr>
			<td>Toggle the proteins between a bar and a circle</td>
			<td>Click on protein</td>
		</tr>
		<tr>
			<td>Zoom</td>
			<td>Mouse wheel</td>
		</tr>
		<tr>
			<td>Pan</td>
			<td>Click and drag on background</td>
		</tr>
		<tr>
			<td>Move protein</td>
			<td>Click and drag on protein</td>
		</tr>
		<tr>
			<td>Expand bar <br>(increases bar length until sequence is visible)</td>
			<td>Shift_left-click on protein</td>
		</tr>
		<tr>
			<td>Rotate bar</td>
			<td>Click and drag on handles that appear at end of bar</td>
		</tr>
		<tr>
			<td>Hide/show protein (and all links to it)</td>
			<td>Right-click on protein</td>
		</tr>
		<tr>
			<td>Hide links between two specific proteins</td>
			<td>Right click on any link between those proteins</td>
		</tr>
		<tr>
			<td>Show all hidden links</td>
			<td>Right click on background</td>
		</tr>
		<tr>
			<td>'Flip' self-links</td>
			<td>Right-click on self-link</td>
		</tr>
	</table> 
</div>	

<div class="overlay-box" id="legendPanel">
	<div><img src="../demo/images/fig3_1.svg"></div>
</div>	


		<script type="text/javascript">
				//<![CDATA[
				helpShown = false;
				infoShown = false;
				legendShown = false;
				function toggleHelpPanel() {
					if (helpShown){
						hideHelpPanel();
					}
					else {
						showHelpPanel();
					}
				}
				
				function toggleInfoPanel() {
					if (infoShown){
						hideInfoPanel();
					}
					else {
						showInfoPanel();
					}
				}
				function toggleLegendPanel() {
					if (legendShown){
						hideLegendPanel();
					}
					else {
						showLegendPanel();
					}
				}
				
				function showHelpPanel() {
						helpShown = true;
						d3.select("#helpPanel").transition().style("height", "500px").style("top", "100px").duration(700);
				}
				function hideHelpPanel() {
						helpShown = false;
						d3.select("#helpPanel").transition().style("height", "0px").style("top", "-95px").duration(700);
				}
				function showInfoPanel() {
						infoShown = true;
						d3.select("#infoPanel").transition().style("height", "300px").style("bottom", "115px").duration(700);

				}
				function hideInfoPanel() {
						infoShown = false;
						d3.select("#infoPanel").transition().style("height", "0px").style("bottom", "-95px").duration(700);

				}
				function showLegendPanel() {
						legendShown = true;
						d3.select("#legendPanel").transition().style("height", "500px").style("top", "100px").duration(700);

				}
				function hideLegendPanel() {
						legendShown = false;
						d3.select("#legendPanel").transition().style("height", "0px").style("top", "-95px").duration(700);

				}
				//]]>
		</script>
		<!-- Main -->
		<div id="main">
			<div class="container">   	 				
				<h1 class="page-header">
					<button class="btn btn-1 btn-1a network-control resetzoom" onclick="saveLayout();">
							Save layout
					</button>
						
					<div style='float:right'>
						<button class="btn btn-1 btn-1a network-control resetzoom" onclick="xlv.reset();">
							Reset
						</button>
						<!--
						<button class="btn btn-1 btn-1a network-control" onclick="xlv.exportSVG('networkSVG');">Export SVG</button>
						-->
						<label class="btn">
								Legend
								<input id="selection" onclick="toggleLegendPanel()" type="checkbox">
						</label><commit_msg>accidentally removed Export SVG button from uploaded.php, reinstated it<commit_after><!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <?php
			//your connection string here
			// $connectionString = "host= dbname= user= password=";
			include('../../uploadsConnectionString.php');
			$dbconn = pg_connect($connectionString)
					or die('Could not connect: ' . pg_last_error());
			$uid = $_GET["uid"];
			$query = "SELECT links, filename, layout, fasta, annot FROM upload WHERE rand = '" . $uid . "';";
			// echo $query;
			$result = pg_query($query) or die('Query failed: ' . pg_last_error());
			$line = pg_fetch_array($result, null, PGSQL_ASSOC);
			$clmsCsv = $line['links'];
			$filename = $line['filename'];
			$layout = $line['layout'];
			$fasta = $line['fasta'];
			$annot = $line['annot'];
			echo ('<title> xiNET | ' . $filename . '</title>');
        ?>
			<meta http-equiv="content-type" content="text/html; charset=utf-8" />
			<meta name="description" content="xiNET is a visualisation tool for cross-linking and mass spectrometry data." />
			<meta name="keywords" content="xiNET, biologists, mass-spectrometrists, cross-linking, protein, complexes, 3d, models, rappsilber, software" />	
			<meta name="viewport" content="initial-scale=1, maximum-scale=1">
			<meta name="apple-mobile-web-app-capable" content="yes">
			<meta name="apple-mobile-web-app-status-bar-style" content="black">
			<link rel="icon" type="image/ico" href="images/logos/favicon.ico">
			<link rel="stylesheet" href="../demo/css/reset.css" />
			<link rel="stylesheet" href="../demo/css/noscript.css" />
			<link rel="stylesheet" href="../demo/css/style.css" />
			<link rel="stylesheet" href="../demo/css/noNav.css" />
			<link rel="stylesheet" href="../demo/css/xiNET.css">
		<!--
		<script type="text/javascript" src="./xiNET_2.0.0.js"></script>
		-->
        <!--libraries-->
        <script type="text/javascript" src="../vendor/d3.js"></script>
        <script type="text/javascript" src="../vendor/colorbrewer.js"></script>
       	<script type="text/javascript" src="../vendor/FileSaver.js"></script>
        <script type="text/javascript" src="../vendor/rgbcolor.js"></script>   
        <!--xiNET-->
        <script type="text/javascript" src="../src/controller/Init.js"></script>
        <script type="text/javascript" src="../src/controller/MouseEvents.js"></script>
        <script type="text/javascript" src="../src/controller/Layout.js"></script>
        <script type="text/javascript" src="../src/controller/Refresh.js"></script>
        <script type="text/javascript" src="../src/controller/ToolTips.js"></script>
        <script type="text/javascript" src="../src/model/Match.js"></script>
        <script type="text/javascript" src="../src/model/Link.js"></script>
        <script type="text/javascript" src="../src/model/Protein.js"></script>
        <script type="text/javascript" src="../src/model/Annotation.js"></script>
        <script type="text/javascript" src="../src/model/ProteinLink.js"></script>
        <script type="text/javascript" src="../src/model/ResidueLink.js"></script>
        <script type="text/javascript" src="../src/controller/ExternalControls.js"></script>
        <script type="text/javascript" src="../src/controller/Rotator.js"></script>
        <script type="text/javascript" src="../src/controller/xiNET_Storage.js"></script>
        <script type="text/javascript" src="../src/controller/ReadCSV.js"></script>
        <script type="text/javascript" src="../src/controller/Fasta.js"></script>
    </head>
    <body>

	<!-- Slidey panels -->	
	<div class="overlay-box" id="infoPanel">
	<div id="networkCaption">
		<p>No selection.</p>
	</div>
	</div>

	<div class="overlay-box" id="helpPanel">
	<table class="overlay-table"  bordercolor="#eee" >
		<tr>
			<td>Toggle the proteins between a bar and a circle</td>
			<td>Click on protein</td>
		</tr>
		<tr>
			<td>Zoom</td>
			<td>Mouse wheel</td>
		</tr>
		<tr>
			<td>Pan</td>
			<td>Click and drag on background</td>
		</tr>
		<tr>
			<td>Move protein</td>
			<td>Click and drag on protein</td>
		</tr>
		<tr>
			<td>Expand bar <br>(increases bar length until sequence is visible)</td>
			<td>Shift_left-click on protein</td>
		</tr>
		<tr>
			<td>Rotate bar</td>
			<td>Click and drag on handles that appear at end of bar</td>
		</tr>
		<tr>
			<td>Hide/show protein (and all links to it)</td>
			<td>Right-click on protein</td>
		</tr>
		<tr>
			<td>Hide links between two specific proteins</td>
			<td>Right click on any link between those proteins</td>
		</tr>
		<tr>
			<td>Show all hidden links</td>
			<td>Right click on background</td>
		</tr>
		<tr>
			<td>'Flip' self-links</td>
			<td>Right-click on self-link</td>
		</tr>
	</table> 
</div>	

<div class="overlay-box" id="legendPanel">
	<div><img src="../demo/images/fig3_1.svg"></div>
</div>	


		<script type="text/javascript">
				//<![CDATA[
				helpShown = false;
				infoShown = false;
				legendShown = false;
				function toggleHelpPanel() {
					if (helpShown){
						hideHelpPanel();
					}
					else {
						showHelpPanel();
					}
				}
				
				function toggleInfoPanel() {
					if (infoShown){
						hideInfoPanel();
					}
					else {
						showInfoPanel();
					}
				}
				function toggleLegendPanel() {
					if (legendShown){
						hideLegendPanel();
					}
					else {
						showLegendPanel();
					}
				}
				
				function showHelpPanel() {
						helpShown = true;
						d3.select("#helpPanel").transition().style("height", "500px").style("top", "100px").duration(700);
				}
				function hideHelpPanel() {
						helpShown = false;
						d3.select("#helpPanel").transition().style("height", "0px").style("top", "-95px").duration(700);
				}
				function showInfoPanel() {
						infoShown = true;
						d3.select("#infoPanel").transition().style("height", "300px").style("bottom", "115px").duration(700);

				}
				function hideInfoPanel() {
						infoShown = false;
						d3.select("#infoPanel").transition().style("height", "0px").style("bottom", "-95px").duration(700);

				}
				function showLegendPanel() {
						legendShown = true;
						d3.select("#legendPanel").transition().style("height", "500px").style("top", "100px").duration(700);

				}
				function hideLegendPanel() {
						legendShown = false;
						d3.select("#legendPanel").transition().style("height", "0px").style("top", "-95px").duration(700);

				}
				//]]>
		</script>
		<!-- Main -->
		<div id="main">
			<div class="container">   	 				
				<h1 class="page-header">
					<button class="btn btn-1 btn-1a network-control resetzoom" onclick="saveLayout();">
							Save layout
					</button>
					<button class="btn btn-1 btn-1a network-control resetzoom" onclick="xlv.reset();">
							Reset
					</button>
					<button class="btn btn-1 btn-1a network-control" onclick="xlv.exportSVG();">Export SVG</button>
							
					<div style='float:right'>
						<label class="btn">
								Legend
								<input id="selection" onclick="toggleLegendPanel()" type="checkbox">
						</label>
{'fraction_non_alphanumeric': 0.19657881927543286, 'fraction_numerical': 0.009874139489604339, 'mean_word_length': 3.120916905444126, 'pattern_counts': {'":': 0, '<': 328, '<?xml version=': 0, '>': 328, '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': '6491257', 'n_tokens_mistral': 5610, 'n_tokens_neox': 4631, 'n_words': 903}