Skip to content

Topic 6 assignment

davidaray edited this page Apr 8, 2025 · 2 revisions

Using your output from the previous assignment, generate a script that will generate a variety of plots from that table with the following guidelines:

  1. Use argparse to allow the user to define what type of plot will be generated, allow the user to choose among a) boxplot, b) scatterplot, c) histogram, d) barplot.

  2. Depending on the type of plot the user selects, produce an appropriate plot or plots as follows:

    • a. boxplot - depict the divergence data for each TE class in a single figure

    • b. scatterplot - generate five figures plotting the divergence data (x-axis) against the counts (y-axis), one plot for each TE class. This is nonsense data but it will give you the practice.

    • c. histogram - five figures plotting the count data in 10 bins, one plot for each TE class.

    • d. barplot - depict the TE counts per TE class for all 25 species in a stacked bar format. The TE classes should be depicted in this order from bottom to top, LINE, SINE, LTR, DNA, RC.

  3. All plots should be saved in .svg format with descriptive filenames.

Hint: investigate the use of df.melt().

Clone this wiki locally