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): reader = Process(target=read_pairs_from_bam, args=(inq, i, hra.bams[i], hra, args.mapq,
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.", ) # -m 2 -w 1000 -M $( cat {input.threshold} ) args = parser.parse_args() if args.infile: asf = HiriseAssembly() asf.load_assembly(args.infile) for segments_file in args.mask: asf.add_mask_regions(filename=segments_file) asf.merge_masked_regions() if args.outfile: of = open(args.outfile, "wt") else: of = sys.stdout for ocontig in asf.ocontigs_iter(): chunk = struct.unpack("<L", hashlib.md5(ocontig.encode("utf-8")).digest()[:4])[0] % args.nchunks if not chunk == args.chunk: continue links = {} asf.get_links([ocontig], skipI=True, mapq=args.mapq, links=links, contigs=False, raw=True) # print(ocontig,chunk,links) process_links(links, args.window, args.min_links, args.max_others, segments=of) of.close()
'-o', '--outfile', default=False, help= "Filename for writing a list of segments on the raw contigs to mask for being promiscuous in linking." ) # -m 2 -w 1000 -M $( cat {input.threshold} ) args = parser.parse_args() if args.infile: asf = HiriseAssembly() asf.load_assembly(args.infile) for segments_file in args.mask: asf.add_mask_regions(filename=segments_file) asf.merge_masked_regions() if args.outfile: of = open(args.outfile, "wt") else: of = sys.stdout for ocontig in asf.ocontigs_iter(): chunk = struct.unpack( "<L", hashlib.md5( ocontig.encode("utf-8")).digest()[:4])[0] % args.nchunks if not chunk == args.chunk: continue links = {} asf.get_links([ocontig], skipI=True, mapq=args.mapq,
parser.add_argument('-i','--infile',help="File containing .hra formatted hirise assembly.") parser.add_argument('-o','--outfile',help="Output file name.") 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): reader = Process(target=read_pairs_from_bam, args=(inq,i,hra.bams[i],hra,args.mapq,args.slice),daemon=False) reader.start()