Commit fc74397e authored by Frédéric  LEMOINE's avatar Frédéric LEMOINE
Browse files

removed absolute paths to r scripts

parent 984fc25a
......@@ -208,12 +208,12 @@ process plot_fivep_filtering_stat { // section 8.7 to 8.11 of the labbook 202005
label 'r_ext' // see the withLabel: bash in the nextflow config file
publishDir "${out_path}/figures", mode: 'copy', pattern: "{*.png}", overwrite: false // https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob
publishDir "${out_path}/reports", mode: 'copy', pattern: "{plot_fivep_filtering_stat_report.txt}", overwrite: false // https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob
cache 'true'
cache 'deep'
input:
tuple val(nouse), file(stat) from stat_fastq_5p_filter_ch1
val attc_seq
val cute from cute_path
val cute_path
output:
file "plot_fivep_filtering_stat.png" into fig_ch1
......@@ -230,7 +230,7 @@ process plot_fivep_filtering_stat { // section 8.7 to 8.11 of the labbook 202005
![Figure 1: Frequency of each base at the 5\' of the reads.](./figures/plot_fivep_filtering_stat.png){width=600}
</center>
" > report.rmd
Rscript $workflow.projectDir/bin/plot_fivep_filtering_stat.R "${stat}" "${attc_seq}" "${cute}" "plot_fivep_filtering_stat_report.txt"
plot_fivep_filtering_stat.R "${stat}" "${attc_seq}" "${cute_path}" "plot_fivep_filtering_stat_report.txt"
"""
// not space before <center> or # ![. Otherwise not correctly interpreted
// single quotes required because of the !
......@@ -246,7 +246,7 @@ process plot_read_length_ini { // section 8.8 of the labbook 20200520
input:
file length from length_fastq_ini_ch
val cute from cute_path
val cute_path
output:
file "plot_read_length_ini.png" into fig_ch2
......@@ -261,7 +261,7 @@ process plot_read_length_ini { // section 8.8 of the labbook 20200520
![Figure 1: Frequency of reads according to read size (in bp).](./figures/plot_read_length_ini.png){width=600}
</center>
' > report.rmd
Rscript $workflow.projectDir/bin/plot_read_length.R "${length}" "ini" "${cute}" "plot_read_length_ini_report.txt"
plot_read_length.R "${length}" "ini" "${cute_path}" "plot_read_length_ini_report.txt"
"""
// single quotes required because of the !
}
......@@ -275,7 +275,7 @@ process plot_read_length_fivep_filtering { // section 8.12 of the labbook 202005
input:
file length from length_fastq_5p_filter_ch
val cute from cute_path
val cute_path
output:
file "plot_read_length_fivep_filtering.png" into fig_ch3
......@@ -290,7 +290,7 @@ process plot_read_length_fivep_filtering { // section 8.12 of the labbook 202005
![Figure 2: Frequency of reads according to read size (in bp).](./figures/plot_read_length_fivep_filtering.png){width=600}
</center>
' > report.rmd
Rscript $workflow.projectDir/bin/plot_read_length.R "${length}" "fivep_filtering" "${cute}" "plot_read_length_fivep_filtering_report.txt"
plot_read_length.R "${length}" "fivep_filtering" "${cute_path}" "plot_read_length_fivep_filtering_report.txt"
"""
// single quotes required because of the !
}
......@@ -325,7 +325,7 @@ process plot_read_length_cutoff { // section 8.17 of the labbook 20200520
input:
file length from length_cutoff_ch
val cute from cute_path
val cute_path
output:
file "plot_read_length_cutoff.png" into fig_ch4
......@@ -340,7 +340,7 @@ process plot_read_length_cutoff { // section 8.17 of the labbook 20200520
![Figure 3: Frequency of reads according to read size (in bp).](./figures/plot_read_length_cutoff.png){width=600}
</center>
' > report.rmd
Rscript $workflow.projectDir/bin/plot_read_length.R "${length}" "cutoff" "${cute}" "plot_read_length_cutoff_report.txt"
plot_read_length.R "${length}" "cutoff" "${cute_path}" "plot_read_length_cutoff_report.txt"
"""
// single quotes required because of the !
}
......@@ -574,7 +574,7 @@ process plot_coverage { // section 24.6 of the labbook 20200707
val ter_coord
val color_coverage
val xlab
val cute from cute_path
val cute_path
output:
file "plot_${cov.baseName}.png" into fig_ch5 // warning: several files
......@@ -582,7 +582,7 @@ process plot_coverage { // section 24.6 of the labbook 20200707
script:
"""
Rscript $workflow.projectDir/bin/plot_coverage.R "${cov.baseName}" "${read_nb}" "${ori_coord}" "${ter_coord}" "${color_coverage}" "${xlab}" "${file_name}" "${cute}" "plot_coverage_report.txt"
plot_coverage.R "${cov.baseName}" "${read_nb}" "${ori_coord}" "${ter_coord}" "${color_coverage}" "${xlab}" "${file_name}" "${cute_path}" "plot_coverage_report.txt"
"""
// single quotes required because of the !
}
......@@ -650,7 +650,7 @@ process plot_insertion { // sections 24.7.2, 44.1 and 45.1 of the labbook 202005
val ter_coord
val xlab
val genome_size
val cute from cute_path
val cute_path
output:
file "*.png" into fig_ch6
......@@ -662,7 +662,7 @@ process plot_insertion { // sections 24.7.2, 44.1 and 45.1 of the labbook 202005
script:
"""
echo -e "<br /><br />\\n\\n### Insertion plots\\n\\n" > report.rmd
Rscript $workflow.projectDir/bin/plot_insertion.R "${pos}" "${ori_coord}" "${ter_coord}" "${xlab}" "${genome_size}" "${file_name}" "${cute}" "plot_insertion_report.txt"
plot_insertion.R "${pos}" "${ori_coord}" "${ter_coord}" "${xlab}" "${genome_size}" "${file_name}" "${cute_path}" "plot_insertion_report.txt"
pos_nb=\$(wc -l ${file_name}.pos | cut -f1 -d' ')
echo -e "\\n\\nNumber of different positions: \$(printf "%'d" \${pos_nb})\\n" >> report.rmd
echo -e "\\n\\nSee the CL Labbook section 24.7.3 to explain the limitation around 100 bp\\n" >> report.rmd
......@@ -740,7 +740,7 @@ process print_report { // section 8.8 of the labbook 20200520
input:
val file_name
val cute from cute_path
val cute_path
file report from log_ch0.concat(log_ch1,log_ch2, log_ch3, log_ch4, log_ch5, log_ch6, log_ch7, log_ch8, log_ch9, log_ch10, log_ch11, log_ch12, log_ch13, log_ch14, log_ch15, log_ch16, log_ch17, log_ch18, log_ch19).collectFile(name: 'report.rmd', sort: false)
tuple val ("stat_tempo_name"), file ("stat_tempo") from stat_fastq_5p_filter_ch2
file "plot_fivep_filtering_stat" from fig_ch1
......@@ -769,7 +769,7 @@ process print_report { // section 8.8 of the labbook 20200520
cp ${png} ./figures/ # Warning several files are copied using their initial names, i.e., the names they have in each work folders of the plot_coverage process
cp ${png2} ./figures/ # Warning several files
cp ${plot_read_length_cutoff} ./reports/nf_dag.png # trick to delude the knitting during the print report
print_report.R "${cute}" "report_file.rmd" "print_report.txt"
print_report.R "${cute_path}" "report_file.rmd" "print_report.txt"
"""
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment