| 1 |
import argparse |
| 2 |
from pyfastaq import tasks |
| 3 |
|
| 4 |
def run(description): |
| 5 |
parser = argparse.ArgumentParser( |
| 6 |
description = 'Converts CAF file to FASTQ format', |
| 7 |
usage = 'fastaq caf_to_fastq [options] <infile> <outfile>') |
| 8 |
parser.add_argument('infile', help='Name of input CAF file.') |
| 9 |
parser.add_argument('outfile', help='Name of output FASTQ file') |
| 10 |
parser.add_argument('-c', '--clip', action='store_true', help='Use clipping info to clip reads, if present in the input CAF file (as lines of the form "Clipping QUAL start end"). Default is to not clip') |
| 11 |
parser.add_argument('-l', '--min_length', type=int, help='Minimum length of sequence to output [%(default)s]', default=1, metavar='INT') |
| 12 |
options = parser.parse_args() |
| 13 |
|
| 14 |
tasks.caf_to_fastq( |
| 15 |
options.infile, |
| 16 |
options.outfile, |
| 17 |
trim=options.clip, |
| 18 |
min_length=options.min_length |
| 19 |
) |