Edinburgh-Genome-Foundry / DnaFeaturesViewer

:eye: Python library to plot DNA sequence features (e.g. from Genbank files)
https://edinburgh-genome-foundry.github.io/DnaFeaturesViewer/
MIT License
584 stars 90 forks source link

sequences display from 1 not 0 ? #77

Open taoym470 opened 1 year ago

taoym470 commented 1 year ago

Hello!

So many thanks for this wonderful tool! It would be much better if the sequences display from 1 not 0.

Zulko commented 1 year ago

This is because it uses Biopython indexing (from 0) by default. For genbank-type indexing (starting at 1) this should work:

my_graphic_record.plots_indexing == 'genbank'
my_graphic_record.plot(...)

See the docs:

    plots_indexing
      Indicates which standard to use to show nucleotide indices in the plots.
      If 'biopython', the standard python indexing is used (starting at 0).
      If 'genbank', the indexing follows the Genbank standard (starting at 1).