COMP364: Working with Matplotlib Jrme Waldisphl, McGill - - PowerPoint PPT Presentation

comp364 working with matplotlib
SMART_READER_LITE
LIVE PREVIEW

COMP364: Working with Matplotlib Jrme Waldisphl, McGill - - PowerPoint PPT Presentation

COMP364: Working with Matplotlib Jrme Waldisphl, McGill University Analysis of human mRNA Using CURL download human mRNA file on your account from:


slide-1
SLIDE 1

COMP364: ¡Working ¡with ¡ Matplotlib ¡

Jérôme ¡Waldispühl, ¡McGill ¡University ¡

slide-2
SLIDE 2

Analysis ¡of ¡human ¡mRNA ¡

Using ¡CURL ¡download ¡human ¡mRNA ¡file ¡on ¡your ¡account ¡from: ¡

http://hgdownload.soe.ucsc.edu/goldenPath/hg19/bigZips/refMrna.fa.gz ¡

Unzip ¡the ¡file ¡unzip ¡gunzip : ¡gunzip refMrna.fa.gz ¡ Write ¡a ¡parser ¡that ¡reads ¡the ¡file ¡and ¡store ¡the ¡mRNA ¡into ¡a ¡ dicNonary ¡such ¡that: ¡

  • ¡entry ¡: ¡sequence ¡id ¡
  • ¡content ¡: ¡sequence ¡in ¡IUPAC ¡code ¡

Using ¡matplotlib, ¡create ¡histograms ¡that ¡plots: ¡

  • ¡An ¡histogram ¡of ¡the ¡distribuNon ¡of ¡mRNA ¡lengths. ¡
  • ¡A ¡figure ¡that ¡plots ¡the ¡GC-­‑content ¡(x-­‑axis) ¡and ¡AG-­‑content ¡

(y-­‑axis) ¡of ¡each ¡mRNA. ¡

  • ¡Same ¡as ¡above ¡but ¡length ¡vs. ¡GC-­‑content ¡
slide-3
SLIDE 3

Useful ¡funcNons ¡

Count ¡the ¡occurrence ¡of ¡one ¡leWer: ¡<string>.count(<leWer>) ¡ Save ¡a ¡figure: ¡.savefig(<filename>) ¡ Example: ¡ fig = plt.figure() fig.plot(X,Y,’r--’) fig.savefig(’myfigure.pdf',transparent=True)