#!/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') # #### Create working directories for both genome versions # In[2]: get_ipython().run_cell_magic('bash', '', 'mkdir /home/sam/analyses/20181219_Pgenerosa_repeatmodeler\n') # In[3]: get_ipython().run_line_magic('env', 'work_dir = /home/sam/analyses/20181219_Pgenerosa_repeatmodeler') get_ipython().run_line_magic('env', 'rptm = /home/shared/RepeatModeler-open-1.0.11') get_ipython().run_line_magic('env', 'Pgenerosa_v070_fasta = /home/sam/data/genomes/geoduck/Pgenerosa_v070.fa') # In[4]: get_ipython().run_cell_magic('bash', '', 'cd /home/sam/data/genomes/geoduck/\ntime \\\nrsync \\\n--archive \\\nowl:/volume1/web/halfshell/genomic-databank/Pgenerosa_v070.fa \\\n.\nls -lh\n\n# Uncomment following line(s) to download from web\n# wget http://owl.fish.washington.edu/halfshell/genomic-databank/Pgenerosa_v070.fa\n') # #### Create RepeatModeler databases # In[6]: get_ipython().run_cell_magic('bash', '', 'cd ${work_dir}\n\ntime \\\nperl ${rptm}/BuildDatabase \\\n-name Pgenerosa_v070 \\\n-engine ncbi \\\n${Pgenerosa_v070_fasta} \\\n>& database_build_run.out\n\nsed \'/^Subject:/ s/ / repeatmodeler db JOB COMPLETE/\' ~/.default-subject.mail | msmtp "$EMAIL"\n\necho "------------------------------------------------------------------------"\necho ""\necho "------------------------------------------------------------------------"\ncat ${work_dir}/database_build_run.out\n') # #### Run RepeatModeler # In[7]: get_ipython().run_cell_magic('bash', '', '\ncd ${work_dir}\ntime \\\nperl ${rptm}/RepeatModeler \\\n-database ${work_dir}/Pgenerosa_v070 \\\n-engine ncbi \\\n-pa 16 \\\n>& run.out\n\nsed \'/^Subject:/ s/ / repeatmodeler JOB COMPLETE/\' ~/.default-subject.mail | msmtp "$EMAIL"\n') # In[8]: get_ipython().run_cell_magic('bash', '', 'tail -n 50 ${work_dir}/run.out\n') # In[9]: get_ipython().run_cell_magic('bash', '', 'cd /home/sam/analyses/\nrsync --archive --relative ./20181219_Pgenerosa_repeatmodeler gannet:/volume1/web/Atumefaciens\n\nsed \'/^Subject:/ s/ / rsync JOB COMPLETE/\' ~/.default-subject.mail | msmtp "$EMAIL"\n') # In[ ]: