Mercurial > repos > rnateam > bctools
diff coords2clnt.py @ 50:0b9aab6aaebf draft
Uploaded 16cfcafe8b42055c5dd64e62c42b82b455027a40
author | rnateam |
---|---|
date | Tue, 26 Jan 2016 04:38:27 -0500 |
parents | de4ea3aa1090 |
children |
line wrap: on
line diff
--- a/coords2clnt.py Sat Dec 19 06:16:22 2015 -0500 +++ b/coords2clnt.py Tue Jan 26 04:38:27 2016 -0500 @@ -1,5 +1,15 @@ #!/usr/bin/env python +import argparse +import logging +from sys import stdout +from pybedtools import BedTool +from pybedtools.featurefuncs import five_prime +# avoid ugly python IOError when stdout output is piped into another program +# and then truncated (such as piping to head) +from signal import signal, SIGPIPE, SIG_DFL +signal(SIGPIPE, SIG_DFL) + tool_description = """ Given coordinates of the aligned reads, calculate positions of the crosslinked nucleotides. Crosslinked nts are assumed to be one nt upstream of the 5'-end of @@ -25,16 +35,6 @@ Status: Testing """ -import argparse -import logging -from sys import stdout -from pybedtools import BedTool -from pybedtools.featurefuncs import five_prime -# avoid ugly python IOError when stdout output is piped into another program -# and then truncated (such as piping to head) -from signal import signal, SIGPIPE, SIG_DFL -signal(SIGPIPE, SIG_DFL) - # parse command line arguments parser = argparse.ArgumentParser(description=tool_description, epilog=epilog,