diff --git a/.gitignore b/.gitignore index 962d9b6..e841bd5 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.* +. # Compiled python modules. *.pyc @@ -19,5 +19,4 @@ docs/build* *.ipynb # python cache -*/__pycache__/* - +*/__pycache__/* \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index 54feea7..d0c3cbf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,10 +1,10 @@ # Minimal makefile for Sphinx documentation # -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = funpipe +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..6247f7e --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/conf.py b/docs/source/conf.py index a1c18c5..086de5b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -39,6 +39,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'numpydoc', 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', @@ -81,7 +82,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -167,4 +168,4 @@ # -- Options for todo extension ---------------------------------------------- # If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True +todo_include_todos = True \ No newline at end of file diff --git a/docs/source/funpipe.rst b/docs/source/funpipe.rst new file mode 100644 index 0000000..a11fa72 --- /dev/null +++ b/docs/source/funpipe.rst @@ -0,0 +1,109 @@ +funpipe package +=============== + +bam +--- + +.. automodule:: funpipe.bam + :members: + :undoc-members: + :show-inheritance: + +fasta +----- + +.. automodule:: funpipe.fasta + :members: + :undoc-members: + :show-inheritance: + +fastq +----- + +.. automodule:: funpipe.fastq + :members: + :undoc-members: + :show-inheritance: + +gatk +---- + +.. automodule:: funpipe.gatk + :members: + :undoc-members: + :show-inheritance: + +gt_pair +------- + +.. automodule:: funpipe.gt_pair + :members: + :undoc-members: + :show-inheritance: + +microbiome +---------- + +.. automodule:: funpipe.microbiome + :members: + :undoc-members: + :show-inheritance: + +phylo +----- + +.. automodule:: funpipe.phylo + :members: + :undoc-members: + :show-inheritance: + +picard +------ + +.. automodule:: funpipe.picard + :members: + :undoc-members: + :show-inheritance: + +plink +----- + +.. automodule:: funpipe.plink + :members: + :undoc-members: + :show-inheritance: + + +utils +----- + +.. automodule:: funpipe.utils + :members: + :undoc-members: + :show-inheritance: + +vcf +--- + +.. automodule:: funpipe.vcf + :members: + :undoc-members: + :show-inheritance: + +vcfheader +--------- + +.. automodule:: funpipe.vcfheader + :members: + :undoc-members: + :show-inheritance: + +vcfrecord +--------- + +.. automodule:: funpipe.vcfrecord + :members: + :undoc-members: + :show-inheritance: + + diff --git a/docs/source/index.rst b/docs/source/index.rst index 7f6cead..2685aad 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,24 +1,16 @@ .. funpipe documentation master file, created by - sphinx-quickstart on Tue Apr 3 12:01:06 2018. + sphinx-quickstart on Sat Jul 3 23:56:18 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to funpipe's documentation! -=========================================== +=================================== .. toctree:: - :maxdepth: 2 - - Installation - Tutorials - Reference (Python API) - Overview - Datasets - How-To Guides - For Software Developers - Other Resources - Change Log - + :maxdepth: 3 + :caption: Contents: + + funpipe Indices and tables diff --git a/docs/source/modules.rst b/docs/source/modules.rst new file mode 100644 index 0000000..15a07c3 --- /dev/null +++ b/docs/source/modules.rst @@ -0,0 +1,7 @@ +funpipe +======= + +.. toctree:: + :maxdepth: 4 + + funpipe diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000..a96fe5a --- /dev/null +++ b/docs/source/requirements.txt @@ -0,0 +1,9 @@ +# crimson==1.1.0 +# matplotlib==3.7.1 +# numpy==1.24.2 +# pandas==1.5.3 +# scipy==1.10.1 +# seaborn==0.12.2 +# setuptools==65.6.3 +sphinx-rtd-theme==1.2.0 +numpydoc==1.5.0 \ No newline at end of file diff --git a/readthedocs.yml b/readthedocs.yml new file mode 100644 index 0000000..9a008b8 --- /dev/null +++ b/readthedocs.yml @@ -0,0 +1,29 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + # You can also specify other tool versions: + # nodejs: "19" + # rust: "1.64" + # golang: "1.19" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +# formats: +# - pdf + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/source/requirements.txt \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1c2510d..a1ee9ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,10 @@ -include README.md - +crimson==1.1.0 +matplotlib==3.7.1 +numpy==1.24.2 +pandas==1.5.3 +scipy==1.10.1 +seaborn==0.12.2 +setuptools==65.6.3 +# these are auto-doc packages and specify in /docs/source/requirements.txt +# sphinx-rtd-theme==1.2.0 +# numpydoc==1.5.0 \ No newline at end of file diff --git a/scripts/fastqc.py b/scripts/fastqc.py index bd9b1c7..9f9da6a 100755 --- a/scripts/fastqc.py +++ b/scripts/fastqc.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import argparse import os -from funpipe import bam.fastqc, picard +from funpipe.bam import fastqc, picard def bam_fast_qc(bam, ref_fa, out_dir, prefix):