| 1 |
import argparse |
| 2 |
from pyfastaq import tasks |
| 3 |
|
| 4 |
def run(description): |
| 5 |
parser = argparse.ArgumentParser( |
| 6 |
description = 'Deinterleaves sequence file, so that reads are written alternately between two output files', |
| 7 |
usage = 'fastaq deinterleave [options] <infile> <out_fwd> <out_rev>') |
| 8 |
parser.add_argument('--fasta_out', action='store_true', help='Use this to write output as fasta (default is same as input)', default=False) |
| 9 |
parser.add_argument('infile', help='Name of fasta/q file to be deinterleaved') |
| 10 |
parser.add_argument('out_fwd', help='Name of output fasta/q file of forwards reads') |
| 11 |
parser.add_argument('out_rev', help='Name of output fasta/q file of reverse reads') |
| 12 |
options = parser.parse_args() |
| 13 |
tasks.deinterleave(options.infile, options.out_fwd, options.out_rev, fasta_out=options.fasta_out) |