Mercurial > repos > devteam > basecoverage
diff gops_basecoverage.py @ 3:c929b6540d07 draft
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
author | devteam |
---|---|
date | Tue, 13 Oct 2015 12:49:07 -0400 |
parents | 3755ee8a74d7 |
children | 37652c34b3bf |
line wrap: on
line diff
--- a/gops_basecoverage.py Mon Apr 14 09:00:27 2014 -0400 +++ b/gops_basecoverage.py Tue Oct 13 12:49:07 2015 -0400 @@ -6,34 +6,32 @@ -1, --cols1=N,N,N,N: Columns for start, end, strand in first file """ -import sys, traceback, fileinput -from warnings import warn -from bx.intervals import * -from bx.intervals.io import * -from bx.intervals.operations.base_coverage import * +import fileinput +import sys +from bx.intervals.io import NiceReaderWrapper +from bx.intervals.operations.base_coverage import base_coverage from bx.cookbook import doc_optparse -from galaxy.tools.util.galaxyops import * +from bx.tabular.io import ParseError +from galaxy.tools.util.galaxyops import fail, parse_cols_arg, skipped assert sys.version_info[:2] >= ( 2, 4 ) + def main(): - upstream_pad = 0 - downstream_pad = 0 - options, args = doc_optparse.parse( __doc__ ) try: chr_col_1, start_col_1, end_col_1, strand_col_1 = parse_cols_arg( options.cols1 ) in_fname, out_fname = args except: doc_optparse.exception() - + g1 = NiceReaderWrapper( fileinput.FileInput( in_fname ), chrom_col=chr_col_1, start_col=start_col_1, end_col=end_col_1, - strand_col = strand_col_1, + strand_col=strand_col_1, fix_strand=True ) - + try: bases = base_coverage(g1) except ParseError, exc: