Closed soungalo closed 3 years ago
Hi, thanks for trying this package out. I think your question has been answered in https://github.com/Edinburgh-Genome-Foundry/DnaFeaturesViewer/issues/34#issuecomment-618324166.
Specifically, you can plot only a section of the record (from start to end):
start = 1000
end = 2000
record = BiopythonTranslator().translate_record(gff_records[0][start:end])
ax, _ = record.plot(figure_width=10, strand_in_label_threshold=7)
see the other thread for details, and please let me know if that solves the problem.
How to use GraphicFeature to change gene color from gff3 files.
Define your biopython translator with a custom set of colours, as described in the documentation: https://github.com/Edinburgh-Genome-Foundry/DnaFeaturesViewer#custom-biopython-translators
then you can use it to read your gff file and plot it.
Suppose I have a gff3 file and I want to plot everything on chr1 positions 1000-2000. Can you please provide some example code? Should I use the BiopythonTranslator class? How exactly? (maybe there should be an example in the documentation). Thanks!