#!/usr/bin/env python # coding: utf-8 # ### Running in Docker container on Swoose # # Started Docker container with the following command: # # ```docker run -p 8888:8888 -v /home/sam/data/pacbio_oly/:/home/data -v /mnt/owl/:/home/owl -it bioinformatics/bioinformatics:v0 /bin/bash``` # # The command allows ```/home/sam/data/pacbio_oly/``` and ```mnt/owl``` (our server Owl) to be accessible to the Docker container. # # Once access to Jupyter Notebook over port 8888 and makes my Jupyter Notebook GitHub repo and my data files the container was started, started Jupyter Notebook with the following command inside the Docker container: # # ```jupyter notebook --allow-root``` # # This is configured in the Docker container to launch a Jupyter Notebook without a browser on port 8888. # The Docker container is running on an image created from this [Dockerfile (Git commit 0c42a854](https://github.com/RobertsLab/code/commit/0c42a854470efc817bbb0506065adaf5cbd04b4b) # In[1]: get_ipython().run_cell_magic('bash', '', 'date\n') # In[2]: get_ipython().run_cell_magic('bash', '', 'hostname\n') # In[3]: get_ipython().run_cell_magic('bash', '', 'lscpu\n') # In[4]: get_ipython().run_cell_magic('bash', '', 'free -mh\n') # In[5]: get_ipython().run_cell_magic('bash', '', 'pwd\n') # ### Compare assemblies using [Quast v4.5](http://quast.sourceforge.net/quast) # ##### Will compare [Sean's various assemblies](http://onsnetwork.org/kubu4/2017/08/28/project-progress-olympia-oyster-genome-assemblies-by-sean-bennett/) with [my most recent racon assembly](http://onsnetwork.org/kubu4/2017/09/18/genome-assembly-olympia-oyster-pacbio-minimapminiasmracon-3/). # #### Set file locations as variables. # In[6]: sb_platinus1="/home/owl/scaphapoda/Sean/Oly_Illumina_Platanus_Assembly/Oly_Out__contig.fa" sb_platinus2="/home/owl/scaphapoda/Sean/Oly_Platanus_Assembly_Kmer-22/Oly_Out__contig.fa" sb_redundans1="/home/owl/scaphapoda/Sean/Oly_Redundans_Output/contigs.fa" sb_redundans2="/home/owl/scaphapoda/Sean/Oly_Redundans_Output_Try_2/contigs.fa" sb_canu="/home/owl/scaphapoda/Sean/Oly_Canu_Output/oly_pacbio_.contigs.fasta" sjw_racon="/home/owl/Athaliana/201709_oly_pacbio_assembly_minimap_asm_racon/20170918_oly_pacbio_racon1_consensus.fasta" # In[7]: get_ipython().system('python /usr/local/bioinformatics/quast-4.5/quast.py -t 24 sb_canu sb_platinus1 sb_platinus2 sb_redundans1 sb_redundans2 sjw_racon') # In[8]: usr/local/bioinformatics/quast-4.5/quast.py(-t, 24, sb_canu, sb_platinus1, sb_platinus2, sb_redundans1, sb_redundans2, sjw_racon) # In[9]: get_ipython().system('python /usr/local/bioinformatics/quast-4.5/quast.py -t 24 $sb_canu $sb_platinus1 $sb_platinus2 $sb_redundans1 $sb_redundans2 $sjw_racon') # In[10]: get_ipython().run_cell_magic('bash', '', 'cat quast_results/results_2017_10_03_15_35_28/report.txt\n') # In[11]: get_ipython().run_cell_magic('bash', '', 'cp -r quast_results/results_2017_10_03_15_35_28/ /home/owl/Athaliana/20171003_quast_oly_genome_assemblies\n') # In[12]: get_ipython().run_cell_magic('bash', '', 'ls /home/owl/Athaliana/20171003_quast_oly_genome_assemblies/\n') # In[13]: get_ipython().run_cell_magic('html', '', 'http://owl.fish.washington.edu/Athaliana/20171003_quast_oly_genome_assemblies/report.html\n') # OK, so this all worked. However, text file output is difficult to view in Jupyter notebook. View it here: [http://owl.fish.washington.edu/Athaliana/20171003_quast_oly_genome_assemblies/report.txt](http://owl.fish.washington.edu/Athaliana/20171003_quast_oly_genome_assemblies/report.txt) # # Additionally, the HTML embedding in this notebook didn't work, so click on this link to view: [http://owl.fish.washington.edu/Athaliana/20171003_quast_oly_genome_assemblies/report.html](http://owl.fish.washington.edu/Athaliana/20171003_quast_oly_genome_assemblies/report.html) # ### Compare just PacBio assemblies for easy viewing # In[14]: get_ipython().system('python /usr/local/bioinformatics/quast-4.5/quast.py -t 24 $sb_canu $sjw_racon') # In[15]: get_ipython().run_cell_magic('bash', '', 'cp -r quast_results/results_2017_10_03_20_01_42/ /home/owl/Athaliana/20171003_quast_oly_pacbio_assemblies\n') # In[16]: get_ipython().run_cell_magic('bash', '', 'cat /home/owl/Athaliana/20171003_quast_oly_pacbio_assemblies/report.txt\n') # #### One thing that immediately jumps out is the difference in the total number of bps (difference of ~13,000,000 between Canu and Racon)! Something about that seems off. I'll have to double-check my original Racon set up to see if I accidentally missed a FASTQ file or something... # In[ ]: