From 4f51a68dc7d77c3b2cf8f5a3c9bfca8a2affd86d Mon Sep 17 00:00:00 2001
From: Mia <mia.legras@etu.u-paris.fr>
Date: Mon, 4 Jul 2022 11:39:46 +0200
Subject: [PATCH] derniere version

---
 .gitignore        |  5 ++++-
 bin/slith_part1.R |  4 ++--
 bin/slith_part2.R | 10 +++++-----
 nextflow.config   |  9 +++++----
 script.nf         | 10 +++++-----
 5 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0698ded..65be237 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,7 @@
 docker
 docs
 other
-README.md
\ No newline at end of file
+README.md
+.nextflow
+singularity
+work
\ No newline at end of file
diff --git a/bin/slith_part1.R b/bin/slith_part1.R
index 8407ae5..ccbfb25 100755
--- a/bin/slith_part1.R
+++ b/bin/slith_part1.R
@@ -92,7 +92,7 @@ serp.symmet.input <- as.logical(toupper(args[39]))
 adj_mean <- args[40]
 hiccompare_graph <- args[41]
 intern_funct_check <- args[42]
-mask_plots <- args[43]
+mask_plot <- args[43]
 if (theo.import) {
   theo.mat.ch1 <- args[44]
   theo.mat.ch2 <- args[45]
@@ -146,7 +146,7 @@ param.list <- c(
   "adj_mean",
   "hiccompare_graph",
   "intern_funct_check",
-  "mask_plots",
+  "mask_plot",
   if (theo.import) {
     "theo.file.name1"
     "theo.file.name2"
diff --git a/bin/slith_part2.R b/bin/slith_part2.R
index 389969b..3073cf5 100755
--- a/bin/slith_part2.R
+++ b/bin/slith_part2.R
@@ -35,7 +35,7 @@ serp.symmet.input <- as.logical(toupper(args[29]))
 adj_mean <- args[30]
 hiccompare_graph <- args[31]
 intern_funct_check <- args[32]
-mask_plots <- args[33]
+mask_plot <- args[33]
 
 warning.message <- NULL
 ini.date <- Sys.time()
@@ -114,13 +114,13 @@ if (activate.pdf == TRUE) {
 ## end import
 
 mat1.obs.serp <-
-  as.matrix(read.table(obs.file1, header = FALSE))
+  as.matrix(read.table(obs.file1, header = FALSE, sep = ","))
 mat2.obs.serp <-
-  as.matrix(read.table(obs.file2, header = FALSE))
+  as.matrix(read.table(obs.file2, header = FALSE, sep = ","))
 mat1.theo.serp <-
-  as.matrix(read.table(theo.file1, header = FALSE))
+  as.matrix(read.table(theo.file1, header = FALSE, sep = ","))
 mat2.theo.serp <-
-  as.matrix(read.table(theo.file2, header = FALSE))
+  as.matrix(read.table(theo.file2, header = FALSE, sep = ","))
 
 # end export of binned obs and theo matrices
 ################ end serpentine
diff --git a/nextflow.config b/nextflow.config
index 774de47..998af4e 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -20,10 +20,11 @@
 env {
     project_name = "slitherine"
     //// path and files
+    slith_path = "/home/rsg/mia/gitlab"
     lib_path = "NULL"
-    in_path = "/home/ishimia"
-    out_path = "/home/ishimia/result"
-    matrix_file1 = "GSM2870407_mat_BC70_TACT_wt_MM_30C.txt"
+    in_path = "/home/rsg/mia/gitlab/matrices_Mia"
+    out_path = "/home/rsg/mia/gitlab/result"
+    matrix_file1 = "GSM2870423_mat_BC172_CGGT_wt_LB_30C_rep1.txt"
     matrix_file2 = "GSM2870422_mat_BC172_CGGT_wt_LB_30C.txt"
     serp_binning = true
     thr_tot = '70'
@@ -74,7 +75,7 @@ env {
     adj_mean = "$projectDir/bin/adj_mean.R"
     hiccompare_graph = "$projectDir/bin/hiccompare_graph.R"
     intern_funct_check = "$projectDir/bin/intern_funct_check.R"
-    mask_plots = "$projectDir/bin/mask_plots.R"
+    mask_plot = "$projectDir/bin/mask_plot.R"
 }
 
 //////// end variables that will be used only in the script.nf
diff --git a/script.nf b/script.nf
index 4ff1d8f..b525656 100644
--- a/script.nf
+++ b/script.nf
@@ -107,7 +107,7 @@ process PRE_SERPENTINE {
     val adj_mean
     val hiccompare_graph
     val intern_funct_check
-    val mask_plots
+    val mask_plot
     if(theo_import){
         file mat1_theo from theo_mat_ch1
         file mat2_theo from theo_mat_ch2
@@ -133,7 +133,7 @@ process PRE_SERPENTINE {
             "${step_factor}" "${ratio_normalization}" "${activate_pdf}" "${optional_text}" \
             "${width_wind}" "${height_wind}" "${dot_size}" "${line_size}" "${heatmap_text_size}" \
             "${text_size}" "${title_text_size}" "${raster}" "${transfo}" "${warn_secu}" \
-            "${serp_symmet_input}" "${adj_mean}" "${hiccompare_graph}" "${intern_funct_check}" "${mask_plots}" \ 
+            "${serp_symmet_input}" "${adj_mean}" "${hiccompare_graph}" "${intern_funct_check}" "${mask_plot}" \ 
             "${mat1_theo}" "${mat2_theo}" "${theo_path_in}"
         """
     else
@@ -146,7 +146,7 @@ process PRE_SERPENTINE {
             "${step_factor}" "${ratio_normalization}" "${activate_pdf}" "${optional_text}" \
             "${width_wind}" "${height_wind}" "${dot_size}" "${line_size}" "${heatmap_text_size}" \
             "${text_size}" "${title_text_size}" "${raster}" "${transfo}" "${warn_secu}" "${serp_symmet_input}" \
-            "${adj_mean}" "${hiccompare_graph}" "${intern_funct_check}" "${mask_plots}"
+            "${adj_mean}" "${hiccompare_graph}" "${intern_funct_check}" "${mask_plot}"
         """
 } 
 
@@ -215,7 +215,7 @@ if (serp_binning == true){
         val adj_mean
         val hiccompare_graph
         val intern_funct_check
-        val mask_plots
+        val mask_plot
 
         output:
         path "*.txt"
@@ -230,7 +230,7 @@ if (serp_binning == true){
                 "${step_factor}" "${ratio_normalization}" "${activate_pdf}" "${optional_text}" \
                 "${width_wind}" "${height_wind}" "${dot_size}" "${line_size}" "${heatmap_text_size}" \
                 "${text_size}" "${title_text_size}" "${raster}" "${transfo}" "${warn_secu}" \
-                "${serp_symmet_input}" "${adj_mean}" "${hiccompare_graph}" "${intern_funct_check}" "${mask_plots}"
+                "${serp_symmet_input}" "${adj_mean}" "${hiccompare_graph}" "${intern_funct_check}" "${mask_plot}"
             """
     }
 }
-- 
GitLab