Mercurial > repos > rnateam > bctools
comparison extract_bcs.py @ 50:0b9aab6aaebf draft
Uploaded 16cfcafe8b42055c5dd64e62c42b82b455027a40
author | rnateam |
---|---|
date | Tue, 26 Jan 2016 04:38:27 -0500 |
parents | bb59215dfd8f |
children |
comparison
equal
deleted
inserted
replaced
49:303f6402a035 | 50:0b9aab6aaebf |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | |
3 import argparse | |
4 import logging | |
5 import re | |
6 from sys import stdout | |
7 from Bio.SeqIO.QualityIO import FastqGeneralIterator | |
8 # avoid ugly python IOError when stdout output is piped into another program | |
9 # and then truncated (such as piping to head) | |
10 from signal import signal, SIGPIPE, SIG_DFL | |
11 signal(SIGPIPE, SIG_DFL) | |
2 | 12 |
3 tool_description = """ | 13 tool_description = """ |
4 Exract barcodes from a FASTQ file according to a user-specified pattern. | 14 Exract barcodes from a FASTQ file according to a user-specified pattern. |
5 | 15 |
6 By default output is written to stdout. | 16 By default output is written to stdout. |
16 Copyright: 2015 | 26 Copyright: 2015 |
17 License: Apache | 27 License: Apache |
18 Email: maticzkd@informatik.uni-freiburg.de | 28 Email: maticzkd@informatik.uni-freiburg.de |
19 Status: Testing | 29 Status: Testing |
20 """ | 30 """ |
21 | |
22 import argparse | |
23 import logging | |
24 import re | |
25 from sys import stdout | |
26 from Bio.SeqIO.QualityIO import FastqGeneralIterator | |
27 | |
28 # avoid ugly python IOError when stdout output is piped into another program | |
29 # and then truncated (such as piping to head) | |
30 from signal import signal, SIGPIPE, SIG_DFL | |
31 signal(SIGPIPE, SIG_DFL) | |
32 | 31 |
33 # parse command line arguments | 32 # parse command line arguments |
34 parser = argparse.ArgumentParser(description=tool_description, | 33 parser = argparse.ArgumentParser(description=tool_description, |
35 epilog=epilog, | 34 epilog=epilog, |
36 formatter_class=argparse.RawDescriptionHelpFormatter) | 35 formatter_class=argparse.RawDescriptionHelpFormatter) |