Skip to content

Commit

Permalink
Docs: Fix errors in docs and dosctrings
Browse files Browse the repository at this point in the history
  • Loading branch information
dileep-kishore committed Sep 21, 2023
1 parent cf0c70d commit 208a61f
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 141 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It incorporates various popular, publicly available tools as well as custom Pyth

The MiCoNE framework is introduced in:

Kishore, D., Birzu, G., Hu, Z., DeLisi, C., Korolev, K., & Segrè, D. (2023). Inferring microbial co-occurrence networks from AMPLICON DATA: A systematic evaluation. mSystems. doi:10.1128/msystems.00961-22.
Kishore, D., Birzu, G., Hu, Z., DeLisi, C., Korolev, K., & Segrè, D. (2023). Inferring microbial co-occurrence networks from amplicon data: A systematic evaluation. mSystems. doi:10.1128/msystems.00961-22.

Data related to the publication can be found on Zenodo: https://doi.org/10.5281/zenodo.7051556.

Expand Down Expand Up @@ -70,7 +70,7 @@ Supported subcommands:
3. `clean` - Cleans files from a pipeline run (cleans temporary data, log files and other extraneous files)
4. `validate-results` - Check the results of the pipeline execution

### Initializing the environments
### Installing the environments

In order to run the pipeline various `conda` environments must first be installed on the system.
Use the following comand to initialize all the environments:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ scripts to facilitate inference of co-occurrence networks from 16S data.
The MiCoNE framework is introduced in:

Kishore, D., Birzu, G., Hu, Z., DeLisi, C., Korolev, K., & Segrè, D.
(2023). Inferring microbial co-occurrence networks from AMPLICON DATA: A
(2023). Inferring microbial co-occurrence networks from amplicon data: A
systematic evaluation. mSystems. doi:10.1128/msystems.00961-22.

Data related to the publication can be found on Zenodo:
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
50 changes: 50 additions & 0 deletions docs/example_pipeline.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
=====================================
Example pipeline setup and execution
=====================================

Preliminary setup
-----------------

Before execution of the ``MiCoNE`` pipeline we need to install the environments:

.. code:: sh
micone install
.. note:: This command will take a considerable amount of time (several hours) as MiCoNE will install all the ``conda`` environments

If you wish to install only a subset of the environments, you can specify the environments to install using the ``-e`` option:

.. code:: sh
micone install -e <env1>
The list of supported environments can be found in the :ref:`supported_environments` section.

- micone-cozine
- micone-dada2
- micone-flashweave
- micone-harmonies
- micone-mldm
- micone-propr
- micone-qiime2
- micone-sparcc
- micone-spieceasi
- micone-spring


Network inference workflow
---------------------------

Install the micone conda environment.
Run micone install -e <env> to install all the sub-environments that you need
Run micone init -w full -o <pipeline_dir> to set up the pipeline template. This creates a nextflow workflow template for the full pipeline.
Replace the existing main.nf,nextflow.config and samplesheet.csv files with the ones that I have attached to this email. You will also need to modify some of the files in the pipeline_dir according to these instructions: https://github.com/segrelab/MiCoNE/tree/master#configuration-and-the-pipeline-template
Finally, you can run the pipeline using bash run.sh or qsub run.sh (if running on the cluster)
Note that this workflow is only valid if your biom files already have taxonomy labels assigned. You must run the workflow from the TA step if they do not. Let me know if this is the case.

Other useful references:
All the supported configuration options in table format: https://github.com/segrelab/MiCoNE-pipeline-paper/tree/master/tables/csv
Actual default configuration files used during program execution (copied over when you use the micone init -w full -o <pipeline_dir> command: https://github.com/segrelab/MiCoNE/tree/master/micone/pipelines/configs
Here are example configuration files that were used in the analysis performed for the paper: https://github.com/segrelab/MiCoNE-pipeline-paper/tree/master/scripts/runs

3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ scripts to facilitate inference of co-occurrence networks from 16S data.
The MiCoNE framework is introduced in:

Kishore, D., Birzu, G., Hu, Z., DeLisi, C., Korolev, K., & Segrè, D.
(2023). Inferring microbial co-occurrence networks from AMPLICON DATA: A
(2023). Inferring microbial co-occurrence networks from amplicon data: A
systematic evaluation. mSystems. doi:10.1128/msystems.00961-22.

Data related to the publication can be found on Zenodo:
Expand Down Expand Up @@ -55,6 +55,7 @@ Table of Contents

installation
usage
example_pipeline
data_import_export
modules
contributing
Expand Down
33 changes: 0 additions & 33 deletions docs/micone.pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,6 @@ micone.pipelines.command module
:undoc-members:
:show-inheritance:

micone.pipelines.helpers module
-------------------------------

.. automodule:: micone.pipelines.helpers
:members:
:undoc-members:
:show-inheritance:

micone.pipelines.pipeline module
--------------------------------

.. automodule:: micone.pipelines.pipeline
:members:
:undoc-members:
:show-inheritance:

micone.pipelines.process module
-------------------------------

.. automodule:: micone.pipelines.process
:members:
:undoc-members:
:show-inheritance:

micone.pipelines.template module
--------------------------------

.. automodule:: micone.pipelines.template
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

Expand Down
1 change: 0 additions & 1 deletion docs/micone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Subpackages
.. toctree::
:maxdepth: 4

micone.config
micone.conversion
micone.logging
micone.main
Expand Down
23 changes: 15 additions & 8 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Supported subcommands:
log files and other extraneous files)
4. ``validate-results`` - Check the results of the pipeline execution

Initializing the environments
.. _supported_envs:

Installing the environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In order to run the pipeline various ``conda`` environments must first
Expand All @@ -52,6 +54,7 @@ Or to initialize a particular environment use:
micone install -e "micone-qiime2"
The list of supported environments:

- micone-cozine
- micone-dada2
- micone-flashweave
Expand All @@ -73,8 +76,12 @@ co-occurrence networks):
micone init -w <workflow> -o <path/to/folder>
Other supported pipeline templates are (work in progress): - full - ni -
op_ni - ta_op_ni
Other supported pipeline templates are (work in progress):

- full
- ni
- op_ni
- ta_op_ni

To run the pipeline, update the relevant config files (see next
section), activate the ``micone`` environment and run the ``run.sh``
Expand Down Expand Up @@ -159,7 +166,7 @@ The parameters for the pipeline execution are in the ``micone/pipelines/configs/
The following tables contain the list of default parameters for each step of the pipeline:

Sequence Processing (SP)
^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~

+---------------------+----------------+--------------------------------+---------------------------+------------------+
| Step | Task | Tool | Parameter | Value |
Expand Down Expand Up @@ -195,7 +202,7 @@ Sequence Processing (SP)


Denoising and Clustering (DC)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+------------------+------------------+---------------------+-------------+
| Task | Tool | Parameter | Value |
Expand Down Expand Up @@ -237,7 +244,7 @@ Denoising and Clustering (DC)


Taxonomy Assignment (TA)
^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~

+--------+-------------+---------------+----------------------+
| Task | Tool | Parameter | Value |
Expand All @@ -261,7 +268,7 @@ Taxonomy Assignment (TA)


OTU Processing (OP)
^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~

+-----------+--------------------+-------------------+--------------------------------------------------------------+
| Task | Tool | Parameter | Value |
Expand Down Expand Up @@ -289,7 +296,7 @@ OTU Processing (OP)


Network Inference (NI)
^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~

+-------------+------------------------------+-----------------------+--------------+
| Task | Tool | Parameter | Value |
Expand Down
23 changes: 8 additions & 15 deletions micone/main/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@
import simplejson
from statsmodels.stats.multitest import multipletests

from . import Lineage
from ..validation import (
InteractionmatrixType,
CorrelationmatrixType,
PvaluematrixType,
ObsmetaType,
MetadataModel,
ChildrenmapType,
NodesModel,
CorrelationmatrixType,
ElistType,
InteractionmatrixType,
LinksModel,
MetadataModel,
NetworkmetadataModel,
ElistType,
NodesModel,
ObsmetaType,
PvaluematrixType,
)

from . import Lineage

DType = List[Dict[str, Any]]
LinkDType = Tuple[str, str, Dict[str, float]]
Expand Down Expand Up @@ -76,12 +75,6 @@ class Network:
----------
graph : Union[nx.Graph, nx.DiGraph]
The networkx graph representation of the network
nodes : DType
The list of nodes in the network and their corresponding properties
links : DType
The list of links in the network and their corresponding properties
metadata : Dict[str, Any]
The metadata for the network
Examples
--------
Expand Down
6 changes: 0 additions & 6 deletions micone/main/network_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ class NetworkGroup(Collection):
----------
graph : Union[nx.MultiGraph, nx.MultiDiGraph]
The networkx multi-graph representation of the network
nodes: DType
The list of nodes in the network group
links: DType
The list of links in the network group
contexts: DType
The list of all contexts in the network group
"""

def __init__(self, networks: List[Network], id_field: str = "taxid") -> None:
Expand Down
6 changes: 0 additions & 6 deletions micone/main/otu.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ class Otu:
----------
otu_data : biom.Table
OTU counts table in the `biom.Table` format
sample_metadata : pd.DataFrame
Metadata for the samples
obs_metadata : pd.DataFrame
Lineage data for the observations (OTUs)
tax_level : str
The taxonomy level of the current Otu instance
Notes
-----
Expand Down
Loading

0 comments on commit 208a61f

Please sign in to comment.