Mercurial > repos > lparsons > cutadapt
comparison cutadapt_galaxy_wrapper.py @ 3:7ed26fc9fa8a
Updated for cutadapt 0.9.4, no longer need python wrapper
author | Lance Parsons <lparsons@princeton.edu> |
---|---|
date | Wed, 25 May 2011 18:54:09 -0400 |
parents | 8b064ea16722 |
children |
comparison
equal
deleted
inserted
replaced
2:f6b94b76d16b | 3:7ed26fc9fa8a |
---|---|
12 [-n count] | 12 [-n count] |
13 [-O overlap_length] | 13 [-O overlap_length] |
14 [--discard discard trimmed reads] | 14 [--discard discard trimmed reads] |
15 [-m minimum read length] | 15 [-m minimum read length] |
16 [-M maximum read length] | 16 [-M maximum read length] |
17 [-q quality cutoff] | |
17 [-h,--help] [-v,--verbose] [--version] | 18 [-h,--help] [-v,--verbose] [--version] |
18 | 19 |
19 DESCRIPTION | 20 DESCRIPTION |
20 | 21 |
21 Wrapper for cutadapt running as a galaxy tool | 22 Wrapper for cutadapt running as a galaxy tool |
62 params.append("--discard") | 63 params.append("--discard") |
63 if options.minimum_length != None: | 64 if options.minimum_length != None: |
64 params.append("-m %s" % options.minimum_length) | 65 params.append("-m %s" % options.minimum_length) |
65 if options.maximum_length != None: | 66 if options.maximum_length != None: |
66 params.append("-M %s" % options.maximum_length) | 67 params.append("-M %s" % options.maximum_length) |
68 if options.cutoff != None: | |
69 params.append("-q %s" % options.cutoff) | |
70 | |
67 | 71 |
68 # cutadapt relies on the extension to determine file format: .fasta or .fastq | 72 # cutadapt relies on the extension to determine file format: .fasta or .fastq |
69 input_name = '.'.join((options.input,options.format)) | 73 input_name = '.'.join((options.input,options.format)) |
70 # make temp directory | 74 # make temp directory |
71 tmp_dir = tempfile.mkdtemp() | 75 tmp_dir = tempfile.mkdtemp() |
105 parser.add_option ('-n', '--times', dest='count', help='Try to remove adapters COUNT times') | 109 parser.add_option ('-n', '--times', dest='count', help='Try to remove adapters COUNT times') |
106 parser.add_option ('-O', '--overlap', dest='overlap_length', help='Minimum overlap length') | 110 parser.add_option ('-O', '--overlap', dest='overlap_length', help='Minimum overlap length') |
107 parser.add_option ('--discard', '--discard-trimmed', dest='discard_trimmed', action='store_true', default=False, help='Discard reads that contain the adapter') | 111 parser.add_option ('--discard', '--discard-trimmed', dest='discard_trimmed', action='store_true', default=False, help='Discard reads that contain the adapter') |
108 parser.add_option ('-m', '--minimum-length', dest='minimum_length', help='Discard reads that are shorter than LENGTH') | 112 parser.add_option ('-m', '--minimum-length', dest='minimum_length', help='Discard reads that are shorter than LENGTH') |
109 parser.add_option ('-M', '--maximum-length', dest='maximum_length', help='Discard reads that are longer than LENGTH') | 113 parser.add_option ('-M', '--maximum-length', dest='maximum_length', help='Discard reads that are longer than LENGTH') |
114 parser.add_option ('-q', '--quality-cutoff', dest='cutoff', help='Trim | |
115 low quality ends from reads before adapter removal') | |
110 parser.add_option ('-o', '--output', dest='output_file', help='The modified sequences are written to the file') | 116 parser.add_option ('-o', '--output', dest='output_file', help='The modified sequences are written to the file') |
111 (options, args) = parser.parse_args() | 117 (options, args) = parser.parse_args() |
112 if options.input == None: | 118 if options.input == None: |
113 stop_err("Misssing option --input") | 119 stop_err("Misssing option --input") |
114 if options.output_file == None: | 120 if options.output_file == None: |