Open sameerh opened 4 years ago
I have not found such option in the docs, but if you remove labels then you can get a plot without labels:
from dna_features_viewer import BiopythonTranslator
graphic_record = BiopythonTranslator().translate_record("example_sequence.gb")
for feature in graphic_record.features:
feature.label = None
graphic_record.plot(figure_width=5)
One way is to redefine compute_feature_label
like in the last example in the Readme. Here is the minimal version:
from dna_features_viewer import BiopythonTranslator
class MyCustomTranslator(BiopythonTranslator):
def compute_feature_label(self, feature):
# display labels for CDS only, no label for other features
return "CDS here" if (feature.type == "CDS") else None
graphic_record = MyCustomTranslator().translate_record("example_sequence.gb")
I have not found such option in the docs, but if you remove labels then you can get a plot without labels:
from dna_features_viewer import BiopythonTranslator graphic_record = BiopythonTranslator().translate_record("example_sequence.gb") for feature in graphic_record.features: feature.label = None graphic_record.plot(figure_width=5)
Hi Veghp and Zulko, Thank you for your help. I will try this. Appreciate your help.
While plotting from genbank file, how to keep the label off?