- Install conda, if not already installed, from here.
- Create a conda environment and activate.
conda env create -f env.yml conda activate selectiveseq
- Install Metagraph prerequisites from here. In particular,
libboost-all-dev(Ubuntu/Debian) must be installed system-wide (sudo apt-get install libboost-all-dev) -- a conda-only Boost is not enough, since metagraph's CLI/server build needs static Boost libs, which conda'sboost-cpppackage doesn't ship.setup.shtries to install this automatically if it's missing and passwordlesssudois available; otherwise it skips the metagraph CLI build with a warning (thepymetagraphpython bindings are unaffected and still get installed). - Clone repo and setup.
git clone <experiments repo> cd NASExperiments chmod +x setup.sh ./setup.sh
- By default,
ont-pybasecall-client-lib=7.11.2andont-pyguppy-client-lib=6.5.7are installed in the environment. To check if they are compatible with the basecaller vesion, run/opt/ont/dorado/bin/dorado_basecall_server --versionand, if required, download the appropriate client library from here if you have Dorado 7.3.0 onwards or here if you have Guppy or Dorado upto version 7.2.x. setup.shdoes not set upont-dorado-server, since it is ONT's vendored Dorado/Guppy basecall server binary distribution, gated behind an ONT community login. Download the Linux server package matching your basecaller version and extract it tocode/ont-dorado-server/.
In the experiments folder, so the following:
- Create a script (say
my_tasks.sh) as follows. Use the variablesOUTDIRfor output files andTMPDIRfor temporary files. This script will be imported by another script (task_runner.sh) and these variables would be defined in it. The functions should be calledfn(n = 1, 2, 3, ...) and defineALL_TASKS="1-n". Collinearity, Metagraph, Spumoni, and Rawhash executable paths are all exported intask_runner.sh.
ALL_TASKS="1-3"
f1() {
# task 1
Collinearity ...
}
f2() {
# task 2
metagraph ...
}
f3() {
# task 3
spumoni ...
}- Run the tasks using task runner as follows:
# Run all tasks from 'my_tasks.sh'
./task_runner.sh -t my_tasks.sh
# Can also omit the .sh extension from task file
./task-runner.sh -t my_tasks
# Run tasks 1-2 from the 'my_tasks.sh' file
./task_runner.sh -t my_tasks 1-2
# Run ./task_runner.sh -h for other formats to specify task numbers- The stdout and stderr logs are written in a file
{TASK_NAME}_MMMDD_HHMMSS.log. - The output directory variable
OUTDIRpoints toNASExperiments/out TMPDIRpoints toNASExperiments/tmp
Run the server -
mksimserver --certs /scratch/NASExperiments/code/MinknoApiSimulator/certs \
--input /data/SimulatedDatasets/Zymo/signals/Sigs0_450.blow5 \
--input /data/SimulatedDatasets/Zymo/signals/Sigs1_450.blow5On a different shell, run Readfish (assuming the .toml file is validated using readfish validate)-
export MINKNOW_API_USE_LOCAL_TOKEN="no"
export MINKNOW_SIMULATOR="true"
export MINKNOW_TRUSTED_CA=/scratch/NASExperiments/code/MinknoApiSimulator/certs/server.pem
export MINKNOW_API_CLIENT_CERTIFICATE_CHAIN=/scratch/NASExperiments/code/MinknoApiSimulator/certs/client.pem
export MINKNOW_API_CLIENT_KEY=/scratch/NASExperiments/code/MinknoApiSimulator/certs/client.key
readfish targets --wait-for-ready 5 \
--toml /scratch/NASExperiments/configs/rf_mm_zymo.toml \
--port 50051 --device MN12345 \
--log-file /scratch/NASExperiments/logs/readfish_test.log \
--experiment-name 'test.log'Or run the NASExperiments/scripts/simulate_run.sh script after editing the following lines:
INPUT_SIGNAL=(
...
)
CONFIG_TOML=...Readfish creates a test_run_readfish.tsv file in the directory where its invoked. It contains the decision taken for each read. Two additional files are created in NASExperiments/logs - readfish_MMMDD_hhmmss.log and server_MMMDD_hhmmss.log which contains the stdout and stderr logs for readfish and mksimserver respectively.