Skip to content

Commit

Permalink
Update README to give Rerio download instructions in the getting star…
Browse files Browse the repository at this point in the history
…ted section.
  • Loading branch information
marcus1487 committed Oct 20, 2020
1 parent 187187a commit ab12eab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
24 changes: 21 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,33 @@ Megalodon is accessed via the command line interface ``megalodon`` command.

# Example command to output basecalls, mappings, and CpG methylation in both per-read (``mod_mappings``) and aggregated (``mods``) formats
# Compute settings: GPU devices 0 and 1 with 40 CPU cores
# For highest accuracy methylation calls see research models in Rerio: https://github.com/nanoporetech/rerio
megalodon raw_fast5s/ \
megalodon \
raw_fast5s/ \
--outputs basecalls mappings mod_mappings mods \
--reference reference.fa --mod-motif Z CG 0 \
--devices 0 1 --processes 40

This command produces the ``megalodon_results`` output directory containing all requested output files and logs.
The format for common outputs is described briefly below and in more detail in the `full documentation <https://nanoporetech.github.io/megalodon/>`_

The above command uses the modified base model included in Guppy (more details below `Guppy Models and Parameters`_).
As more accurate basecalling models are trained, they are first released into the `Rerio repository for research models <https://github.com/nanoporetech/rerio>`_.
Once training pipelines are more thoroughly standardized and tested models will be transferred into Guppy.
The code below shows how to obtain and run the R9.4.1, MinION/GridION, 5mC CpG model (more accurate 5mC CpG methylation results than default model).

::

# Obtain and run R9.4.1, MinION, 5mC CpG model from Rerio
git clone https://github.com/nanoporetech/rerio
rerio/download_model.py rerio/basecall_models/res_dna_r941_min_modbases_5mC_CpG_v001
megalodon \
raw_fast5s/ \
--guppy-params "-d ./rerio/basecall_models/" \
--guppy-config res_dna_r941_min_modbases_5mC_CpG_v001.cfg \
--outputs basecalls mappings mod_mappings mods \
--reference reference.fa --mod-motif m CG 0 \
--devices 0 1 --processes 40

..
The path to the ``guppy_basecall_server`` executable is required to run Megalodon.
Expand Down Expand Up @@ -157,7 +175,7 @@ Megalodon will continue to search for FAST5s until the ``final_summary*`` file i
Guppy Models and Parameters
---------------------------

The Guppy model defines the modified bases capable of being output by Megalodon.
The basecalling model defines the modified bases capable of being output by Megalodon.
Basecalling models must be trained to specifically detect a type or types of modified bases.
See the `Megalodon documentation here <https://nanoporetech.github.io/megalodon/modbase_training.html>`_ for instructions to construct modified base training data and train a new modified base model.

Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
# include 'sphinx.ext.autodoc' for API documentation
extensions = ['sphinx.ext.viewcode',
'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinxarg.ext',
'sphinx.ext.napoleon',]
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel']
mathjax_path = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"

# don't include class inheritence in docs: https://stackoverflow.com/questions/46279030/how-can-i-prevent-sphinx-from-listing-object-as-a-base-class
Expand Down

0 comments on commit ab12eab

Please sign in to comment.