# Convert to dictionary of pyranges objects.
region_sets = {}
region_sets['topics_otsu'] = {}
region_sets['topics_top_3'] = {}
region_sets['DARs'] = {}
for topic in region_bin_topics_otsu.keys():
regions = region_bin_topics_otsu[topic].index[region_bin_topics_otsu[topic].index.str.startswith('chr')] #only keep regions on known chromosomes
print('-----------')
print(pr.PyRanges(region_names_to_coordinates(regions)))
region_sets['topics_otsu'][topic] = pr.PyRanges(region_names_to_coordinates(regions))
for topic in region_bin_topics_top3k.keys():
regions = region_bin_topics_top3k[topic].index[region_bin_topics_top3k[topic].index.str.startswith('chr')] #only keep regions on known chromosomes
region_sets['topics_top_3'][topic] = pr.PyRanges(region_names_to_coordinates(regions))
for DAR in markers_dict.keys():
regions = markers_dict[DAR].index[markers_dict[DAR].index.str.startswith('chr')] #only keep regions on known chromosomes
region_sets['DARs'][DAR] = pr.PyRanges(region_names_to_coordinates(regions))
for key in region_sets.keys():
print(f'{key}: {region_sets[key].keys()}')
It shows error
RuleException:
ValueError in file /vsc-hard-mounts/leuven-data/351/vsc35107/master_thesis/workflow_new/Snakefile02, line 897:
Length mismatch: Expected axis has 0 elements, new values have 3 elements
Could I please ask what is the reason for this kind of error?
Hi,
When I run the code:
It shows error
Could I please ask what is the reason for this kind of error?
Thanks, tingting