Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve documentation of cmdline args #79

Merged
merged 1 commit into from
Jan 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def assemble_trinity(inBam, outFasta, clipDb, n_reads=100000, outReads=None):

def parser_assemble_trinity(parser=argparse.ArgumentParser()):
parser.add_argument('inBam',
help='Input reads, BAM format.')
help='Input unaligned reads, BAM format.')
parser.add_argument('clipDb',
help='Trimmomatic clip DB.')
parser.add_argument('outFasta',
Expand Down Expand Up @@ -153,13 +153,13 @@ def order_and_orient(inFasta, inReference, outFasta, inReads=None):

def parser_order_and_orient(parser=argparse.ArgumentParser()):
parser.add_argument('inFasta',
help='Input assembly/contigs, FASTA format.')
help='Input de novo assembly/contigs, FASTA format.')
parser.add_argument('inReference',
help='Reference genome, FASTA format.')
help='Reference genome for ordering, orienting, and merging contigs, FASTA format.')
parser.add_argument('outFasta',
help='Output assembly, FASTA format.')
help='Output assembly, FASTA format, with the same number of chromosomes as inReference, and in the same order.')
parser.add_argument('--inReads', default=None,
help='Input reads in BAM format.')
help='Input reads in unaligned BAM format. These can be used to improve the merge process.')
util.cmd.common_args(parser, (('loglevel',None), ('version',None), ('tmpDir',None)))
util.cmd.attach_main(parser, order_and_orient, split_args=True)
return parser
Expand Down Expand Up @@ -239,9 +239,9 @@ def impute_from_reference(inFasta, inReference, outFasta,

def parser_impute_from_reference(parser=argparse.ArgumentParser()):
parser.add_argument('inFasta',
help='Input assembly/contigs, FASTA format.')
help='Input assembly/contigs, FASTA format, already ordered, oriented and merged with inReference.')
parser.add_argument('inReference',
help='Reference genome, FASTA format.')
help='Reference genome to impute with, FASTA format.')
parser.add_argument('outFasta',
help='Output assembly, FASTA format.')
parser.add_argument("--newName", default=None,
Expand Down Expand Up @@ -329,7 +329,7 @@ def parser_refine_assembly(parser=argparse.ArgumentParser()):
parser.add_argument('inFasta',
help='Input assembly, FASTA format, pre-indexed for Picard, Samtools, and Novoalign.')
parser.add_argument('inBam',
help='Input reads, BAM format.')
help='Input reads, unaligned BAM format.')
parser.add_argument('outFasta',
help='Output refined assembly, FASTA format, indexed for Picard, Samtools, and Novoalign.')
parser.add_argument('--outBam',
Expand Down
3 changes: 3 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ as well::

pip install snakemake==3.2 yappi=0.94

However, most of the real functionality is encapsulated in the command line
tools, which can be used without any of the pipeline infrastructure.

You should either sudo pip install or use a virtualenv (recommended).


Expand Down
19 changes: 10 additions & 9 deletions taxon_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,33 @@ def parser_deplete_human(parser=argparse.ArgumentParser()):
parser.add_argument('inBam',
help='Input BAM file.')
parser.add_argument('revertBam',
help='Output BAM file.')
help='Output BAM: read markup reverted with Picard.')
parser.add_argument('bmtaggerBam',
help='Output BAM file.')
help='Output BAM: depleted of human reads with BMTagger.')
parser.add_argument('rmdupBam',
help='Output BAM file.')
help='Output BAM: bmtaggerBam run through M-Vicuna duplicate removal.')
parser.add_argument('blastnBam',
help='Output BAM file.')
help='Output BAM: rmdupBam run through another depletion of human reads with BLASTN.')
parser.add_argument('--taxfiltBam',
help='Output BAM file.',
help='Output BAM: blastnBam run through taxonomic selection via LASTAL.',
default=None)
parser.add_argument('--bmtaggerDbs', nargs='+', required=True,
help='''Reference databases (one or more) to deplete from input.
For each db, requires prior creation of db.bitmask by bmtool,
and db.srprism.idx, db.srprism.map, etc. by srprism mkindex.''')
parser.add_argument('--blastDbs', nargs='+', required=True,
help='One or more reference databases for blast.')
help='One or more reference databases for blast to deplete from input.')
parser.add_argument('--lastDb',
help='One reference database for last.',
help='One reference database for last (required if --taxfiltBam is specified).',
default=None)
parser.add_argument('--JVMmemory', default = tools.picard.FilterSamReadsTool.jvmMemDefault,
help='JVM virtual memory size (default: %(default)s)')
help='JVM virtual memory size for Picard FilterSamReads (default: %(default)s)')
util.cmd.common_args(parser, (('loglevel', None), ('version', None), ('tmpDir', None)))
util.cmd.attach_main(parser, main_deplete_human)
return parser
def main_deplete_human(args):
'''Run the entire depletion pipeline: bmtagger, mvicuna, blastn, and maybe lastal'''
''' Run the entire depletion pipeline: bmtagger, mvicuna, blastn.
Optionally, use lastal to select a specific taxon of interest.'''
tools.picard.RevertSamTool().execute(args.inBam, args.revertBam,
picardOptions=['SORT_ORDER=queryname', 'SANITIZE=true'])
multi_db_deplete_bam(args.revertBam, args.bmtaggerDbs, deplete_bmtagger_bam, args.bmtaggerBam, JVMmemory=args.JVMmemory)
Expand Down