igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
350 stars 52 forks source link

Add utility to change default zoom #112

Closed DevangThakkar closed 3 months ago

DevangThakkar commented 5 months ago

Currently the zoom is set to the default of 40 (I believe this stems from the minimum bases being 39 but I have not verified) such that using only a single position (chr5 474989) results in a 41bp window (chr5:474,969-475,009). I added an argument that allows users to change this value. The default is set to 40, so the current output is maintained in the absence of this argument.

Let me know if you have any comments.

jrobinso commented 5 months ago

There's already a flanking argument, is that no sufficient?

DevangThakkar commented 5 months ago

Yes, I see that. If I understand correctly, that allows the user to have a set number of bases around the location show up in the html file. What this does is actually set the zoom. If you look at the example here, the flanking was set to 1000 and that can seen in the fact that the html contains 500 bases on each side, but the initial zoom is 41. Now consider the attached file where the zoom was added using the --zoom argument and set to 300. The flanking is still 1000. I had to edit the extension to allow uploading but you can change it and see if it makes sense. example_vcf.html.txt

jrobinso commented 5 months ago

OK, I don't have any time for igv-reports at the moment but keep this open.

jrobinso commented 3 months ago

Sorry for the delay. This looks like a good addition. I have just a couple of suggestions.

DevangThakkar commented 3 months ago

That makes sense! I've added in the requested naming changes, and added code to allow for a None default for the argument. Let me know what you think.

jrobinso commented 3 months ago

Looks good