Skip to content

Commit

Permalink
Update trackPlot.py
Browse files Browse the repository at this point in the history
Added checks to test is 'chr' should be removed or added to chromosome name when plotting arcs or bedgraph files
  • Loading branch information
fidelram authored Oct 6, 2016
1 parent b7f6d02 commit 750bc0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hicexplorer/trackPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ def plot(self, ax, label_ax, chrom_region, start_region, end_region):
score_list = []
pos_list = []

if chrom_region not in self.interval_tree.keys():
chrom_region = change_chrom_names(chrom_region)

for region in self.interval_tree[chrom_region].find(start_region - 10000,
end_region + 10000):
score_list.append(float(region.value[0]))
Expand Down Expand Up @@ -1622,6 +1625,8 @@ def plot(self, ax, label_ax, chrom_region, region_start, region_end):
max_diameter = 0
count = 0

if chrom_region not in self.interval_tree.keys():
chrom_region = change_chrom_names(chrom_region)
arcs_in_region = self.interval_tree[chrom_region].find(region_start, region_end)

for idx, interval in enumerate(arcs_in_region):
Expand Down

0 comments on commit 750bc0f

Please sign in to comment.