platform: | Unix |
---|---|
synopsis: | Define a lot of functions necessary to draw the logos. |
Print the svg instructions to draw the axis to the output.
Parameters: |
|
---|
Print the svg instructions to draw the four nucleotides in the dense logo with respect to their probability of appearance at the current position, and return the y-coordinate position for the next box where to draw letters.
Parameters: |
|
---|---|
Returns: | The y-coordinate for the next box where to draw letters. |
Return type: | float |
Print the svg instructions to draw an ellipse to the output.
Parameters: |
|
---|---|
Note: | Look at the ellipse statement of an svg file for more information. |
Print the svg instructions to draw the frame of the logo (i.e. Y- and X-axis).
Parameters: |
|
---|
Print the big four nucleotides on the left side of the svg to the output.
Parameters: | output (file) – Stream where to write. |
---|
Print the svg instructions to draw the letter ‘A’ to the output.
Parameters: |
|
---|---|
Note: | The ‘A’ is drawn by creating a red polygon giving the shape and a white internal triangle above to make the bar in the middle of the ‘A’ appear. |
Print the svg instructions to draw the letter ‘C’ to the output.
Parameters: |
|
---|---|
Note: | The ‘C’ is drawn by creating the surrounding ellipse with the right colour and then superposing an smaller white ellipse and a white rectangle on the right side of the ellipe to create the ‘C’. |
Print the svg instructions to draw the letter ‘G’ to the output.
Parameters: |
|
---|---|
Note: | The ‘G’ is drawn by creating a ‘C’ and then adding the two other rectangles. |
Print the svg instructions to draw the letter ‘T’ to the output.
Parameters: |
|
---|---|
Note: | The ‘T’ is drawn by using two rectangles. |
Print the svg instructions to draw the logo to the output.
Parameters: |
|
---|---|
Todo: | raise an error if the logo type is wrong. |
Print the svg instructions to draw the letters of the logo and return the information content to be printed.
Parameters: |
|
---|---|
Note: | The computation of the information content is done within the drawing since it follows the same algorithm computing the emission probabilities. So we do not call the get_information_content method for an algorithmic improvement. |
Print the svg instructions to draw an polygon to the output.
Parameters: |
|
---|---|
Note: | Look at the polygon statement of an svg file for more information. |
Print the svg instructions to draw an rectangle to the output.
Parameters: |
|
---|---|
Note: | Look at the rectangle statement of an svg file for more information. |
Print the svg instruction to writh the ACGT letters at the current position and return the x-coordinate and y-coordinate for the box containing the letters at the next position.
Parameters: |
|
---|---|
Returns: | The coordinates (x, y) of the box that will be drawn with letters at the next position. |
Return type: | tuple (float, float). |
Print the svg instructions to draw the axis to the output.
Parameters: |
|
---|
Print the footer of the svg to the output.
Parameters: | output (file) – Stream where to write. |
---|
Print the header of the svg to the output.
Parameters: |
|
---|
Print the information content underneath the logo.
Parameters: |
|
---|
Module author: Anthony Mathelier <amathelier@cmmt.ubc.ca>