Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML created for multi-sample snaps can't load the snaps #21

Open
B3rse opened this issue Mar 2, 2021 · 2 comments
Open

HTML created for multi-sample snaps can't load the snaps #21

B3rse opened this issue Mar 2, 2021 · 2 comments

Comments

@B3rse
Copy link

B3rse commented Mar 2, 2021

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.

@ankit-21
Copy link

Facing the same issue as the OP. Attaching a screenshot for reference.
Screen Shot 2021-11-23 at 11 29 50 AM

Any help is much appreciated.

@ankit-21
Copy link

ankit-21 commented Nov 27, 2021

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:

  • If you want to use absolute paths:

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>
  • If you want to use relative paths:

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants