Skip to content

Commit

Permalink
Combine the two nohup.out files and force the mv command
Browse files Browse the repository at this point in the history
* Combine the nohup files to simplify the logs

* Force the mv command so that the app can still run even if there is a previous run. The app will overwrite the needed files.
  • Loading branch information
arisp99 committed May 9, 2022
1 parent 25ef3b9 commit a51dec5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions docs/guides/analysis-pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ Next, we can run the :ref:`wrangler app <wrangler-app>`:
-s ${sample_sets_used} -c ${cpu_number} -m ${min_capture_length}
The :ref:`wrangler app <wrangler-app>` will save the main outputs as compressed
files in the :code:`wrangler` directory. There will additionally be two
:code:`nohup` files that contain errors and warning messages logged by the
:ref:`wrangler app <wrangler-app>`. These files should be empty if the all went
well. In our example run, both :code:`nohup` files were empty and the main
files in the :code:`wrangler` directory. There will additionally be a
:code:`nohup` file that contains errors and warning messages logged by the
:ref:`wrangler app <wrangler-app>`. This file should be empty if the all went
well. In our example run, the :code:`nohup` file was empty and the main
outputs were aggregated into the three files:

* :code:`run_test_run_wrangled_20220314.txt.gz`
Expand Down
16 changes: 6 additions & 10 deletions src/generate_wrangler_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,13 @@
str(server_num),
str(cpu_count),
str(args["population_fraction_cutoff"]),
">>",
os.path.join(analysis_dir, "nohup.out"),
],
["mv", os.path.join(analysis_dir, "analysis/logs"), analysis_dir],
["mv", os.path.join(analysis_dir, "analysis/scripts"), analysis_dir],
["mv", os.path.join(analysis_dir, "analysis/resources"), analysis_dir],
[
"mv",
os.path.join(analysis_dir, "analysis/nohup.out"),
os.path.join(analysis_dir, "nohup2.out"),
"2>/dev/null ||true",
],
["mv", info_file, renamed_info],
["mv -f", os.path.join(analysis_dir, "analysis/logs"), analysis_dir],
["mv -f", os.path.join(analysis_dir, "analysis/scripts"), analysis_dir],
["mv -f", os.path.join(analysis_dir, "analysis/resources"), analysis_dir],
["mv -f", info_file, renamed_info],
["pigz", "-9", "-p", str(cpu_count), renamed_info],
]
extraction_summary_file = "extractInfoSummary.txt"
Expand Down

0 comments on commit a51dec5

Please sign in to comment.