-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
380 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
test | ||
docs/_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"files": ["*/*", "*"], | ||
"command": "conda run -n base sphinx-build . _site", | ||
"showOutput": "false" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.wy-nav-content { | ||
max-width: 100% !important; | ||
} | ||
p { | ||
text-align:justify; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'Easy (minimal) circos plot.' | ||
copyright = '2021, Felipe, Almeida. Easy_circos: Simple script to create a circos plot between FASTA files' | ||
author = 'Felipe Marques de Almeida' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
# | ||
# source_suffix = ['.rst', '.md'] | ||
source_suffix = '.rst' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.mathjax", | ||
"sphinx.ext.viewcode", | ||
"sphinx_copybutton" | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
|
||
# --- default --- | ||
#import sphinx_rtd_theme | ||
#html_theme = 'sphinx_rtd_theme' | ||
|
||
# --- material --- | ||
#import sphinx_materialdesign_theme | ||
#html_theme = "sphinx_materialdesign_theme" | ||
|
||
# --- jupyter --- | ||
#import jupyter_sphinx_theme | ||
#html_theme = "jupyter" | ||
#html_sidebars = {'**': ['sidebartoc.html']} | ||
#html_theme_path = jupyter_sphinx_theme.get_html_theme_path() | ||
|
||
# --- karma --- | ||
html_theme = "karma_sphinx_theme" | ||
|
||
# --- custom css --- | ||
html_title = project | ||
html_static_path = ['_static'] | ||
html_css_files = ['style.css'] | ||
|
||
# Copy button configuration -------------------------------------------------- | ||
# Source: https://sphinx-copybutton.readthedocs.io/en/latest/ | ||
#copybutton_prompt_text = "$ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. _index: | ||
|
||
easy_circos | ||
=========== | ||
|
||
`Easy_circos <https://github.com/fmalmeida/easy_circos>`_ is a simple `conda <https://conda.io/>`_ package that aims on rapidly and easily creating minimal circos configurations templates based on input data so that users can further customize and plot by their own desires. | ||
|
||
Installation | ||
"""""""""""" | ||
|
||
Installation is described in the `github main page <https://github.com/fmalmeida/easy_circos>`_. | ||
|
||
Available features | ||
"""""""""""""""""" | ||
|
||
For now, it can create a circos plot with: | ||
|
||
* Chromosome Ideograms. See `circos manual ideograms <http://circos.ca/documentation/tutorials/ideograms/ideograms/lesson>`_. | ||
* Tick marks of chr lengths. See `circos manual ticks <http://circos.ca/documentation/tutorials/ticks_and_labels/basics/>`_. | ||
* GC Skew plot. | ||
* Tiles and text labels from 2D tracks. Eg. genomic regions. See `circos manual 2D tracks <http://circos.ca/documentation/tutorials/2d_tracks/>`_. | ||
* Similarity links between one or more FASTAs. See `circos manual links <http://circos.ca/documentation/tutorials/links/>`_. | ||
|
||
.. toctree:: | ||
:hidden: | ||
:caption: Kickoff | ||
|
||
quickstart | ||
|
||
.. toctree:: | ||
:hidden: | ||
:caption: Reference book | ||
|
||
manual | ||
|
||
Support Contact | ||
=============== | ||
Whenever a doubt arise feel free to contact me at almeidafmarques@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
.. _manual: | ||
|
||
Manual | ||
====== | ||
|
||
.. code-block:: bash | ||
# Get help in the command line | ||
nextflow run fmalmeida/bacannot-compare --help | ||
Input files | ||
----------- | ||
|
||
This toolkit takes as input a directory containing the results obtained with the `bacannot pipeline <https://github.com/fmalmeida/bacannot>`_ (generally, the ``--outdir`` parameter). | ||
|
||
.. warning:: | ||
|
||
**This toolkit requires that at least two genome annotations are available.** | ||
|
||
.. tip:: | ||
|
||
As described in `the bacannot manual <https://bacannot.readthedocs.io/en/latest/outputs.html>`_, each genome annotation will (or must be) be placed in an individual subdirectory inside the main directory. This subdirectories are generally named with the genome prefixes or the ``--prefix`` parameter. | ||
|
||
.. list-table:: | ||
:widths: 20 10 20 30 | ||
:header-rows: 1 | ||
|
||
* - Arguments | ||
- Required | ||
- Default value | ||
- Description | ||
|
||
* - ``--dir`` | ||
- Y | ||
- NA | ||
- Path to the directory containing the annotation results of the bacannot pipeline. | ||
|
||
Output files | ||
------------ | ||
|
||
.. list-table:: | ||
:widths: 20 10 20 30 | ||
:header-rows: 1 | ||
|
||
* - Arguments | ||
- Required | ||
- Default value | ||
- Description | ||
|
||
* - ``--outdir`` | ||
- N | ||
- By default, they will be placed inside the bacannot main annotation dir. | ||
- Path to the directory to place the analyses results. | ||
|
||
* - ``--prefix`` | ||
- N | ||
- BAC-COMPARE-"${DATE}" | ||
- The name of the output directory. The results dir will be placed inside the ``--outdir``. | ||
|
||
* - ``--force`` | ||
- N | ||
- False | ||
- Force the results to be overwritten when resuming an execution (with ``-resume``). Otherwise, whenever available, nextflow will use the existing results. | ||
|
||
Workflow options | ||
---------------- | ||
|
||
.. list-table:: | ||
:widths: 20 10 10 50 | ||
:header-rows: 1 | ||
|
||
* - Arguments | ||
- Required | ||
- Default value | ||
- Description | ||
|
||
* - ``--threads`` | ||
- N | ||
- 2 | ||
- Set the number of threads to be used by the software. | ||
|
||
* - ``--parallel_jobs`` | ||
- N | ||
- 1 | ||
- Number of jobs to run in parallel. Each job can consume up to N threads (--threads). Default: 1. | ||
|
||
* - ``--all`` | ||
- N | ||
- False | ||
- Activates all analyses. | ||
|
||
* - ``--prokka`` | ||
- N | ||
- False | ||
- Activates prokka annotation comparison with multiqc. | ||
|
||
* - ``--pangenome`` | ||
- N | ||
- False | ||
- Activates the pangenome estimation using roary. | ||
|
||
* - ``--decoder`` | ||
- N | ||
- False | ||
- Activates the KEGG KO annotation comparison with keggdecoder. | ||
|
||
* - ``--phylogeny`` | ||
- N | ||
- False | ||
- Activates the phylogeny estimation using parsnp. | ||
|
||
* - ``--resistance`` | ||
- N | ||
- False | ||
- Activates the AMR annotation comparison. | ||
|
||
* - ``--kleborate`` | ||
- N | ||
- False | ||
- Activates Kleborate/Kaptive analysis (*Klebsiella* genomes). | ||
|
||
BlastFrost option | ||
----------------- | ||
|
||
This optinal process uses a nucleotide fasta file to query the genomes and produce a presence/absence matrix, as well as a Heatmap of the hits. | ||
|
||
.. list-table:: | ||
:widths: 20 10 20 30 | ||
:header-rows: 1 | ||
|
||
* - Arguments | ||
- Required | ||
- Default value | ||
- Description | ||
|
||
* - ``--blastfrost_query`` | ||
- N | ||
- NA | ||
- A nucleotide fasta file containing a list of query genes to be searched in the genomes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. _quickstart: | ||
|
||
Quickstart | ||
========== | ||
|
||
Minimal example | ||
--------------- | ||
|
||
Get the data | ||
"""""""""""" | ||
|
||
To keep things simple and reproducible, let's work with the reference *E. coli* genomes `K12 <https://www.ncbi.nlm.nih.gov/genome?LinkName=nuccore_genome&from_uid=545778205>`_ and `Sakai <https://www.ncbi.nlm.nih.gov/assembly/GCF_000008865.2>`_: | ||
|
||
.. code-block:: bash | ||
## download ecoli genome Sakai | ||
wget \ | ||
https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/008/865/GCF_000008865.2_ASM886v2/GCF_000008865.2_ASM886v2_genomic.fna.gz \ | ||
-O ecoli_sakai.fna.gz && \ | ||
gzip -d ecoli_sakai.fna.gz | ||
## download ecoli genome K12 | ||
wget \ | ||
https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/005/845/GCF_000005845.2_ASM584v2/GCF_000005845.2_ASM584v2_genomic.fna.gz \ | ||
-O ecoli_k12.fna.gz && \ | ||
gzip -d ecoli_k12.fna.gz | ||
Prepare input | ||
""""""""""""" | ||
|
||
Before running the script, we must prepare the CSV that is used as input. This CSV must have: | ||
|
||
* <FASTA PATH>,<PREFIX>,<COLOR> | ||
|
||
We can prepare this csv with: | ||
|
||
.. code-block:: bash | ||
echo "ecoli_k12.fna,K12,purple" > input.fofn | ||
echo "ecoli_sakai.fna,SAKAI,lorange" >> input.fofn | ||
The file must look like this (input.fofn): | ||
|
||
.. code-block:: bash | ||
ecoli_k12.fna,K12,purple | ||
ecoli_sakai.fna,SAKAI,lorange | ||
Create the circos plot | ||
"""""""""""""""""""""" | ||
|
||
With that, we can finally create a minimal circos configuration file and plots having: | ||
|
||
* Ideograms | ||
* Tick marks | ||
* GC Skew | ||
* Similarity links | ||
|
||
.. code-block:: bash | ||
plot_circos --fofn input.fofn | ||
This will create all the circos configuration files and required data files under the ``results`` folder (Can be changed with ``--outdir``). See the created plot: | ||
|
||
|
||
|
||
.. note:: | ||
|
||
Under the ``results/conf`` file you will have all the circos configuration plots. With that, you can further customize and increment the plot as you desire. For that, you must understand circos conf files. `See their manual <http://circos.ca/documentation/tutorials/configuration/configuration_files/>`_ | ||
|
||
Example with 2D tracks | ||
---------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Sphinx==2.2.1 | ||
sphinxcontrib-applehelp==1.0.1 | ||
sphinxcontrib-devhelp==1.0.1 | ||
sphinxcontrib-htmlhelp==1.0.2 | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-qthelp==1.0.2 | ||
sphinxcontrib-serializinghtml==1.1.3 | ||
sphinx_materialdesign_theme | ||
jupyter-sphinx-theme | ||
karma_sphinx_theme | ||
sphinx-copybutton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters