#!/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 -it bioinformatics/bioinformatics:v0 /bin/bash``` # # The command allows ```/home/sam/data/pacbio_oly/``` 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 7ee99a4](https://github.com/RobertsLab/code/commit/7ee99a4722180ce89cff4e1e73468764ee440455) # 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') # In[6]: get_ipython().run_cell_magic('bash', '', 'ls -l\n') # ### Run [miniasm v0.2](https://github.com/lh3/miniasm) # # #### Mimiasm is a fast de-novo assembler that can be used with PaBio data. Typically accepts the output from [minimap2](https://github.com/lh3/minimap2) (which is what will be used in this notebook). # # #### Using as part of pipeline: minimap/miniasm/racon # In[7]: get_ipython().run_cell_magic('bash', '', 'which miniasm\n') # In[8]: get_ipython().run_cell_magic('bash', '', '/usr/local/bioinformatics/miniasm-0.2/miniasm\n') # In[9]: cd /usr/local/bioinformatics/miniasm-0.2/miniasm # In[10]: get_ipython().run_cell_magic('bash', '', 'cd /usr/local/bioinformatics/miniasm-0.2/\n') # In[11]: get_ipython().run_cell_magic('bash', '', 'pwd\n') # In[12]: cd /usr/local/bioinformatics/miniasm-0.2/ # In[13]: get_ipython().run_cell_magic('bash', '', 'pwd\n') # In[14]: # Run miniasm following example used in README file. # NOTE: There is a difference; the README file uses a gzipped PAF file as one of the inputs. Let's just see how this goes... get_ipython().run_line_magic('%bash', '') time miniasm \ -f \ /home/data/20170911_oly_pacbio_cat.fastq /home/data/20170911_minimap2_pacbio_oly.paf > /home/data/20170918_oly_pacbio_miniasm_reads.gfa # In[15]: get_ipython().run_cell_magic('bash', '', "# Run miniasm following example used in README file.\n# NOTE: There is a difference; the README file uses a gzipped PAF file as one of the inputs. Let's just see how this goes...\ntime miniasm \\\n-f \\\n/home/data/20170911_oly_pacbio_cat.fastq /home/data/20170911_minimap2_pacbio_oly.paf > /home/data/20170918_oly_pacbio_miniasm_reads.gfa\n") # In[16]: get_ipython().run_cell_magic('bash', '', 'ls -lh /home/data/20170918_oly_pacbio_miniasm_reads.gfa\n') # In[17]: get_ipython().run_cell_magic('bash', '', 'head /home/data/20170918_oly_pacbio_miniasm_reads.gfa\n') # #### Well, it looks like it worked. We now have an assembly in the [graphical fragment assembly format (GFA)](https://github.com/GFA-spec/GFA-spec) # # #### Will proceed to the next part of the pipeline (consensus sequence generation): [Racon](https://github.com/isovic/racon) # # #### My notebook for this step is here: [https://github.com/sr320/LabDocs/blob/master/jupyter_nbs/sam/20170918_docker_pacbio_oly_racon0.5.0.ipynb](https://github.com/sr320/LabDocs/blob/master/jupyter_nbs/sam/20170918_docker_pacbio_oly_racon0.5.0.ipynb) # In[ ]: