You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected:
Logs created using a markdown template should include stdout/stderr from R scripts. They should also maintain the line breaks found in the .command.out and .command.err files so the logs are human readable.
Actual:
When creating a process log using a markdown template as outlined here: https://www.nextflow.io/blog/2019/easy-provenance-report.html, the log does not incorporate stdout/stderr from R scripts. Additonally, any included stdout/stderr for any process is output to only a single line in the log which is not human readable, particularly for long running processes.
Includes example workflow and outputs showing issue
Log file was generated using nextflow log last -t log_template.md > log_test.md
Program output
nextflow run main.nf
N E X T F L O W ~ version 20.07.1
Launching `main.nf` [backstabbing_curran] - revision: 7c751f9c5e
executor > local (2)
[af/80ee2c] process > exampleRScript [100%] 1 of 1 ✔
[19/676b67] process > exampleBashScript [100%] 1 of 1 ✔
this is one line
this is another line
this is the last line
rd.csv> ## using count.fields to handle unknown maximum number of fields
rd.csv> ## when fill = TRUE
rd.csv> test1 <- c(1:5, "6,7", "8,9,10")
rd.csv> tf <- tempfile()
rd.csv> writeLines(test1, tf)
rd.csv> read.csv(tf, fill = TRUE) # 1 column
X1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
rd.csv> ncol <- max(count.fields(tf, sep = ","))
rd.csv> read.csv(tf, fill = TRUE, header = FALSE,
rd.csv+ col.names = paste0("V", seq_len(ncol)))
V1 V2 V3
1 1 NA NA
2 2 NA NA
3 3 NA NA
4 4 NA NA
5 5 NA NA
6 6 7 NA
7 8 9 10
rd.csv> unlink(tf)
rd.csv> ## "Inline" data set, using text=
rd.csv> ## Notice that leading and trailing empty lines are auto-trimmed
rd.csv>
rd.csv> read.table(header = TRUE, text = "
rd.csv+ a b
rd.csv+ 1 2
rd.csv+ 3 4
rd.csv+ ")
a b
1 1 2
2 3 4
.command.out (example.sh)
this is one line
this is another line
this is the last line
.command.out (example.R)
rd.csv> ## using count.fields to handle unknown maximum number of fields
rd.csv> ## when fill = TRUE
rd.csv> test1 <- c(1:5, "6,7", "8,9,10")
rd.csv> tf <- tempfile()
rd.csv> writeLines(test1, tf)
rd.csv> read.csv(tf, fill = TRUE) # 1 column
X1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
rd.csv> ncol <- max(count.fields(tf, sep = ","))
rd.csv> read.csv(tf, fill = TRUE, header = FALSE,
rd.csv+ col.names = paste0("V", seq_len(ncol)))
V1 V2 V3
1 1 NA NA
2 2 NA NA
3 3 NA NA
4 4 NA NA
5 5 NA NA
6 6 7 NA
7 8 9 10
rd.csv> unlink(tf)
rd.csv> ## "Inline" data set, using text=
rd.csv> ## Notice that leading and trailing empty lines are auto-trimmed
rd.csv>
rd.csv> read.table(header = TRUE, text = "
rd.csv+ a b
rd.csv+ 1 2
rd.csv+ 3 4
rd.csv+ ")
a b
1 1 2
2 3 4
## exampleRScript
script:
example.R
-
-
exist status: 0
task status: COMPLETED
## exampleBashScript
script:
example.sh
this is one linethis is another linethis is the last line
-
exist status: 0
task status: COMPLETED
Bug report
Expected behavior and actual behavior
Expected:
Logs created using a markdown template should include stdout/stderr from R scripts. They should also maintain the line breaks found in the .command.out and .command.err files so the logs are human readable.
Actual:
When creating a process log using a markdown template as outlined here: https://www.nextflow.io/blog/2019/easy-provenance-report.html, the log does not incorporate stdout/stderr from R scripts. Additonally, any included stdout/stderr for any process is output to only a single line in the log which is not human readable, particularly for long running processes.
Steps to reproduce the problem
MWE can be found here: https://github.com/wclose/nextflow_log
nextflow log last -t log_template.md > log_test.md
Program output
nextflow run main.nf
.command.out (example.sh)
.command.out (example.R)
log_template.md
log_test.md
.nextflow.log
Environment
Additional context
N/A
The text was updated successfully, but these errors were encountered: