diff --git a/COPYING b/COPYING
old mode 100755
new mode 100644
diff --git a/ChIP-Seq-logo.png b/ChIP-Seq-logo.png
new file mode 100644
index 0000000..617be21
Binary files /dev/null and b/ChIP-Seq-logo.png differ
diff --git a/INSTALL b/INSTALL
old mode 100755
new mode 100644
diff --git a/Makefile b/Makefile
old mode 100755
new mode 100644
diff --git a/README b/README
old mode 100755
new mode 100644
diff --git a/README_man b/README_man
new file mode 100644
index 0000000..7464fdb
--- /dev/null
+++ b/README_man
@@ -0,0 +1,2 @@
+/usr/share/man/man1/
+/usr/local/share/man/chip-seq/man1/
diff --git a/chipcenter.1.gz b/chipcenter.1.gz
old mode 100755
new mode 100644
diff --git a/chipcenter.c b/chipcenter.c
old mode 100755
new mode 100644
diff --git a/chipcor.1.gz b/chipcor.1.gz
old mode 100755
new mode 100644
diff --git a/chipcor.c b/chipcor.c
old mode 100755
new mode 100644
diff --git a/chipextract.1.gz b/chipextract.1.gz
old mode 100755
new mode 100644
diff --git a/chipextract.c b/chipextract.c
old mode 100755
new mode 100644
diff --git a/chippart.1.gz b/chippart.1.gz
old mode 100755
new mode 100644
diff --git a/chippart.c b/chippart.c
old mode 100755
new mode 100644
diff --git a/chippeak.1.gz b/chippeak.1.gz
old mode 100755
new mode 100644
diff --git a/chippeak.c b/chippeak.c
old mode 100755
new mode 100644
diff --git a/chipscore.1.gz b/chipscore.1.gz
old mode 100755
new mode 100644
diff --git a/chipscore.c b/chipscore.c
old mode 100755
new mode 100644
diff --git a/chipseq.spec b/chipseq.spec
new file mode 100644
index 0000000..e538208
--- /dev/null
+++ b/chipseq.spec
@@ -0,0 +1,48 @@
+Name: chip-seq
+Version: 1.0
+Release: 1%{?dist}
+Summary: Tools for the analysis of ChIP-seq data and other types of mass genome annotation data
+Group: Applications/Engineering
+License: GPL
+URL: http://chip-seq.sourceforge.net
+Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+
+%description
+The ChIP-seq software provide methods for the analysis of ChIP-seq data and other types of mass genome annotation data. 
+The ChIP-seq software is implemented as a small number of standalone modules that perform the following tasks on ChIP-seq data: feature correlation , tag centering , peak location and identification of signal-enriched regions. 
+
+
+%prep
+%setup -q
+
+%build
+make %{?_smp_mflags} CCOPTS="-std=gnu99 $RPM_OPT_FLAGS"
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{_bindir}
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+install -m 755 \
+  chipcor chipcenter chippeak chippart \
+  $RPM_BUILD_ROOT/%{_bindir}/
+install -m 644 chipcor.1 chipcenter.1 chippeak.1 chippart.1 $RPM_BUILD_ROOT/%{_mandir}/man1
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING README runme
+%{_bindir}/*
+%{_mandir}/man1/*
+
+
+%changelog
+* Thu Nov 13 2008 Giovanna Ambrosini <Giovanna.Ambrosini@epfl.ch> 1.0-1
+- Initial RPM release.
diff --git a/data/CTCF.sga.gz b/data/CTCF.sga.gz
new file mode 100644
index 0000000..4c0242d
Binary files /dev/null and b/data/CTCF.sga.gz differ
diff --git a/data/ES.K4.sga.gz b/data/ES.K4.sga.gz
new file mode 100644
index 0000000..1bb0068
Binary files /dev/null and b/data/ES.K4.sga.gz differ
diff --git a/data/ES_CTCF_peaks.sga.gz b/data/ES_CTCF_peaks.sga.gz
new file mode 100644
index 0000000..e596327
Binary files /dev/null and b/data/ES_CTCF_peaks.sga.gz differ
diff --git a/data/Mm_EPDnew_001_mm9.sga.gz b/data/Mm_EPDnew_001_mm9.sga.gz
new file mode 100644
index 0000000..f666099
Binary files /dev/null and b/data/Mm_EPDnew_001_mm9.sga.gz differ
diff --git a/data/README b/data/README
new file mode 100644
index 0000000..0919bf5
--- /dev/null
+++ b/data/README
@@ -0,0 +1,15 @@
+This directory contains a few data sets that can be used to run some tests.
+Examples on how to use the ChIP-Seq tools with these data are described in
+the User's Guide (doc/ChIP-Seq_Tools-UsersGuide.pdf).
+
+In addition, we include two data files that are used by some ChIP-seq applications:
+
+- chro_idx.nstorage : perl Storable table for chromosome ID data structure. 
+                      It is used by the perl scripts for converting chromosome numbers to NCBI RefSeq IDs.
+
+- chr_NC_gi         : text table that stores chromosome numbers and NCBI RefSeq identifiers for several
+                      species. It is used by the C format conversion programs to link chromosome numbers
+                      to NCBI RefSeq identifiers.
+
+- chr_size          : text table that stores the chromosome sizes for several species.
+                      It is used by several C programs to check for chromosome boudaries.
diff --git a/debug.h b/debug.h
old mode 100755
new mode 100644
diff --git a/doc/ChIP-Seq_Tools-UsersGuide.pdf b/doc/ChIP-Seq_Tools-UsersGuide.pdf
old mode 100755
new mode 100644
diff --git a/hashtable.c b/hashtable.c
old mode 100755
new mode 100644
diff --git a/hashtable.h b/hashtable.h
old mode 100755
new mode 100644
diff --git a/header_bkgd.png b/header_bkgd.png
new file mode 100644
index 0000000..ecd8ffe
Binary files /dev/null and b/header_bkgd.png differ
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..31d2c47
--- /dev/null
+++ b/index.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+        "http://www.w3.org/TR/html4/loose.dtd">
+<html lang='en'>
+<head>
+<title>ChIP-Seq</title>
+<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
+<meta http-equiv="content-type" content="text/html;charset=UTF-8">
+</head>
+
+<body>
+<div id="wrap">
+<div id="header">
+  <table border="0" width="100%" cellspacing="0" bordercolor="white"><tr>
+	  <td width="93%"><h1>ChIP-Seq tools</h1></td>
+	  <td style="vertical-align:middle"><a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=246254&amp;type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a></td>
+	</tr></table>
+</div>
+<div id="menu">
+  <ul>
+	<li><a href="index.html">Home</a></li>
+  </ul>
+</div>
+
+<div id="sidebar">
+<!-- BEGIN OF THE SIDEBAR  -->
+<p>
+<h3> ChIP-Seq on SourceForge</h3>
+<ul>
+  <li><a href="http://sourceforge.net/projects/chip-seq/">SF Project Page</a></li>
+  <li><a href="http://sourceforge.net/projects/chip-seq/files/chip-seq/">SF Download Page</a></li>
+</ul>
+<h3> ChIP-Seq Programs</h3>
+<ul>
+  <li><a href="http://ccg.vital-it.ch/chipseq/doc/ChIP-Seq_Tools-UsersGuide.pdf">User's Guide</a></li>
+</ul>
+<h3>ChIP-Seq on the Web</h3>
+<ul>
+  <li><a href="http://ccg.vital-it.ch/chipseq/">Home Page</a></li>
+  <li><a href="http://ccg.vital-it.ch/chipseq/doc/chipseq_tutorial.pdf">Application Examples</a></li>
+</ul>
+<h3>References</h3>
+<ul>
+  <li>Ambrosini, G., et al.,<br> <a href="https://www.ncbi.nlm.nih.gov/pubmed/27863463">BMC Genomics (2016) <b>17</b>: 938.</a></li>
+  <li>Ambrosini, G., et al.,<br> <a href="https://genomicscomputbiol.org/ojs/index.php/GCB/article/view/22">GCB, Vol. 1, No. 1 (2015): e22</a></li>
+</ul>
+<!-- END OF THE SIDEBAR  -->
+</div>
+
+<div id="main">
+<!-- BEGIN OF THE MAIN BODY  -->
+<p>
+<h2>Introduction</h2>
+<p>
+<table width="100%" border=0 cellpadding=5 cellspacing=5>
+<tr>
+<td><p align=justify>
+Chromatin immunoprecipitation (ChIP) followed by high-throughput sequencing (ChIP-seq) is a powerful method to determine how transcription factors and other chromatin-associated proteins interact with DNA in order to regulate gene transcription. A single ChIP-seq experiment produces large amounts of highly reproducible data. The challenge is to extract knowledge from the data by thoughtful application of appropriate bioinformatics tools. 
+<p>
+We have developed a set of software applications for performing common ChIP-seq data analysis tasks across the whole genome, including positional correlation analysis, peak detection, and genome partitioning into signal-rich and signal-poor regions. 
+<p>
+The ChIP-Seq tools exist as stand-alone C programs and include the following programs:
+<ul>
+<li> <font color="red"><b> chipcor : </b></font>positional correlation and generation of an aggregation plot for two genomic features;</li>
+<li> <font color="red"><b> chipextract : </b></font>extraction of specific genome annotation features around reference genomic anchor points;</li>
+<li> <font color="red"><b> chipcenter : </b></font>read shifting;</li>
+<li> <font color="red"><b> chippeak : </b></font>narrow peak caller that uses a fixed width peak size;</li>
+<li> <font color="red"><b> chippart : </b></font>broad peak caller algorithm used for broad regions of enrichment (i.e. histone marks);</li>
+<li> <font color="red"><b> chipscore : </b></font>feature selection tool based on a read count threshold;</li>
+</ul>
+</tr>
+</table>
+<p>
+<h2>Project Description</h2>
+<p>
+<table width="100%" border=0 cellpadding=5 cellspacing=5>
+<tr>
+<td><p align=justify>
+<!--
+  The ChIP-seq tools have been developed by Giovanna Ambrosini
+  at the School of Life Sciences of Ecole Polythechnique Federale
+  de Lausanne (<a href="http://sv.epfl.ch">EPFL/FSV</a>).</p>
+-->
+<p> The ChIP-Seq tools have been designed to be simple, fast and highly modular. Each program carries out a well defined data processing procedure that can potentially fit into a pipeline framework.
+<p> As an internal working format, the ChIP-Seq programs use a compact format called SGA (Simplified Genome Annotation). SGA files are single-line-oriented and tab-delimited text files with the following five mandatory fields:
+<ul>
+<li> <font color="red"><b> Sequence name (Char String)</b></font> </li>
+<li> <font color="red"><b> Feature (Char String)</b></font> </li>
+<li> <font color="red"><b> Sequence Position (Integer)</b></font> </li>
+<li> <font color="red"><b> Strand (+/- or 0)</b></font> </li>
+<li> <font color="red"><b> Read Counts (Integer)</b></font> </li>
+</ul>
+<p> Any number of additional fields may be added containing application-specific information.
+<p> The Chip-Seq programs require SGA files to be sorted by sequence name, position, and strand.
+Note that SGA is a generic format that can be used to represent other genome annotations, e.g. the location of transcription start sites (TSS) or cross-genome conservation scores.
+Orientation-less features will be associated with a strand value of 0.</P>
+<p>Technically, the programs are fast and are able to carry out data analysis
+across an entire SGA-formatted data file (which can be several hundreds of MBs) in a few
+minutes, thus allowing high-throughput genomic data analysis.
+<p>The programs are documented by UNIX style man pages and a README file that explains the installation procedure. The current distribution also contains a number of auxiliary Perl scripts as well as C programs for reformatting and other pre- and post-processing tasks.
+</p>
+</tr>
+</table>
+<!--
+<p>
+<h2>The Web Server</h2>
+<p>
+<table width="100%" border=0 cellpadding=5 cellspacing=5>
+<tr>
+<td><p align=justify>
+
+<p>ChIP-Seq also provides a Web interface which is freely available at:</center>
+<p>
+<table border=0 cellpadding=0>
+<tr style="background-image: url(./sib_header_small_bkgd.png)"><td>
+<a style="text-decoration: none; font-size:14px" href="http://ccg.vital-it.ch/chipseq/"><i>ChIP-Seq Web Site ></i></font></a>
+</td></tr></table>
+</td></tr></table>
+-->
+</div>
+<!--
+<p>
+<a href="http://validator.w3.org/check/referer"><img
+src="http://www.w3.org/Icons/valid-xhtml10"
+alt="Valid XHTML 1.0!" height="31"
+width="88" ></a>
+</p>.
+-->
+<div style="clear: both;"> </div>
+<div id="footer">
+<hr/>
+<p style="text-align: right;">Last modified: October 2018</p>
+</div>
+</div>
+</body>
+</html>
diff --git a/sflogo.png b/sflogo.png
new file mode 100644
index 0000000..afe08c4
Binary files /dev/null and b/sflogo.png differ
diff --git a/share/chr_NC_gi b/share/chr_NC_gi
old mode 100755
new mode 100644
diff --git a/share/chr_size b/share/chr_size
old mode 100755
new mode 100644
diff --git a/share/chro_idx.nstorage b/share/chro_idx.nstorage
old mode 100755
new mode 100644
diff --git a/sib_body_bkgd.png b/sib_body_bkgd.png
new file mode 100644
index 0000000..56513ae
Binary files /dev/null and b/sib_body_bkgd.png differ
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..c30188d
--- /dev/null
+++ b/style.css
@@ -0,0 +1,296 @@
+/* link and hover */
+a:link {
+	color: #000;
+}
+a:hover {
+  	text-decoration: none;
+	border-bottom: 1px dotted #bb242d;
+	background-color: #e0e0e0;
+	color: #666;
+}
+
+a:visited {
+	color: #333;
+}
+
+/* basic html */
+body, td, th {
+	font: 12px "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
+}
+body {
+	color: #000;
+	background: #fff
+	margin: 0;
+	padding: 0;
+}
+blockquote {
+	margin: 1em 2em;
+	font-style: italic;
+}
+caption {
+	font-weight: bold;
+	color: #444;
+	background: #ccc;
+	border-bottom: 0;
+	padding: 0.3em 1em;
+}
+dd {
+	margin: 1em 2em;
+}
+dl {
+	margin: 2em 0;
+}
+dt {
+	font-weight: bold;
+}
+hr {
+	margin: 2em 0;
+	color: #C7C7C7;
+	background: #C7C7C7;
+	border-color: #C7C7C7;
+	border-style: none;
+	height: 1px;
+}
+li {
+	margin: 0.5em 0;
+	#line-height: 1.5;
+	line-height: 1.3;
+}
+table {
+	border: solid 1px #ccc;
+}
+td {
+	vertical-align: top;
+	padding: 0.5em;
+}
+th {
+	font-weight: bold;
+	text-align: left;
+	padding: 0.5em;
+}
+ol, ul {
+	margin: 2em 0;
+	padding-left: 1em;
+}
+
+ol li {
+	list-style-type: decimal;
+	margin-left: 2em;
+}
+ul li {
+	margin-left: 2em;
+	list-style-type: square;
+}
+td p {
+	margin-top: 0;
+}
+p {
+	margin: 1em 0;
+	line-height: 1.5;
+}
+h1,h2,h3,h4,h5,h6 {
+	font-family: "Trebuchet MS", arial, sans-serif;
+}
+h1 {
+	#color: #C7C7C7;
+	color: #626262;
+	#font-size: 2.4em;
+	font-size: 2.8em;
+	letter-spacing: 0.2em;
+	font-weight: normal;
+	padding: 1em 25px 0 25px;
+}
+h2 {
+	margin: 0 0 0.5em 0;
+	color: #666;
+	#font-size: 1.4em;
+	font-size: 1.8em;
+	font-weight: bold;
+	#border-bottom: double 3px #626262;
+	padding: 0 0 0.4em 0;
+	border-bottom-color: #eee;
+}
+h3 {
+	font-size: 1.2em;
+	color: #666;
+	background: #eee;
+	border: dotted 1px #626262;
+	padding: 0.2em;
+	border-color: #ddd;
+}
+h4 {
+	border-bottom-color: #888;
+	font-size: 1.2em;
+	padding: 0 0 0.2em 0;
+	margin: 0.6em 0 0 0.4em;
+	color: #444;
+}
+h5 {
+	color: #888;
+	border-bottom: dotted 1px #626262;
+	border-bottom-color: #626262;
+}
+h6 {
+	border-left: solid 1.2em #777;
+	padding-left: 0.6em;
+	color: #ccc;
+	border-left-color: #888;
+}
+body {
+	color: #444;
+	background: #F7F8FA;
+}
+caption {
+	color: inherit;
+	background: #eee;
+}
+hr {
+	color: #eee;
+	background: #eee;
+	border-color: #eee;
+}
+table {
+	border-color: #e6e6e6;
+}
+th {
+	color: #444;
+	background: #ccc;
+}
+
+#wrap {
+  #width: 740px;
+  width: 800px;
+  text-align: left;
+  margin: 0 auto;
+}
+
+#header {
+	color: #888;
+	border-top: solid 3px #777;
+	border-top-color: #fff;
+	padding: 0;
+	margin: 0 0 1.5em 0;
+}
+
+#header table {
+	border-style: hidden;
+	padding: 0;
+	margin: 0;
+}
+
+#menu {
+	font: normal 1em "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
+	color: #444;
+	#background-color: #e9e9e9;
+        #background-image: url(./sib_header_small_bkgd.png);
+        background-image: url(./header_bkgd.png);
+	height: 2.5em;
+	#height: 3.0em;
+	margin: 0 0 1.5em 0;
+	text-align: right;
+	padding-right: 10px;
+}
+#menu ul {
+	margin: 0;
+	padding: 0.5em;
+	list-style: none;
+}
+#menu li {
+	display: inline;
+	padding: 0;
+}
+#menu a {
+	font-weight: bold;
+	text-decoration: none;
+}
+
+#widemain {
+	float: left;
+	display: inline; /* for IE */
+	padding: 0 25px 0 25px;
+	margin: 0;
+}
+
+#main {
+	float: left;
+	display: inline; /* for IE */
+	#width: 490px;
+	width: 520px;
+        background: #F7F8FA url(./sib_body_bkgd.png) repeat-x top left;
+	padding: 0 25px;
+	margin: 0;
+}
+
+/* sidebar */
+#sidebar {
+	float: right;
+	display: inline; /* for IE */
+	#width: 170px;
+	width: 210px;
+        background: #F7F8FA url(./sib_body_bkgd.png) repeat-x top left;
+	#margin: 0 10px;
+	margin: 0 0px;
+}
+
+#sidebar h3 {
+	#margin: 0;
+	margin: 5px;
+	#color: #777;
+        color: #626262;
+	background: none;
+	font-size: 1.2em;
+	font-weight: bold;
+	border: none;
+	padding: 0;
+}
+#sidebar blockquote, #sidebar blockquote p, #sidebar-alternate blockquote, #sidebar-alternate blockquote p {
+	margin-left: 0;
+	margin-right: 0;
+}
+#sidebar blockquote {
+	margin: 1em 0;
+	padding: 0;
+}
+#sidebar ul {
+	margin: 10px 0 20px 12px;
+	padding: 0;
+	list-style:none;
+}
+#sidebar ul li {
+	display: block;
+	padding: 4px 0 0 0;
+	margin: 0;
+}
+#sidebar a:link {
+	color: #666;
+}
+#sidebar a:visited {
+	color: #444;
+}
+#sidebar a:hover {
+	color: #999;
+}
+
+/* footer */
+#footer {
+	clear: both;
+	color: #888;
+	padding: 0 1em 1em 1em;
+	margin-bottom: 1px;
+}
+
+/* floatright class */
+.floatright {
+	display: block;
+	font-weight: bold;
+	float: right;
+	margin: 0 0 2em 2em;
+	border: 3px double #666;
+	padding: 1em;
+	font-size: 1.2em;
+	background: #fff;
+}
+.floatright li {
+	margin: 3px;
+	list-style:none;
+}
diff --git a/tools/README b/tools/README
old mode 100755
new mode 100644
diff --git a/tools/bed2bed_display.c b/tools/bed2bed_display.c
old mode 100755
new mode 100644
diff --git a/tools/bed2sga.c b/tools/bed2sga.c
old mode 100755
new mode 100644
diff --git a/tools/check_bed.pl b/tools/check_bed.pl
old mode 100755
new mode 100644
diff --git a/tools/chr_replace_sga.pl b/tools/chr_replace_sga.pl
old mode 100755
new mode 100644
diff --git a/tools/compactsga.c b/tools/compactsga.c
old mode 100755
new mode 100644
diff --git a/tools/countsga.c b/tools/countsga.c
old mode 100755
new mode 100644
diff --git a/tools/eland2sga.pl b/tools/eland2sga.pl
old mode 100755
new mode 100644
diff --git a/tools/featreplace.c b/tools/featreplace.c
old mode 100755
new mode 100644
diff --git a/tools/fetch_sga.pl b/tools/fetch_sga.pl
old mode 100755
new mode 100644
diff --git a/tools/filter_counts.c b/tools/filter_counts.c
old mode 100755
new mode 100644
diff --git a/tools/fps2sga.pl b/tools/fps2sga.pl
old mode 100755
new mode 100644
diff --git a/tools/gff2sga.pl b/tools/gff2sga.pl
old mode 100755
new mode 100644
diff --git a/tools/partit2bed.pl b/tools/partit2bed.pl
old mode 100755
new mode 100644
diff --git a/tools/partit2gff.pl b/tools/partit2gff.pl
old mode 100755
new mode 100644
diff --git a/tools/partit2sga.pl b/tools/partit2sga.pl
old mode 100755
new mode 100644
diff --git a/tools/sga2bed.c b/tools/sga2bed.c
old mode 100755
new mode 100644
diff --git a/tools/sga2fps.pl b/tools/sga2fps.pl
old mode 100755
new mode 100644
diff --git a/tools/sga2gff.pl b/tools/sga2gff.pl
old mode 100755
new mode 100644
diff --git a/tools/sga2wig.c b/tools/sga2wig.c
old mode 100755
new mode 100644
diff --git a/version.h b/version.h
old mode 100755
new mode 100644