Skip to content
Snippets Groups Projects
Commit cf5eb2d5 authored by Gael  MILLOT's avatar Gael MILLOT
Browse files

release v1.1: Miami plot improvement

parent 90f9e9d7
No related branches found
No related tags found
No related merge requests found
...@@ -232,6 +232,11 @@ Gitlab developers ...@@ -232,6 +232,11 @@ Gitlab developers
<br /><br /> <br /><br />
## WHAT'S NEW IN ## WHAT'S NEW IN
### v1.1
1) Miami plot improvement
### v1.0 ### v1.0
1) everything 1) everything
......
...@@ -75,6 +75,7 @@ if(interactive() == FALSE){ # if(grepl(x = commandArgs(trailingOnly = FALSE), pa ...@@ -75,6 +75,7 @@ if(interactive() == FALSE){ # if(grepl(x = commandArgs(trailingOnly = FALSE), pa
"fisher", "fisher",
"chr", "chr",
"y.lim1", "y.lim1",
"x.lim",
"y.lim2", "y.lim2",
"cute", "cute",
"log" "log"
...@@ -102,11 +103,23 @@ rm(tempo.cat) ...@@ -102,11 +103,23 @@ rm(tempo.cat)
# fisher <- "C:/Users/gael/Documents/Git_projects/08002_bourgeron/dataset/fisher.tsv" # fisher <- "C:/Users/gael/Documents/Git_projects/08002_bourgeron/dataset/fisher.tsv"
# chr <- "C:/Users/gael/Documents/Git_projects/08002_bourgeron/dataset/hg19_grch37p5_chr_size_cumul.txt" # chr <- "C:/Users/gael/Documents/Git_projects/08002_bourgeron/dataset/hg19_grch37p5_chr_size_cumul.txt"
# x.lim <- "whole"
# y.lim1 <- 5 # y.lim1 <- 5
# y.lim2 <- 3 # y.lim2 <- 3
# cute <- "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.4.0/cute_little_R_functions.R" # cute <- "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.4.0/cute_little_R_functions.R"
# log <- "report.txt" # log <- "report.txt"
fisher <- "C:/Users/gael/Documents/Git_projects/08002_bourgeron/dataset/fisher.tsv"
chr <- "C:/Users/gael/Documents/Git_projects/08002_bourgeron/dataset/hg19_grch37p5_chr_size_cumul.txt"
x.lim <- "whole"
y.lim1 <- 5
y.lim2 <- 3
cute <- "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.4.0/cute_little_R_functions.R"
log <- "report.txt"
################################ end Test ################################ end Test
################################ Recording of the initial parameters ################################ Recording of the initial parameters
...@@ -120,6 +133,7 @@ param.list <- c( ...@@ -120,6 +133,7 @@ param.list <- c(
if(run.way == "SCRIPT"){"command"}, if(run.way == "SCRIPT"){"command"},
"fisher", "fisher",
"chr", "chr",
"x.lim",
"y.lim1", "y.lim1",
"y.lim2", "y.lim2",
"cute", "cute",
...@@ -225,6 +239,7 @@ ee <- expression(arg.check <- c(arg.check, tempo$problem) , text.check <- c(text ...@@ -225,6 +239,7 @@ ee <- expression(arg.check <- c(arg.check, tempo$problem) , text.check <- c(text
tempo <- fun_check(data = fisher, class = "vector", typeof = "character", length = 1) ; eval(ee) tempo <- fun_check(data = fisher, class = "vector", typeof = "character", length = 1) ; eval(ee)
tempo <- fun_check(data = chr, class = "vector", typeof = "character", length = 1) ; eval(ee) tempo <- fun_check(data = chr, class = "vector", typeof = "character", length = 1) ; eval(ee)
# tempo <- fun_check(data = cute, class = "vector", typeof = "character", length = 1) ; eval(ee) # check above # tempo <- fun_check(data = cute, class = "vector", typeof = "character", length = 1) ; eval(ee) # check above
tempo <- fun_check(data = x.lim, options = c("whole", "region"), length = 1) ; eval(ee)
if(length(y.lim1) != 1 & any(grepl(y.lim1, pattern = "\\D"))){# normally no NA with is.null() if(length(y.lim1) != 1 & any(grepl(y.lim1, pattern = "\\D"))){# normally no NA with is.null()
tempo.cat <- paste0("ERROR IN global_logo.R:\nTHE y_lim1 PARAMETER MUST BE A SINGLE INTEGER\nHERE IT IS: \n", paste0(y.lim1, collapse = " ")) tempo.cat <- paste0("ERROR IN global_logo.R:\nTHE y_lim1 PARAMETER MUST BE A SINGLE INTEGER\nHERE IT IS: \n", paste0(y.lim1, collapse = " "))
stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between == stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between ==
...@@ -249,6 +264,7 @@ if(any(arg.check) == TRUE){ # normally no NA ...@@ -249,6 +264,7 @@ if(any(arg.check) == TRUE){ # normally no NA
tempo.arg <-c( tempo.arg <-c(
"fisher", "fisher",
"chr", "chr",
"x.lim",
"y.lim1", "y.lim1",
"y.lim2", "y.lim2",
"log" "log"
...@@ -354,6 +370,11 @@ if(length(obs) > 0 & nrow(obs) > 0){ ...@@ -354,6 +370,11 @@ if(length(obs) > 0 & nrow(obs) > 0){
for(i1 in chr$CHR_NB){ for(i1 in chr$CHR_NB){
obs$coord[obs$chr == i1] <- obs$position[obs$chr == i1] + chr$LENGTH_CUMUL_TO_ADD[i1] obs$coord[obs$chr == i1] <- obs$position[obs$chr == i1] + chr$LENGTH_CUMUL_TO_ADD[i1]
} }
if(x.lim == "region"){
any(grepl(x = obs$chr, pattern = "^MT$|^M$")))
strsplit()
}
}else{ }else{
tempo.warn <- paste0("EMPTY fisher FILE: NO PLOT DRAWN") tempo.warn <- paste0("EMPTY fisher FILE: NO PLOT DRAWN")
fun_report(data = paste0("WARNING\n", tempo.warn), output = log, path = "./", overwrite = FALSE) fun_report(data = paste0("WARNING\n", tempo.warn), output = log, path = "./", overwrite = FALSE)
......
...@@ -22,6 +22,7 @@ env { ...@@ -22,6 +22,7 @@ env {
chr_path = "/mnt/c/Users/Gael/Documents/Git_projects/fisher_for_vcf/dataset/hg19_grch37p5_chr_size_cumul.txt" // human chromo infos chr_path = "/mnt/c/Users/Gael/Documents/Git_projects/fisher_for_vcf/dataset/hg19_grch37p5_chr_size_cumul.txt" // human chromo infos
//chr_path = "/pasteur/zeus/projets/p01/BioIT/gmillot/reference_genomes/human hg19_grch37/hg19_grch37p5_chr_size_cumul.txt" // human chromo infos //chr_path = "/pasteur/zeus/projets/p01/BioIT/gmillot/reference_genomes/human hg19_grch37/hg19_grch37p5_chr_size_cumul.txt" // human chromo infos
region = "chr1" // region to parse. Write "chr7:0-147000000, chr10:1000000-2000000" for a single region, "chr7:0-147000000, chr10:1000000-2000000" if two regions, ""chr7" for a whole chromosome, "chr7, chr1" for two chromosomes and "None" for the complete genome // Warning : replace eval() by ast.literal_eval() from ast package in the main py code ? region = "chr1" // region to parse. Write "chr7:0-147000000, chr10:1000000-2000000" for a single region, "chr7:0-147000000, chr10:1000000-2000000" if two regions, ""chr7" for a whole chromosome, "chr7, chr1" for two chromosomes and "None" for the complete genome // Warning : replace eval() by ast.literal_eval() from ast package in the main py code ?
x_lim = "whole" // x-axis limits. Either "whole" for the whole genome, or "region" to have the x-axis limited to the region parameter
y_lim1 = 5 // max y-axis limit of the top panel in the miami plot, in log10, i.e., 5 means up to score 10^5 y_lim1 = 5 // max y-axis limit of the top panel in the miami plot, in log10, i.e., 5 means up to score 10^5
y_lim2 = 20 // max y-axis limit of the bottom panel in the miami plot, in log10, i.e., 5 means up to score 10^5 y_lim2 = 20 // max y-axis limit of the bottom panel in the miami plot, in log10, i.e., 5 means up to score 10^5
cute_path = "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.4.0/cute_little_R_functions.R" // single character string indicating the file (and absolute pathway) of the required cute_little_R_functions toolbox. With ethernet connection available, this can also be used: "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/raw/v5.1.0/cute_little_R_functions.R" or local "C:\\Users\\Gael\\Documents\\Git_projects\\cute_little_R_functions\\cute_little_R_functions.R" cute_path = "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/v11.4.0/cute_little_R_functions.R" // single character string indicating the file (and absolute pathway) of the required cute_little_R_functions toolbox. With ethernet connection available, this can also be used: "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/raw/v5.1.0/cute_little_R_functions.R" or local "C:\\Users\\Gael\\Documents\\Git_projects\\cute_little_R_functions\\cute_little_R_functions.R"
...@@ -46,12 +47,8 @@ result_folder_name = "PL_family_WGS_fisher" ...@@ -46,12 +47,8 @@ result_folder_name = "PL_family_WGS_fisher"
//// slurm variables //// slurm variables
// see https://confluence.pasteur.fr/pages/viewpage.action?pageId=69304504 // see https://confluence.pasteur.fr/pages/viewpage.action?pageId=69304504
fastqueue = 'common,dedicated' // fast for -p option of slurm. Example: fastqueue = 'common,dedicated'. Example: fastqueue = 'hubbioit' queue = 'common,dedicated' // -p option of slurm. Example: queue = 'common,dedicated'. Example: queue = 'hubbioit'
fastqos = '--qos=ultrafast' // fast for --qos option of slurm. Example: fastqos= '--qos=fast' qos = '--qos=ultrafast' // --qos option of slurm. Example: qos= '--qos=fast'. Example: qos = '--qos=ultrafast'. Example: qos = '--qos=hubbioit'
normalqueue = 'hubbioit' // normal for -p option of slurm. Example: normalqueue = 'bioevo'
normalqos = '--qos=hubbioit' // normal for --qos option of slurm. Example: normalqos = '--qos=dedicated'
longqueue = 'hubbioit' // slow for -p option of slurm. Example: longqueue = 'bioevo'
longqos = '--qos=hubbioit' // slow for --qos option of slurm. Example: longqos = '--qos=dedicated'
add_options = ' ' // additional option of slurm. Example: addoptions = '--exclude=maestro-1101,maestro-1034' or add_options = ' ' add_options = ' ' // additional option of slurm. Example: addoptions = '--exclude=maestro-1101,maestro-1034' or add_options = ' '
//// end slurm variables //// end slurm variables
...@@ -146,8 +143,8 @@ process { ...@@ -146,8 +143,8 @@ process {
// directives for all the processes // directives for all the processes
// executor='local' // no need because already defined above in the executor scope // executor='local' // no need because already defined above in the executor scope
if(system_exec == 'slurm'){ if(system_exec == 'slurm'){
queue = "$longqueue" queue = "$queue"
clusterOptions = "$longqos $add_options" clusterOptions = "$qos $add_options"
scratch=false scratch=false
maxRetries=30 maxRetries=30
errorStrategy='retry' errorStrategy='retry'
......
...@@ -166,6 +166,7 @@ process miamiplot { ...@@ -166,6 +166,7 @@ process miamiplot {
input: input:
file fisher from fisher_ch3 file fisher from fisher_ch3
file chr from chr_ch file chr from chr_ch
val x_lim
val y_lim1 val y_lim1
val y_lim2 val y_lim2
file cute_file file cute_file
...@@ -177,7 +178,7 @@ process miamiplot { ...@@ -177,7 +178,7 @@ process miamiplot {
script: script:
""" """
#!/bin/bash -ue #!/bin/bash -ue
miami.R ${fisher} ${chr} "${y_lim1}" "${y_lim2}" "${cute_file}" "miami_report.txt" miami.R ${fisher} ${chr} "${x_lim}" "${y_lim1}" "${y_lim2}" "${cute_file}" "miami_report.txt"
""" """
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment