seg_bar_height + segment_bar_height, "darkorange") # check overlaps of contigs and adjust heights accordingly contig_height_shifts = vu.set_contig_height_shifts(contig_placements, contig_list, -bar_width) # plot contigs cmap plot_cmap_track(contig_placements, total_length, seg_bar_height + contig_bar_height, "cornflowerblue", seg_id_labels=True) # plot alignments plot_alignment(contig_placements, path_seg_placements, total_length) imputed_status = vu.imputed_status_from_aln(aln_vect, len(path)) print("RH", ref_bar_height, "BW", bar_width) plot_ref_genome(ref_placements, path, total_length, segSeqD, imputed_status, args.label_segs, args.color_map, gene_set) if args.graph: plot_bpg_connection(ref_placements, prev_seg_index_is_adj, bpg_dict, seg_end_pos_d) #ax.set_xlim(-(seg_bar_height+1.25), (seg_bar_height+1.25)) #ax.set_ylim(-(seg_bar_height+1.25), (seg_bar_height+1.25)) chrom_set = set() for i in path: chrom_set.add(segSeqD[i[0]][0])
plot_cmap_track(cycle_seg_placements, total_length, outer_bar + segment_bar_height, "darkorange") # check overlaps of contigs and adjust heights accordingly contig_height_shifts = vu.set_contig_height_shifts(contig_placements, contig_list) # plot contigs plot_cmap_track(contig_placements, total_length, outer_bar + contig_bar_height, "cornflowerblue", seg_id_labels=True) # plot alignments plot_alignment(contig_placements, cycle_seg_placements, total_length) imputed_status = vu.imputed_status_from_aln(aln_vect, len(cycle)) plot_ref_genome(ref_placements, cycle, total_length, segSeqD, imputed_status, args.label_segs, gene_set) if args.graph: plot_bpg_connection(ref_placements, cycle, total_length, prev_seg_index_is_adj, bpg_dict, seg_end_pos_d) ax.set_xlim(-(outer_bar + 1.25), (outer_bar + 1.25)) ax.set_ylim(-(outer_bar + 2.5), (outer_bar + 2.5)) chrom_set = set() for i in cycle: chrom_set.add(segSeqD[i[0]][0]) sorted_chrom = sorted(chrom_set, key=lambda x: x.rsplit("chr")[-1])