#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_cell_magic('bash', '', 'echo "TODAY\'S DATE:"\ndate\necho "------------"\necho ""\n#Display operating system info\nlsb_release -a\necho ""\necho "------------"\necho "HOSTNAME: "; hostname \necho ""\necho "------------"\necho "Computer Specs:"\necho ""\nlscpu\necho ""\necho "------------"\necho ""\necho "Memory Specs"\necho ""\nfree -mh\n') # #### Set variables # In[6]: get_ipython().run_line_magic('env', 'assembly=/home/sam/data/metagenomics/P_generosa/final.contigs.fa') get_ipython().run_line_magic('env', 'out_dir=/home/sam/analyses/20190110_geo_metagnomics_metaquast') get_ipython().run_line_magic('env', 'metaquast=/home/sam/programs/quast-5.0.2/metaquast.py') get_ipython().run_line_magic('env', 'threads=22') # The above cell was changed to include threads. # #### Make directories # # ```--parents``` option allows creation of multiple, nested directories # In[3]: get_ipython().run_cell_magic('bash', '', 'mkdir --parents /home/sam/data/metagenomics/P_generosa\nmkdir --parents /home/sam/analyses/20190110_geo_metagnomics_metaquast\n') # #### Transfer metagenomics FastA # In[4]: get_ipython().run_cell_magic('bash', '', 'rsync \\\n--archive \\\n--verbose \\\n--progress \\\ngannet:/volume1/web/Atumefaciens/20190102_metagenomics_geo_megahit/megahit_out/final.contigs.fa \\\n ~/data/metagenomics/P_generosa\n \n#Uncomment below to download via web URL\n# Will need to set desired path with --directory-prefix\n#wget \\\n#--directory-prefix=/home/sam/data/metagenomics/P_generosa/ \\\n#https://gannet.fish.washington.edu/Atumefaciens/20190102_metagenomics_geo_megahit/megahit_out/final.contigs.fa\n\necho "-------------------------"\nls -lh ${assembly}\n') # In[5]: get_ipython().run_cell_magic('bash', '', 'cd ${out_dir}\n\ntime \\\npython ${metaquast} ${assembly} \\\n1> stdout.txt \\\n2> sterr.txt\n') # Killed process to add ```threads``` variable to variables cell. # In[7]: get_ipython().run_cell_magic('bash', '', 'cd ${out_dir}\n\ntime \\\npython ${metaquast} ${assembly} \\\n--threads ${threads}\n1> stdout.txt \\\n2> sterr.txt\n') # Noticed missing command continuation slash after ```threads``` command # In[9]: get_ipython().run_cell_magic('bash', '', 'cd ${out_dir}\n\ntime \\\npython ${metaquast} ${assembly} \\\n--threads ${threads} \\\n1> stdout.txt \\\n2> sterr.txt\n') # In[10]: get_ipython().run_cell_magic('bash', '', 'cat ${out_dir}/stdout.txt\n') # Well, that's weird. Let's try it again; maybe there was a blip in internet access? Hopefully this isn't related to government shutdown... # In[11]: get_ipython().run_cell_magic('bash', '', 'cd ${out_dir}\n\ntime \\\npython ${metaquast} ${assembly} \\\n--threads ${threads} \\\n1> stdout.txt \\\n2> sterr.txt\n') # In[12]: get_ipython().run_cell_magic('bash', '', 'cat ${out_dir}/stdout.txt\n') # Well, while I wait to hear from the developer, I'll run this with the ```--max-ref-number 0``` option and see how it looks. # In[13]: get_ipython().run_cell_magic('bash', '', 'cd ${out_dir}\n\ntime \\\npython ${metaquast} ${assembly} \\\n--max-ref-number 0 \\\n--threads ${threads} \\\n1> stdout.txt \\\n2> sterr.txt\n\nls -lhR\n') # In[14]: get_ipython().run_cell_magic('bash', '', 'cat ${out_dir}/quast_results/results_2019_01_10_14_04_35/metaquast.log\n') # OK, that didn't do anything other than just run regular QUAST. Going to give the initial command another go and see if the internet connection succeeds this time (not sure why it would, though)... # In[ ]: get_ipython().run_cell_magic('bash', '', 'cd ${out_dir}\n\ntime \\\npython ${metaquast} ${assembly} \\\n--threads ${threads} \\\n1> stdout.txt \\\n2> sterr.txt\n') # In[ ]: