#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().system('date') # In[2]: get_ipython().run_cell_magic('bash', '', 'system_profiler SPSoftwareDataType\n') # In[3]: get_ipython().run_cell_magic('bash', '', '#Uses grep to exclude lines that display serial number and hardware UUID\nsystem_profiler SPHardwareDataType | grep -v [SH][ea]\n') # ### Show same file in each of three locations # In[4]: get_ipython().run_cell_magic('bash', '', '#Local copy of file\nls -lh /Volumes/Data/Sam/scratch/160103_I137_FCH3V5YBBXX_L5_WHOSTibkDCAADWAAPEI-74_2.fq.gz\n') # In[5]: get_ipython().run_cell_magic('bash', '', '#External HDD copy of file\nls -lh /Volumes/toaster/sam/scratch/160103_I137_FCH3V5YBBXX_L5_WHOSTibkDCAADWAAPEI-74_2.fq.gz\n') # In[6]: get_ipython().run_cell_magic('bash', '', '#Server (Owl) copy of file\nls -lh /Volumes/owl_web/nightingales/O_lurida/160103_I137_FCH3V5YBBXX_L5_WHOSTibkDCAADWAAPEI-74_2.fq.gz\n') # ### Gunzip all three files and send output to /dev/null (i.e. data is not saved when directed here) # In[7]: get_ipython().run_cell_magic('bash', '', 'time gunzip -c /Volumes/Data/Sam/scratch/160103_I137_FCH3V5YBBXX_L5_WHOSTibkDCAADWAAPEI-74_2.fq.gz > /dev/null\n') # In[8]: get_ipython().run_cell_magic('bash', '', 'time gunzip -c /Volumes/toaster/sam/scratch/160103_I137_FCH3V5YBBXX_L5_WHOSTibkDCAADWAAPEI-74_2.fq.gz > /dev/null\n') # In[9]: get_ipython().run_cell_magic('bash', '', 'time gunzip -c /Volumes/owl_web/nightingales/O_lurida/160103_I137_FCH3V5YBBXX_L5_WHOSTibkDCAADWAAPEI-74_2.fq.gz > /dev/null\n') # #### Surprisingly we don't see much speed difference (comparing the "real" time) between the the three file locations. Let's try with a significantly larger file # ### Show same file in each of three locations # In[10]: get_ipython().run_cell_magic('bash', '', '#Local copy of file\nls -lh /Volumes/Data/Sam/scratch/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz\n') # In[11]: get_ipython().run_cell_magic('bash', '', '#External HDD copy of file\nls -lh /Volumes/toaster/sam/scratch/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz\n') # In[12]: get_ipython().run_cell_magic('bash', '', '#Server (Owl) copy of file\nls -lh /Volumes/owl_web/nightingales/O_lurida/20160223_gbs/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz\n') # ### Gunzip all three files and send output to /dev/null (i.e. data is not saved when directed here) # In[13]: get_ipython().run_cell_magic('bash', '', '#Local copy of file\ntime gunzip -c /Volumes/Data/Sam/scratch/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz > /dev/null\n') # In[14]: get_ipython().run_cell_magic('bash', '', '#External HDD copy of file\ntime gunzip -c /Volumes/toaster/sam/scratch/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz > /dev/null\n') # In[15]: get_ipython().run_cell_magic('bash', '', '#Server (Owl) copy of file\ntime gunzip -c /Volumes/owl_web/nightingales/O_lurida/20160223_gbs/160123_I132_FCH3YHMBBXX_L4_OYSzenG1AAD96FAAPEI-109_1.fq.gz > /dev/null\n') # #### With the larger file, there is a large difference in speed (comparing "real" time). Seems to show that dealing with files housed on the server is much slower than handling files locally.