Open B3rse opened 3 years ago
Facing the same issue as the OP. Attaching a screenshot for reference.
Any help is much appreciated.
Fixed this error by fixing the path in the src/bamsnap/bamsnap.py file. Fixed the path in lines 122 and 154. I use an old Mac and the solution that worked for me was as below:
Lines 121-123:
img_list += '<a name="'+vid2+'"></a><div class="ic" id="s'+vid2+'"><div `class="text-block"><span` class="it">'+vid + \
'</span></div><img src="' + os.getcwd() + '/' + self.opt['out'] + '/bamsnap_images/' + \
vid2+'.png" alt="'+vid+'" style="width:100%;"></div>'
Lines 153-154:
img_list += '<a name="'+sid+'"></a><div class="ic" id="s'+sid+'"><div class="text-block"><span class="it">' + \
sid+'</span></div><img src="' + os.getcwd() + '/' + self.opt['out'] + '/bamsnap_images/'+vid+'.png" alt="'+sid+'" style="width:100%;"></div>
Lines 121-123:
img_list += '<a name="'+vid2+'"></a><div class="ic" id="s'+vid2+'"><div class="text-block"><span class="it">'+vid + \
'</span></div><img src="../bamsnap_images/' + \
vid2+'.png" alt="'+vid+'" style="width:100%;"></div>'
Lines 153-154:
vid3 = pos1['chrom'] + '_' + str(pos1['t_pos'])
img_list += '<a name="'+sid+'"></a><div class="ic" id="s'+sid+'"><div class="text-block"><span class="it">' + \
sid+'</span></div><img src="../bamsnap_images/'+vid3+'.png" alt="'+sid+'" style="width:100%;"></div>'
I hope this helps. :)
HTML created for multi-sample snaps can't load the snaps. The template is not updated and expects one snap for each sample while the program creates a single snap with all the samples. As a result, the HTML can't load pictures properly.