!tr ',' "\t" /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab -out /Volumes/web/scaphapoda/Grace/olur_goslim_uniprot.tab !head /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab !tail /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab !fgrep --color "gonad" /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab !wc -l /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab #make a pie chart figure(1, figsize=(6,6)) ax = axes([0.1,0.1,0.8,0.8]) labels = 'Reproduction', 'Growth', ' !head /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab !awk '{print $4}' /Volumes/web/scaphapoda/Grace/Olur_goslim_a.tab | sort | uniq !tail ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !awk '{print $4}' ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv | sort | uniq !fgrep --color "mammary" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "growth" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "cell" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "developmental" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "genitalia" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "hermaphrodite" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "gonad" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "sex" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "female" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "pregnancy" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "male" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "meiosis" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "gonad development" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "germarium" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "oocyte" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "ovarian" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "sex determination" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "germ-line" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "reproduction" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "estrogen" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "testosterone" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "androgen" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "stem cell" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "mating" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !egrep -wi --color 'mating | stem cell | androgen' /Volumes/web/scaphapoda/Grace/Blasts/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "mating" /Volumes/web/scaphapoda/Grace/Blasts/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "embryonic" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep --color "genitalia, hermaphrodite, gonad, sex, female, pregnancy, male, gonad development, germarium, oocyte, ovarian, sex-determination, germ-line, reproduction, estrogen, testosterone, androgen, stem cell, mating, embryonic" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !tr ',' "\t" <~/Downloads/olur_blastx_uniprot_GOSlim_P.csv> ~/Downloads/olur_blastx_uniprot_GOSlim_P.tab !head ~/Downloads/olur_blastx_uniprot_GOSlim_P.tab !python ~/Downloads/olur_blastx_uniprot_GOSlim_P.tab -f tsv -o justslim.txt !tr ',' "\t" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !head /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab pylab inline from pandas import * jslim = read_table("/Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab", # name of the data file #sep=",", # what character separates each column? na_values=["", " "]) # what values should be considered "blank" values? jslim.head !fgrep -c "DNA metabolism" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "RNA metabolism" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "cell adhesion" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "cell cycle and proliferation" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "cell organization and biogenesis" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "cell-cell signaling" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "death" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "developmental processes" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep --color "developmental processes" ~/Downloads/olur_blastx_uniprot_GOSlim_P.csv !fgrep -c "other biological processes" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "other metabolic processes" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "protein metabolism" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "signal transduction" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "stress response" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !fgrep -c "transport" /Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab !PWD jslim.groupby('GOSlim_bin').Column1.count().plot(kind='bar') from pylab import * # make a square figure and axes figure(1, figsize=(12,12)) ax = axes([0.1, 0.1, 0.8, 0.8]) # The slices will be ordered and plotted counter-clockwise. labels = 'DNA metabolism', 'RNA metabolism', 'cell adhesion', 'cell cycle and proliferation', 'cell organization and biogenesis', 'cell-cell signaling', 'death', 'developmental processes', 'other biological processes', 'other metabolic processes', 'protein metabolism', 'signal transduction', 'stress response', 'transport' fracs = [92, 551, 73, 214, 465, 44, 144, 624, 886, 1034, 527, 303, 266, 683] explode=(0, 0, 0, 0) pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True, startangle=0) # The default startangle is 0, which would start # the Frogs slice on the x-axis. With startangle=90, # everything is rotated counter-clockwise by 90 degrees, # so the plotting starts on the positive y-axis. title('Biological processes', bbox={'facecolor':'0.8', 'pad':5}) show() # Don't understand what AssertionError is saying or how to fix it. df = DataFrame('/Volumes/web/scaphapoda/Grace/olur_blastx_uniprot_GOSlimP-noterm.tab', index=['DNA metabolism', 'RNA metabolism', 'cell adhesion', 'cell cycle and proliferation', 'cell organization and biogenesis', 'cell-cell signaling', 'death', 'developmental processes', 'other biological processes', 'other metabolic processes', 'protein metabolism', 'signal transduction', 'stress response', 'transport'], columns=['GOSlim_bin']) df.plot(kind='pie', subplots=True) #I don't really know what the DataFrame aspect means or why it's saying "invalid chart type given pie" #Also, where do I put the link to the data in the above code? is that instead of the (3 * rand(14,1)...?)