예제 #1
0
def main():
    e = Environment(version=VERSION, doc=__doc__)
    parser = e.argument_parser
    parser.add_argument('--strip-after-barcode', default=1, type=int,
                        help="""strip n bases after the barcode is removed (5' end)
(by default this 1 now, and is ignored if GERALD handled the barcoding)""")
    parser.add_argument('--strip-before-barcode', default=0, type=int,
                        help="""strip n bases before the barcode is removed (5' end)
(by default this 0 now, and is ignored if GERALD handled the barcoding)""")
    parser.add_argument('--min-length', type=int, default=4,
                        help='require sequences to be at least n total bases of non-N sequence (default: ignore)')
    parser.add_argument('--max-length', type=int, default=-1,
                        help='truncate final sequences to n bases (default: ignore)')
    parser.add_argument('--no-gzip', default=False, action='store_true',
                        help = 'Do not gzip output files')
    bgroup = parser.add_argument_group('barcodes',
                                       'Specify sequence barcodes in the sample(s)')
    bgroup.add_argument('-b', '--barcodes', action='append', type=valid_seq,
                        help="Specify a barcode sequence. May be invoked multiple times")
    bgroup.add_argument('--kry-barcodes', dest='barcodes', action='store_const',
                        help='Alias for -bTCAT -bGACG -bAGTC -bCTGA',
                        const=['TCAT', 'GACG', 'AGTC', 'CTGA'])
    parser.add_argument('--linker', default='', type=valid_seq,
                        help="Specify a 3' adaptor/linker sequence that we should clip off of each read")
    parser.add_argument('--collapse', default=False, action='store_true', help='Collapse identical reads')
    parser.set_defaults(**{'target': 'processed'})
    e.set_filename_parser(BarcodeFilenameParser)
    e.set_config_reader(read_config)
    e.set_config_writer(write_config)
    e.do_action(splitter)
    e.do_action(collapser)
예제 #2
0
def main():
    e = Environment(doc=__doc__, version=VERSION)
    parser = e.argument_parser
    parser.add_argument('-g', '--genome-size', dest='user_gsize', default=None,
                        help='Optional user-specified genome size (DEFAULT: '
                             'script will try to auto-detect the genome)')
    parser.add_argument('--path-to-macs',
                        default=path_to_executable("macs2"),
                        help="optional path to macs2 executable")
    parser.add_argument('--no-subpeaks', dest='subpeaks', action='store_false',
                        default=True,
                        help='do not call subpeaks with --call-summits')
    parser.add_argument('-q', '--q-value', dest='qvalue', default='0.01',
                        help='FDR/q-value cutoff (default is 0.01)')
    parser.add_argument('--passthru-args', nargs='*',
                        help='A list of arguments to be passed through to '
                             'MACS2. Substitute + for - (e.g., '
                             '--passthru-args +m 4 50')
    parser.set_defaults(**{'target': 'peaks'})
    e.set_filename_parser(BAMFilenameParser)
    e.set_config_reader(read_setup_file)
    e.set_config_writer(write_setup_file)
    e.do_action(run_macs)