Esempio n. 1
0
f_color_v = []
e_color_v = []
lw_v = []

paths, segSeqD, circular_D = vu.parse_cycles_file(args.cycles_file)
path_num = args.path
path = paths[path_num]

if args.reduce_path != [0, 0]:
    isCycle = False
else:
    isCycle = circular_D[path_num]

prev_seg_index_is_adj = vu.adjacent_segs(path, segSeqD, isCycle)
print("PSIIA", prev_seg_index_is_adj)
raw_path_length = vu.get_raw_path_length(path, segSeqD)

bpg_dict, seg_end_pos_d = {}, {}
if args.graph:
    bpg_dict, seg_end_pos_d = vu.parse_BPG(args.graph)

gene_set = set()

if args.gene_subset_file.upper() == "BUSHMAN":
    sourceDir = os.path.dirname(os.path.abspath(__file__))
    args.gene_subset_file = sourceDir + "/resources/Bushman_group_allOnco_May2018.tsv"

if args.gene_subset_file:
    gff = True if args.gene_subset_file.endswith(".gff") else False
    gene_set = vu.parse_gene_subset_file(args.gene_subset_file, gff)
Esempio n. 2
0
print("Unaligned fraction cutoff set to " + str(vu.unaligned_cutoff_frac))
chromosome_colors = vu.get_chr_colors()
plt.clf()
fig, ax = plt.subplots()
patches = []
f_color_v = []
e_color_v = []
lw_v = []

cycles,segSeqD,circular_D = vu.parse_cycles_file(args.cycles_file)
cycle_num = args.cycle
isCycle = circular_D[cycle_num]
cycle = cycles[cycle_num]
prev_seg_index_is_adj = vu.adjacent_segs(cycle,segSeqD,isCycle)
raw_cycle_length = vu.get_raw_path_length(cycle,segSeqD,isCycle,prev_seg_index_is_adj)

bpg_dict,seg_end_pos_d = {},{}
if args.graph:
    bpg_dict,seg_end_pos_d = vu.parse_BPG(args.graph)

gene_set = set()
if args.gene_subset_file:
    gene_set = vu.parse_gene_subset_file(args.gene_subset_file)

# for i,k in seg_end_pos_d.iteritems():
#     print i,k

# print ""
# for i,k in bpg_dict.iteritems():
#     print i,k
Esempio n. 3
0
print("Unaligned fraction cutoff set to " + str(vu.unaligned_cutoff_frac))
chromosome_colors = vu.get_chr_colors()
plt.clf()
fig, ax = plt.subplots()
patches = []
f_color_v = []
e_color_v = []
lw_v = []

cycles, segSeqD, circular_D = vu.parse_cycles_file(args.cycles_file)
cycle_num = args.cycle
isCycle = circular_D[cycle_num]
cycle = cycles[cycle_num]
prev_seg_index_is_adj = vu.adjacent_segs(cycle, segSeqD, isCycle)
raw_cycle_length = vu.get_raw_path_length(cycle, segSeqD)

gene_fontsize = args.gene_fontsize
tick_fontsize = args.tick_fontsize

bpg_dict, seg_end_pos_d = {}, {}
if args.graph:
    bpg_dict, seg_end_pos_d = vu.parse_BPG(args.graph)

gene_set = set()

if args.gene_subset_file.upper() == "BUSHMAN":
    sourceDir = os.path.dirname(os.path.abspath(__file__))
    args.gene_subset_file = sourceDir + "/Bushman_group_allOnco_May2018.tsv"

if args.gene_subset_file and not args.gene_subset_file == "NO":
Esempio n. 4
0
path = paths[path_num]

if args.reduce_path != [0, 0]:
    isCycle = False
else:
    isCycle = circular_D[path_num]

#debug
# vu.reduce_path(path,)
# print "PATH:",path
# print "SEGSEQD",segSeqD

prev_seg_index_is_adj = vu.adjacent_segs(path, segSeqD, isCycle)
print path
print "PSIIA", prev_seg_index_is_adj
raw_path_length = vu.get_raw_path_length(path, segSeqD, False,
                                         prev_seg_index_is_adj)

bpg_dict, seg_end_pos_d = {}, {}
if args.graph:
    bpg_dict, seg_end_pos_d = vu.parse_BPG(args.graph)

gene_set = set()
if args.gene_subset_file:
    gene_set = vu.parse_gene_subset_file(args.gene_subset_file)

elif args.gene_subset_list:
    gene_set = set(args.gene_subset_list)

if not args.om_alignments:
    ref_placements, total_length = construct_path_ref_placements(
        path, segSeqD, raw_path_length, prev_seg_index_is_adj)