{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Running in Docker container on Ostrich\n",
"\n",
"#### Started Docker container with the following command:\n",
"\n",
"```docker run -p 8888:8888 -v /Users/sam/data/:/data -v /Users/sam/owl_home/:/owl_home -v /Users/sam/owl_web/:/owl_web -v /Users/sam/gitrepos:/gitrepos -it f99537d7e06a```\n",
"\n",
"The command allows access to Jupyter Notebook over port 8888 and makes my Jupyter Notebook GitHub repo and my data files on Owl/home and Owl/web accessible to the Docker container.\n",
"\n",
"Once the container was started, started Jupyter Notebook with the following command inside the Docker container:\n",
"\n",
"```jupyter notebook```\n",
"\n",
"This is configured in the Docker container to launch a Jupyter Notebook without a browser on port 8888.\n",
"\n",
"The Docker container is running on an image created from this [Dockerfile (Git commit 443bc42)](https://github.com/sr320/LabDocs/blob/443bc425cd36d23a07cf12625f38b7e3a397b9be/code/dockerfiles/Dockerfile.bio)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"date"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Check computer specs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"hostname"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"lscpu"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Download all Ostrea lurida files from BGI using ```wget```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### This uses the ```-m``` flag to recursively download all files and mirror the directory structure of the target. Additionally, it uses the ```-P``` flag to specify the output location of the downloaded files."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"time wget -m ftp://F15FTSUSAT0327:OSTibkD@cdts-hk.genomics.cn/Ostrea_lurida/ \\\n",
"- P /owl_web/O_lurida_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Noticed that the files weren't being saved in the specified directory..."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%%bash\n",
"ls /owl_web/O_lurida_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Instead, they were being saved in my current directory..."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"ls -l cdts-hk.genomics.cn/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Not going to waste time figuring out why the ```-P``` argument didn't work for ```wget```, so just changing to desired directory and running ```wget``` command again..."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%%bash\n",
"cd /owl_web/O_lurida_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"pwd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Well, that's weird... Try again without bash magics?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"cd /owl_web/O_lurida_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"time wget -m ftp://F15FTSUSAT0327:OSTibkD@cdts-hk.genomics.cn/Ostrea_lurida/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### View directory structure of downloaded files\n",
"\n",
"Note: The following program (```tree```) was installed via [Homebrew package manager](http://brew.sh/)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%bash\n",
"tree /owl_web/O_lurida_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Download all Panopea gererosa files from BGI using ```wget```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"cd /owl_web/P_generosa_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%%bash\n",
"time wget -m ftp://F15FTSUSAT0327:OSTibkD@cdts-hk.genomics.cn/Panopea_generosa"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### View directory structure of downloaded files"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%%bash\n",
"tree /owl_web/P_generosa_genome_assemblies_BGI/20161201/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 1
}