X-Git-Url: http://woldlab.caltech.edu/gitweb/?a=blobdiff_plain;f=scripts%2Felandseq;fp=scripts%2Felandseq;h=0000000000000000000000000000000000000000;hb=67bb7faa500c2d74358fb128944f899a06d3f0a7;hp=6a5178c935b619c7305b02c1a7ea038deb463a58;hpb=7e62631cfd9d17dad4adc401a38bdaa8d3b3d926;p=htsworkflow.git diff --git a/scripts/elandseq b/scripts/elandseq deleted file mode 100755 index 6a5178c..0000000 --- a/scripts/elandseq +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python -import optparse -import os -import sys - -from htsworkflow.pipelines.eland import extract_eland_sequence - -def make_parser(): - usage = "usage: %prog [options] infile [outfile]" - - parser = optparse.OptionParser(usage) - parser.add_option("-e", "--extract", dest="slice", - default=":", - help="provide a python slice operator to select a portion of an eland file") - return parser - -def main(argv): - parser = make_parser() - - (opt, args) = parser.parse_args(argv) - - if len(args) not in (0, 1, 2): - parser.error('incorrect number of arguments') - - # get our slice coordinates - start, end = opt.slice.split(':') - if len(start) > 0: - start = int(start) - else: - start = None - if len(end) > 0: - end = int(end) - else: - end = None - - # open infile - if len(args) > 0: - instream = open(args[0],'r') - else: - instream = sys.stdin - - if len(args) > 1: - outstream = open(args[1],'w') - else: - outstream = sys.stdout - - extract_eland_sequence(instream, outstream, start, end) - -if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) -