Skip to content

Commit

Permalink
updates to doc; syncing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianmordig committed Oct 6, 2023
1 parent 90441f0 commit 51be8d9
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
pip install tox
tox run -e py310
-
name: Build and push
name: Push docker image
uses: docker/build-push-action@v4
id: Push
with:
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pip install ont_project/
pip install --upgrade seaborn
```

Take a look at the directory [usecase](usecases/) to run some example usecases.

If the installation fails due to dependency issues, you can alternatively run it as a Docker image that comes with the dependencies and runs Jupyter lab:
```{bash}
# to update the Docker image if a new one was published
Expand All @@ -100,10 +102,6 @@ conda create -y -n ont_project_venv python=3.10 pip
```
Some scripts activate the virtual environment, so you have to change it to `conda activate ont_project_venv`.

## Usecases

Take a look at the directory [usecase](usecases/), in particular [enrich_usecase](usecases/enrich_usecase.py) which combines the simulator with ReadFish (and optionally NanoSim).

### Comparison with UNCALLED

We tried comparing with UNCALLED, but it didn't work due to a segmentation fault without any useful error message, see [uncalled_comparison](uncalled_comparison.md) for details.
Expand Down
1 change: 1 addition & 0 deletions usecases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pip install -e './[readfish]'
# git submodule update --init --depth 1 external/ont_nanosim
# bash usecases/install_usecase_deps.sh
# adapt config in ~/ont_project_all/ont_project/usecases/configs/ to fit your setup
~/ont_project_all/ont_project/usecases/replicate_run_submission.sh "sampler_per_rolling_window_channel"
~/ont_project_all/ont_project/usecases/enrich_usecase_submission.sh
```
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Used for Docker workflow pipeline
3 changes: 0 additions & 3 deletions usecases/configs/enrich_usecase/dummy/README.md

This file was deleted.

28 changes: 0 additions & 28 deletions usecases/configs/enrich_usecase/dummy/constant_gaps/config.toml

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions usecases/configs/enrich_usecase/dummy/random/config.toml

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions usecases/configs/enrich_usecase/dummy/replication/config.toml

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Used to enrich chr20, 21 from the human genome

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Config to test the setup
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
run_dir = "simulator_run" # where reads, logs, pafs etc. will be written to
n_channels = 512
# n_channels = 4
n_channels = 5
acceleration_factor = 10
run_duration = 300.0
run_duration = 200

#################################################
# Optional arguments
#################################################

# reads_file = "nanosim_reads/perfect_reads_seed1_aligned_reads.fasta"
ref_genome_path = "data/chm13v2.0_normalized1000000firsttwo.fa.gz"
ref_genome_path = "data/chm13v2.0_normalized.fa.gz"
sim_params_file = "sim_params.dill"
rotating = true
mux_scan_period = 100 # seconds, accounting for acceleration
mux_scan_duration = 10 # seconds
# mux_scan_period = 5400 # 90 minutes
# mux_scan_duration = 100 # seconds

# readfish params
readfish_config_file = "configs/readfish_enrich_chr1.toml"
readfish_config_file = "configs/readfish_enrich_chr2021.toml"
# readfish_method = "unblock_all"
readfish_method = "targeted_seq"

Expand All @@ -25,4 +24,5 @@ readfish_method = "targeted_seq"
#################################################
seqsum_param_extr_file = "data/20190809_zymo_seqsum.txt"
n_channels_full = 512
gap_sampler_type = "sampler_per_window"
# gap_sampler_type = "sampler_per_window"
gap_sampler_type = "sampler_per_rolling_window_channel"
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ host = "ignored"
port = 9999

[conditions]
reference = "data/chm13v2.0_normalized1000000firsttwo.mmi"
# reference = "data/chm13v2.0_normalized.mmi"
reference = "fake_mapper"

[conditions.0]
name = "enrich_chr_1"
name = "enrich_chr_20_21"
control = false
min_chunks = 0 # no decision made whenever <= min_chunks have been received from a read
max_chunks = 12
targets = ["chr1"]
targets = ["chr20", "chr21"]
single_on = "stop_receiving"
multi_on = "stop_receiving"
single_off = "unblock"
Expand Down
1 change: 1 addition & 0 deletions usecases/configs/run_replication/test_config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Config to test the setup
16 changes: 16 additions & 0 deletions usecases/configs/run_replication/test_config/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
run_dir = "simulator_run" # where reads, logs, pafs etc. will be written to
n_channels = 5
run_duration = 10000

#################################################
# Optional arguments
#################################################

sim_params_file = "sim_params.dill"

#################################################
# Parameter extraction arguments
#################################################
seqsum_param_extr_file = "data/20190809_zymo_seqsum.txt"
n_channels_full = 512
gap_sampler_type = "constant_gaps"
31 changes: 0 additions & 31 deletions usecases/enrich_usecase.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,6 @@
source ~/ont_project_all/ont_project_venv/bin/activate
export PATH=~/ont_project_all/tools/bin:$PATH && which minimap2
mkdir dummy_random && cd dummy_random
ln -s ../data .
ln -s ../configs/dummy/random configs
python ~/ont_project_all/ont_project/usecases/enrich_usecase.py
cd ..
mkdir dummy_constant_gaps && cd dummy_constant_gaps
ln -s ../data .
ln -s ../configs/dummy/constant_gaps configs
python ~/ont_project_all/ont_project/usecases/enrich_usecase.py
cd ..
mkdir dummy_replication && cd dummy_replication
ln -s ../data .
ln -s ../configs/dummy/replication configs
python ~/ont_project_all/ont_project/usecases/enrich_usecase.py
cd ..
mkdir dummy_sampler_per_window && cd dummy_sampler_per_window
ln -s ../data .
ln -s ../configs/dummy/sampler_per_window configs
python ~/ont_project_all/ont_project/usecases/enrich_usecase.py
# Press Ctrl+C to stop script, then plots are created
cd ..
mkdir full_run_sampler_per_window && cd full_run_sampler_per_window
ln -s ../data .
ln -s ../configs/full_run/sampler_per_window configs
python ~/ont_project_all/ont_project/usecases/enrich_usecase.py
cd ..
mkdir full_genome_run_sampler_per_window && cd full_genome_run_sampler_per_window
ln -s ../data .
ln -s ../configs/full_genome_run/sampler_per_window configs
Expand Down

0 comments on commit 51be8d9

Please sign in to comment.