commit a0b91fee44e29aff317a535742bcbe84f43ecdde
Author: Florent Chuffart <florent.chuffart@ens-lyon.fr>
Date:   Sat Jan 18 18:35:32 2014 +0100

    Fixing bug in align_inter_strain_nucs function

diff --git a/build/nucleominer_2.3.14.tar.gz b/build/nucleominer_2.3.14.tar.gz
new file mode 100644
index 0000000..e138e56
Binary files /dev/null and b/build/nucleominer_2.3.14.tar.gz differ
diff --git a/doc/sphinx_doc/build/latex/NucleoMiner2.pdf b/doc/sphinx_doc/build/latex/NucleoMiner2.pdf
index a83ee6c..d79c8c5 100644
Binary files a/doc/sphinx_doc/build/latex/NucleoMiner2.pdf and b/doc/sphinx_doc/build/latex/NucleoMiner2.pdf differ
diff --git a/doc/sphinx_doc/conf.py b/doc/sphinx_doc/conf.py
index 152afaa..38a696f 100644
--- a/doc/sphinx_doc/conf.py
+++ b/doc/sphinx_doc/conf.py
@@ -50,9 +50,9 @@ copyright = u'2012, Florent CHUFFART, Jean-Baptiste VEYRIERAS, Gael YVERT'
 # built documents.
 #
 # The short X.Y version.
-version = '2.3.13'
+version = '2.3.14'
 # The full version, including alpha/beta/rc tags.
-release = '2.3.13'
+release = '2.3.14'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/doc/sphinx_doc/rref.rst b/doc/sphinx_doc/rref.rst
index 47a8849..e5d093a 100644
--- a/doc/sphinx_doc/rref.rst
+++ b/doc/sphinx_doc/rref.rst
@@ -1085,7 +1085,7 @@ Details
 +---------------+---------------------------------------------------+
 | Author:       | Florent Chuffart                                  |
 +---------------+---------------------------------------------------+
-| Version:      | 2.3.13                                            |
+| Version:      | 2.3.14                                            |
 +---------------+---------------------------------------------------+
 | License:      | CeCILL                                            |
 +---------------+---------------------------------------------------+
diff --git a/src/DESCRIPTION b/src/DESCRIPTION
index 659ca31..9520276 100644
--- a/src/DESCRIPTION
+++ b/src/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: nucleominer
 Maintainer: Florent Chuffart <florent.chuffart@ens-lyon.fr>
 Author: Florent Chuffart
-Version: 2.3.13
+Version: 2.3.14
 License: CeCILL 
 Title: nm
 Depends: seqinr, plotrix, DESeq, cachecache
diff --git a/src/R/nucleominer.R b/src/R/nucleominer.R
index 8cf264b..1e79882 100644
--- a/src/R/nucleominer.R
+++ b/src/R/nucleominer.R
@@ -470,18 +470,12 @@ config=NULL, ##<< GLOBAL config variable
 	strain_ref1 = replicates[[1]][[1]]$strain
 	strain_ref2 = replicates[[2]][[1]]$strain
 	big_roi = replicates[[1]][[1]]$roi
+  orig_big_roi = replicates[[1]][[1]]$orig_roi
 	if(big_roi$end - big_roi$begin < 0) {
 		tmp_begin = big_roi$begin
 		big_roi$begin =  big_roi$end
 		big_roi$end =  tmp_begin
 	}
-  tr_big_roi = translate_roi(big_roi, strain_ref2, config=config)
-	if(tr_big_roi$end - tr_big_roi$begin < 0) {
-		tr_tmp_begin = tr_big_roi$begin
-		tr_big_roi$begin = tr_big_roi$end
-		tr_big_roi$end = tr_tmp_begin
-	}
-	# print(big_roi)
 	# GO!
 	if (is.null(wp_nucs_strain_ref1)) {
 		wp_nucs_strain_ref1 = aggregate_intra_strain_nucs(replicates[[1]], ...)[[1]]
@@ -510,7 +504,7 @@ config=NULL, ##<< GLOBAL config variable
 			# Filtering on Well Positionned
 			if (nuc_strain_ref1$wp) {
 				roi_strain_ref1 = list(name=paste("strain_chr_id_" , strain_ref1 , "_" , chr , "_" , "i" , "_", sep=""), begin=nuc_strain_ref1$lower_bound, end=nuc_strain_ref1$upper_bound, chr=chr, strain_ref = strain_ref1)
-				roi_strain_ref2 = translate_roi(roi_strain_ref1, strain_ref2, big_roi=big_roi, config=config) 
+				roi_strain_ref2 = translate_roi(roi_strain_ref1, strain_ref2, big_roi=orig_big_roi, config=config) 
         if (!is.null(roi_strain_ref2)){
 					# LOADING INTRA_STRAIN_NUCS_FILENAME_STRAIN_REF2 FILE(S) TO COMPUTE MATCHING_NAS (FILTER)
 					lower_bound_roi_strain_ref2 = min(roi_strain_ref2$end,roi_strain_ref2$begin)
@@ -520,12 +514,7 @@ config=NULL, ##<< GLOBAL config variable
 						nuc_strain_ref2 = wp_nucs_strain_ref2[[index_nuc_strain_ref2]]
 						# Filtering on Well Positionned
     				nuc_strain_ref2_to_roi = list(begin=nuc_strain_ref2$lower_bound, end=nuc_strain_ref2$upper_bound, chr=nuc_strain_ref2$chr, strain_ref = strain_ref2)             
-						if (!(tr_big_roi$chr!=nuc_strain_ref2$chr | 
-                  nuc_strain_ref2$upper_bound > tr_big_roi$end | 
-                  nuc_strain_ref2$upper_bound < tr_big_roi$begin | 
-                  nuc_strain_ref2$lower_bound > tr_big_roi$end | 
-                  nuc_strain_ref2$lower_bound < tr_big_roi$begin) &
-                !is.null(translate_roi(nuc_strain_ref2_to_roi, strain_ref1, big_roi=big_roi, config=config)) &  
+						if (!is.null(translate_roi(nuc_strain_ref2_to_roi, strain_ref1, big_roi=orig_big_roi, config=config)) &  
                 nuc_strain_ref2$wp) {
 							# Filtering on correlation Score and collecting reads					
 							SKIP = FALSE
@@ -707,6 +696,7 @@ get_ouputs=TRUE##<< If TRUE, get also ouput corresponding TF output files.
   samples_ids = unique(all_samples[all_samples$marker == "Mnase_Seq" & all_samples$strain == strain,]$id)
 	for (i in samples_ids) {
 		sample = as.list(all_samples[all_samples$id==i,])
+    sample$orig_roi = roi
     sample$roi = translate_roi(roi, sample$strain, config = config)
 		if (get_genome) {
 			# Get Genome
@@ -1781,6 +1771,7 @@ config=NULL ##<< GLOBAL config variable.
   	samples=list()
   	for (i in samples_ids) {
   		sample = as.list(all_samples[all_samples$id==i,])
+      sample$orig_roi = roi
       sample$roi = translate_roi(roi, sample$strain, config = config)
   		if (get_genome) {
   			# Get Genome
