This is a test version of Biostars. For the public version, visit https://www.biostars.org.
set chromosome width in biopython

Hi, I was trying to draw a single chromosome in biopython.

Everything goes well, except the width of the chromosome in the figure.

I found the output chromosome size is based on the output page size.

Is there any way to restrict the chromosome size except setting page size?

biopython

Are you talking about the Bio.Graphics.BasicChromosome module in Biopython?

1 answer

Assuming you are using the Bio.Graphics.BasicChromosome module, I think you want to set the .chr_percent attribute which defaults to 0.25 (meaning 25% of the available width, based on the page size and the number of chromosomes being drawn). A pull request to improve the documentation here would be welcome. Personally I don't think I ever needed to change it.

Log in to answer this question.