Commit 7a6b19cc authored by aknecht2's avatar aknecht2
Browse files

Added documentation for all scripts used in chipathlon.

parent cff94bb8
......@@ -2,7 +2,7 @@
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -Ea
SPHINXBUILD = sphinx-build
SPHINXPROJ = chipathlon
SOURCEDIR = source
......@@ -17,4 +17,4 @@ help:
# 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)
\ No newline at end of file
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
......@@ -34,7 +34,8 @@ import sphinx_rtd_theme
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosectionlabel'
'sphinx.ext.autosectionlabel',
'sphinxarg.ext'
]
# Add any paths that contain templates here, relative to this directory.
......
......@@ -5,11 +5,31 @@ Scripts
chip-gen
^^^^^^^^
.. argparse::
:filename: source/scripts/chip-gen
:func: parser
:prog: chip-gen
chip-create-run
^^^^^^^^^^^^^^^
.. argparse::
:filename: source/scripts/chip-create-run
:func: parser
:prog: chip-create-run
chip-meta-download
^^^^^^^^^^^^^^^^^^^
.. argparse::
:filename: source/scripts/chip-meta-download
:func: parser
:prog: chip-meta-download
chip-meta-import
^^^^^^^^^^^^^^^^^
.. argparse::
:filename: source/scripts/chip-meta-import
:func: parser
:prog: chip-meta-import
#!/usr/bin/env python
from chipathlon.db import MongoDB
import chipathlon.conf
import argparse
import yaml
import pprint
parser = argparse.ArgumentParser(description="Create a run file from a list of experiment accessions.")
parser.add_argument("-H", "--host", dest="host", required=True, help="Database host.")
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-n", "--name", dest="name", required=True, help="Name of the run file to create.")
parser.add_argument("-f", "--file_type", dest="file_type", default="fastq", help="Type of files to extract (fastq or bam).")
parser.add_argument("-a", "--accessions", dest="accessions", nargs="+", required=True, help="List of experiment accessions to load.")
#!/usr/bin/env python
from chipathlon.workflow import Workflow
import argparse
import yaml
import pprint
parser = argparse.ArgumentParser(description="Generates a workflow from a run, param & config file.")
parser.add_argument("-H", "--host", dest="host", required=True, help="Database host.")
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-d", "--dir", dest="dir", required=True, help="Directory name to generate files in.")
parser.add_argument("--param", dest="param", required=True, help="Path to param file to load.")
parser.add_argument("--conf", dest="config", required=True, help="Path to config file to load.")
parser.add_argument("--run", dest="run", required=True, help="Path to run file to load.")
parser.add_argument("--rewrite", dest="rewrite", default=False, action="store_true", help="If specified, don't load from the database, rewrite files.")
parser.add_argument("--debug", dest="debug", default=False, action="store_true", help="Print out more information while generating.")
#!/usr/bin/env python
import argparse
import json
import sys
from chipathlon.utils import progress
import requests
import urlparse
import os.path
import os
import datetime
parser = argparse.ArgumentParser(description="Download raw JSON for all experiments.")
parser.add_argument("-o", "--output-dir", dest="outputdir", default=os.getcwd(), help="Output directory. (default: %(default)s)")
#!/usr/bin/env python
from pymongo import MongoClient
import argparse
import json
import sys
from chipathlon.utils import progress
import os
import os.path
parser = argparse.ArgumentParser(description="Read per-experiment JSON files and create experiment and samples collections.")
parser.add_argument("-H", "--host", dest="host", default="hcc-anvil-175-9.unl.edu", help="Database host. (default: %(default)s)")
parser.add_argument("-u", "--username", dest="username", default="aknecht", required=True, help="Database user. (default: %(default)s)")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-i", "--input-dir", dest="inputdir", default=os.getcwd(), help="Directory containing per-experiment JSON files. (default: %(default)s)")
parser.add_argument("-d", "--drop", dest="drop", default=False, action="store_true", help="Drop data if it exists. (default: %(default)s)")
parser.add_argument("-s", "--samples", dest="samples", default=False, action="store_true", help="Only recreate the samples collection.")
......@@ -5,12 +5,12 @@ import argparse
import yaml
import pprint
parser = argparse.ArgumentParser(description="Create run file from a list of experiment ids.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser = argparse.ArgumentParser(description="Create a run file from a list of experiment accessions.")
parser.add_argument("-H", "--host", dest="host", required=True, help="Database host.")
parser.add_argument("-n", "--name", dest="name", required=True, help="Name of run file to save.")
parser.add_argument("-f", "--file_type", dest="file_type", default="fastq", help="Type of files to extract.")
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-n", "--name", dest="name", required=True, help="Name of the run file to create.")
parser.add_argument("-f", "--file_type", dest="file_type", default="fastq", help="Type of files to extract (fastq or bam).")
parser.add_argument("-a", "--accessions", dest="accessions", nargs="+", required=True, help="List of experiment accessions to load.")
args = parser.parse_args()
......
......@@ -5,9 +5,9 @@ import yaml
import pprint
parser = argparse.ArgumentParser(description="Generates a workflow from a run, param & config file.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser.add_argument("-H", "--host", dest="host", required=True, help="Database host.")
parser.add_argument("-u", "--username", dest="username", required=True, help="Database user.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-d", "--dir", dest="dir", required=True, help="Directory name to generate files in.")
parser.add_argument("--param", dest="param", required=True, help="Path to param file to load.")
parser.add_argument("--conf", dest="config", required=True, help="Path to config file to load.")
......
......@@ -9,9 +9,9 @@ import os
import os.path
parser = argparse.ArgumentParser(description="Read per-experiment JSON files and create experiment and samples collections.")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-u", "--username", dest="username", default="aknecht", required=True, help="Database user. (default: %(default)s)")
parser.add_argument("-H", "--host", dest="host", default="hcc-anvil-175-9.unl.edu", help="Database host. (default: %(default)s)")
parser.add_argument("-u", "--username", dest="username", default="aknecht", required=True, help="Database user. (default: %(default)s)")
parser.add_argument("-p", "--password", dest="password", required=True, help="Database user password.")
parser.add_argument("-i", "--input-dir", dest="inputdir", default=os.getcwd(), help="Directory containing per-experiment JSON files. (default: %(default)s)")
parser.add_argument("-d", "--drop", dest="drop", default=False, action="store_true", help="Drop data if it exists. (default: %(default)s)")
parser.add_argument("-s", "--samples", dest="samples", default=False, action="store_true", help="Only recreate the samples collection.")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment