from __future__ import division from __future__ import print_function from builtins import range from past.utils import old_div from hirise_assembly import HiriseAssembly if __name__=="__main__": import sys import argparse parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('-d','--debug',default=False ,action="store_true",help="Turn on debugging ouput") parser.add_argument('-L','--layout',default=False ,help="A file containing a layout of contigs.") parser.add_argument('-i','--infile',default=False ,help="Filename for serialised assembly input file.") parser.add_argument('-o','--outfile',default=False,help="Filename for writing a list of segments on the raw contigs to mask for being promiscuous in linking.") args = parser.parse_args() if args.infile: asf = HiriseAssembly() asf.load_assembly(args.infile) if args.outfile: f=open(args.outfile,"wt") for contig in asf.contigs_iter(): f.write("{}\t{}\n".format(contig,asf.contig_length(contig)))
parser.add_argument('-H', '--histogram_file', help="Save score histograms to FILE") parser.add_argument('-j', '--nthreads', help="Number of threads.", type=int, default=16) args = parser.parse_args() if args.top: import psutil hra = HiriseAssembly() hra.load_assembly(args.infile) hra.merge_masked_regions(debug=args.debug) print(len(hra.layout_lines)) if len(hra.layout_lines) == 0: print("#make trivial layout") hra.make_trivial_layout_lines(debug=args.debug) ces.set_exp_insert_size_dist_fit_params(hra.model_params) model = ces.model nbams = len(hra.bams) inq = JoinableQueue(maxsize=0) readers = [] for i in range(nbams):
from builtins import range from past.utils import old_div from hirise_assembly import HiriseAssembly # import struct # import hashlib import re if __name__ == "__main__": import sys import argparse parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("-d", "--debug", default=False, action="store_true", help="Turn on debugging ouput") parser.add_argument("-q", "--mapq", default=55, type=float, help="Minimum map quality threshold.") parser.add_argument("-i", "--infile", default=False, help="Filename for serialised assembly input file.") parser.add_argument("-o", "--outfile", default=False, help="Filename for bedfile output.") args = parser.parse_args() if args.infile: hra = HiriseAssembly() hra.load_assembly(args.infile) if args.outfile: of = open(args.outfile, "wt") else: of = sys.stdout hra.read_deserts(mapq=55, outfile=of, min_len=1000)