Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the module used to draw the structure of genes in python?

Shulou Source: shulou.com Published: 2022-06-02 03:26:48 10月03日 Update

It is believed that many inexperienced people have no idea about the module used to draw the genetic structure in python. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Use pip directly to install pip install dna_features_viewer

Image.pngimage.png

You can provide annotation files in gff format or genbank format, or you can manually enter the location of each feature of the gene

Try to run one of the examples, image.pngfrom dna_features_viewer import GraphicFeature, GraphicRecord

Features= [

GraphicFeature (start=0, end=20, strand=+1, color= "# ffd700"

Label= "Small feature")

GraphicFeature (start=20, end=500, strand=+1, color= "# ffcccc"

Label= "Gene 1 with a very long name")

GraphicFeature (start=400, end=700, strand=-1, color= "# cffccc"

Label= "Gene 2")

GraphicFeature (start=600, end=900, strand=+1, color= "# ccccff"

Label= "Gene 3")

]

Record = GraphicRecord (sequence_length=1000, features=features)

Record.plot (figure_width=5)

The problem here is how to save the picture.

There are other richer features in visual display, which you can explore again when you have time.

Xiaoming's data Analysis Notebook

Mainly share: 1, R language and python to do data analysis and data visualization of simple small examples; 2, horticultural plant-related transcriptome, genomics, population genetics reading notes; 3, introduction to bioinformatics learning materials and their own learning notes!

The next step is to apply for some original content in order to put together the number of words.

This link has a lot of content about python doing biological information, including a simple version of the genome browser, trying to implement the code again.

Http://dmnfarrell.github.io/

After reading the above, have you mastered the method of the module used to draw the structure of genes in python? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Genes content data notes problems modules structures examples information genomes data analysis methods more formats biology analysis visualization learning helplessness Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS MySQL Apple OPPO Reno Xiaomi