diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2022-10-10 10:47:43 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2022-10-10 10:47:43 +0800 |
commit | 503a52e2325a1e3c3d47f0cd12ea34a0dbb82cfc (patch) | |
tree | 65c368c3e3dac160bbf517a9ee4560cdcab50701 | |
parent | 0cc41d5838c887bb3f3f272b37abd8220d9d521a (diff) |
QUICKSTART.rst: update section Automating downloading and updating the network.
-rw-r--r-- | brain.documentation/QUICKSTART.rst | 25 | ||||
-rw-r--r-- | index.html | 0 |
2 files changed, 12 insertions, 13 deletions
diff --git a/brain.documentation/QUICKSTART.rst b/brain.documentation/QUICKSTART.rst index c177377..4a5d95f 100644 --- a/brain.documentation/QUICKSTART.rst +++ b/brain.documentation/QUICKSTART.rst @@ -7,7 +7,7 @@ B R A I N :Version: 0.1.6 of 2022-10-09
-*Revision history: 9 June 2017, 22 June 2017, 4 July 2017, 11 July 2017 (created Section Drawing sub-networks), 18 July 2017 (created Section Uploading peak files), 10 October 2017 ('Enter a set of genes' under Section Exploring the network; created Section uRNA), 24 Jan 2018 (Enter 'AT1G24260 AGL9;SEP3 tissue specific tau 1.9' under Section Exploring the network), 3 August 2019 (design considerations), 5 August 2019 (updated create_edges0.py, added a section FAQs), 7 August 2019 (files needed for drawing a scatterplot online), 11 August 2019 (added information for correlation_per_group_fixed_number.R), 22 November 2019 (review and revise the entire content of this documentation), 4 April 2020 (use html_network.py to generate static html pages that contain a gene's regulators and regulatees; use cron job to copy these files to the web application), 6 February 2021 (write a section describing the running environment for brain), 9 October 2022 (remove PARAMETER_FOR from PARAMETER_FOR_BUILDRMATRIX_RENEW_INTERVAL)*
+*Revision history: 9 June 2017, 22 June 2017, 4 July 2017, 11 July 2017 (created Section Drawing sub-networks), 18 July 2017 (created Section Uploading peak files), 10 October 2017 ('Enter a set of genes' under Section Exploring the network; created Section uRNA), 24 Jan 2018 (Enter 'AT1G24260 AGL9;SEP3 tissue specific tau 1.9' under Section Exploring the network), 3 August 2019 (design considerations), 5 August 2019 (updated create_edges0.py, added a section FAQs), 7 August 2019 (files needed for drawing a scatterplot online), 11 August 2019 (added information for correlation_per_group_fixed_number.R), 22 November 2019 (review and revise the entire content of this documentation), 4 April 2020 (use html_network.py to generate static html pages that contain a gene's regulators and regulatees; use cron job to copy these files to the web application), 6 February 2021 (write a section describing the running environment for brain), 9 October 2022 (remove PARAMETER_FOR from PARAMETER_FOR_BUILDRMATRIX_RENEW_INTERVAL, update section Automating downloading and updating the network)*
.. contents::
@@ -130,34 +130,33 @@ In the above three parameter files, the user needs to specify paths to certain f Automating downloading and updating the network
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Instead of manually execute python update_network.py from time to time, we can make a *cron job* for it. To do so,
+Instead of manually execute python update_network.py from time to time, we can schedule a *cron job* for it. To do so,
- In the terminal, type::
crontab -e
-- Append the following line::
+- Append the following lines::
- 59 23 * * * cd /home/lanhui/brain/Code && 'ps -eF | grep python3 | grep update_network' || python3 update_network.py
- 1 6 * * * cd /home/lanhui/brain/Code && python3 download_and_map.py
+ 5 23 * * * cd /home/lanhui/brain/Code && flock -n /tmp/brain.lockfile ./update_network.py
+ 5 1 * * * cd /home/lanhui/brain/Code && python3 update_network_by_force.py
+ 1 6 * * * cd /home/lanhui/brain/Code && python3 download_and_map.py
+update_network.py will run every day at 23:05 pm (if it is not already running).
+update_network_by_force.py will run every day at 1:05 am. update_network_by_force.py does not actually compute edges. It just collects newly generated edges by update_network.py, so it will take much shorter time to finish.
-This makes update_network.py run every day at 23:59pm, and makes download_and_map.py run every day at 6:01am.
+download_and_map.py will run every day at 6:01 am.
-Don't forget to change '/home/lanhui/brain' to the path to your working directory.
-
-The first line in the crontab is too long. The purpose is to run update_network.py only if it is not already running. There is a better method (being used now)::
-
- 59 23 * * * cd /home/lanhui/brain/Code && flock /tmp/brain.lockfile ./update_network.py
+*Don't forget to change '/home/lanhui/brain' to the path to your working directory.*
We should change update_network.py to be executable (chmod u+x update_network.py). Also add a shebang line (#! /usr/bin/python3) on the top of update_network.py.
-update_network.py could take a few days to finish, if there are lots of (e.g. millions) binding evidences to check. In order to harvest updated edges each day, use update_network_by_force.py, which will be only interested in incorporating newly computed edges without actually computing them (computing them is the job of update_network.py).
+update_network.py could take a few days (even weeks) to finish, if there are lots of (e.g. millions) binding evidences to check. In order to harvest updated edges each day, use update_network_by_force.py, which will be only interested in incorporating newly computed edges without actually computing them (computing them is the job of update_network.py).
-The files generated above (i.e., edges.txt, edges.sqlite, and GeneID.html) must be copied to the web application folder for it to work properly::
+The files generated above (i.e., edges.txt, edges.sqlite, and GeneID.html) must be copied to the Web Application folder (/var/www/brain) for it to work properly. Edit the crontab file using the root's account, as follows::
15 9,17 * * * sudo lsof /home/lanhui/brain/Data/temp/edges.txt || sudo cp /home/lanhui/brain/Data/temp/edges.txt /var/www/brain/brain/static/edges/edges.txt
diff --git a/index.html b/index.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/index.html |