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
// BUG
myFile = file('./my_file.txt')
myFile.text ='Hello world!\n'// 文件覆写
myFile.append('Add this line\n') // 文件追加
myFile <<'Add a line more\n'// 文件追加println'\n---\nfile1:'print myFile.text
println'\n---\ntest1:'
myFile.withReader {
String line_tmp2
while ( line_tmp2 = it.readLine() ) {
println line_tmp2
}
}
// normal
myFile = file('./my_file.txt')
myFile.text ='Hello world!\n\n'// 文件覆写
myFile.append('Add this line\n') // 文件追加
myFile <<'Add a line more\n'// 文件追加println'\n---\nfile2:'print myFile.text
println'\n---\ntest2:'
myFile.withReader {
String line_tmp2
while ( line_tmp2 = it.readLine() ) {
println line_tmp2
}
}
Expected behavior and actual behavior
(Give an brief description of the expected behavior
and actual behavior)
Output of this program:
---
file1:
Hello world!
Add this line
Add a line more
---
test1:
Hello world!
Add this line
Add a line more
---
file2:
Hello world!
Add this line
Add a line more
---
test2:
Hello world!
The correct output should be:
---
file1:
Hello world!
Add this line
Add a line more
---
test1:
Hello world!
Add this line
Add a line more
---
file2:
Hello world!
Add this line
Add a line more
---
test2:
Hello world!
Add this line
Add a line more
Program output
log file.
.nextflow.log:
Oct-08 04:04:43.054 [main] DEBUG nextflow.cli.Launcher - $> nextflow run /work/work_users/chenjun/pipeline/Notes/how-to-run/nextflow/tutorial-bug.nf
Oct-08 04:04:43.269 [main] INFO nextflow.cli.CmdRun - N E X T F L O W ~ version 21.04.0
Oct-08 04:04:43.316 [main] INFO nextflow.cli.CmdRun - Launching `/work/work_users/chenjun/pipeline/Notes/how-to-run/nextflow/tutorial-bug.nf` [backstabbing_knuth] - revision: 23eca9db8b
Oct-08 04:04:43.469 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; plugins-dir=/home/chenjun/.nextflow/plugins
Oct-08 04:04:43.473 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
Oct-08 04:04:43.478 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins local root: .nextflow/plr/empty
Oct-08 04:04:43.493 [main] INFO org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Oct-08 04:04:43.495 [main] INFO org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Oct-08 04:04:43.505 [main] INFO org.pf4j.DefaultPluginManager - PF4J version 3.4.1 in 'deployment' mode
Oct-08 04:04:43.532 [main] INFO org.pf4j.AbstractPluginManager - No plugins
Oct-08 04:04:43.687 [main] DEBUG nextflow.Session - Session uuid: 70ab4112-ca4f-4de5-b46f-aff26643e6b4
Oct-08 04:04:43.687 [main] DEBUG nextflow.Session - Run name: backstabbing_knuth
Oct-08 04:04:43.691 [main] DEBUG nextflow.Session - Executor pool size: 4
Oct-08 04:04:43.718 [main] DEBUG nextflow.cli.CmdRun -
Version: 21.04.0 build 5552
Created: 02-05-2021 16:22 UTC (03-05-2021 00:22 CDT)
System: Linux 3.10.0-957.el7.x86_64
Runtime: Groovy 3.0.7 on OpenJDK 64-Bit Server VM 1.8.0_152-release-1056-b12
Encoding: UTF-8 (UTF-8)
Process: [email protected] [192.168.241.135]
CPUs: 4 - Mem: 11.9 GB (1.7 GB) - Swap: 2 GB (1.9 GB)
Oct-08 04:04:43.765 [main] DEBUG nextflow.Session - Work-dir: /work/work_users/chenjun/pipeline/Notes/how-to-run/nextflow/work [ext2/ext3]
Oct-08 04:04:43.766 [main] DEBUG nextflow.Session - Script base path does not exist or is not a directory: /work/work_users/chenjun/pipeline/Notes/how-to-run/nextflow/bin
Oct-08 04:04:43.792 [main] DEBUG nextflow.executor.ExecutorFactory - Extension executors providers=[]
Oct-08 04:04:43.816 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Oct-08 04:04:44.208 [main] DEBUG nextflow.Session - Session start invoked
Oct-08 04:04:45.717 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
Oct-08 04:04:45.774 [main] DEBUG nextflow.Session - Workflow process names [dsl1]:
Oct-08 04:04:45.825 [main] INFO nextflow.script.BaseScript -
---
file1:
Oct-08 04:04:45.828 [main] INFO nextflow.script.BaseScript - Hello world!
Add this line
Add a line more
Oct-08 04:04:45.828 [main] INFO nextflow.script.BaseScript -
---
test1:
Oct-08 04:04:45.842 [main] INFO nextflow.script.BaseScript - Hello world!
Oct-08 04:04:45.843 [main] INFO nextflow.script.BaseScript - Add this line
Oct-08 04:04:45.843 [main] INFO nextflow.script.BaseScript - Add a line more
Oct-08 04:04:45.848 [main] INFO nextflow.script.BaseScript -
---
file2:
Oct-08 04:04:45.849 [main] INFO nextflow.script.BaseScript - Hello world!
Add this line
Add a line more
Oct-08 04:04:45.850 [main] INFO nextflow.script.BaseScript -
---
test2:
Oct-08 04:04:45.853 [main] INFO nextflow.script.BaseScript - Hello world!
Oct-08 04:04:45.857 [main] DEBUG nextflow.script.ScriptRunner - > Await termination
Oct-08 04:04:45.858 [main] DEBUG nextflow.Session - Session await
Oct-08 04:04:45.858 [main] DEBUG nextflow.Session - Session await > all process finished
Oct-08 04:04:45.858 [main] DEBUG nextflow.Session - Session await > all barriers passed
Oct-08 04:04:45.887 [main] DEBUG nextflow.trace.WorkflowStatsObserver - Workflow completed > WorkflowStats[succeededCount=0; failedCount=0; ignoredCount=0; cachedCount=0; pendingCount=0; submittedCount=0; runningCount=0; retriesCount=0; abortedCount=0; succeedDuration=0ms; failedDuration=0ms; cachedDuration=0ms;loadCpus=0; loadMemory=0; peakRunning=0; peakCpus=0; peakMemory=0; ]
Oct-08 04:04:46.117 [main] DEBUG nextflow.CacheDB - Closing CacheDB done
Oct-08 04:04:46.240 [main] DEBUG nextflow.script.ScriptRunner - > Execution complete -- Goodbye
Environment
Nextflow version: version 21.04.0 build 5552
Java version: 1.8.0_152-release
Operating system: CentOS Linux release 7.6.1810 (Core)
Bash version: GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
This discussion was converted from issue #2371 on October 07, 2021 20:12.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Bug report
program:
Expected behavior and actual behavior
(Give an brief description of the expected behavior
and actual behavior)
Output of this program:
The correct output should be:
Program output
log file.
.nextflow.log:
Environment
Beta Was this translation helpful? Give feedback.
All reactions