Skip to content

Commit 1ea9745

Browse files
committed
Merge branch 'master' of https://github.com/timeu/gwas-lecture
in process of loading import-data notebook
2 parents 511e916 + e782da0 commit 1ea9745

File tree

8 files changed

+85
-56
lines changed

8 files changed

+85
-56
lines changed

Lecture-0-Setup-of-Python-Environment.ipynb

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,44 @@
3131
"### Install conda on Linux\n",
3232
"\n",
3333
"```bash\n",
34-
"curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh --output-file Miniconda2-latest-Linux-x86_64.sh\n",
35-
"bash Miniconda2-latest-Linux-x86_64.sh\n",
34+
"curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O Miniconda2-latest-Linux-x86_64.sh\n",
35+
"sh Miniconda2-latest-Linux-x86_64.sh\n",
3636
"```\n",
3737
"\n",
38-
"### Install conda on Windows\n",
38+
"### Install conda on Windows (WSL)\n",
3939
"\n",
40-
"Download EXE installer and install it.\n",
40+
"The easiest way is to first install the [Windwos Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10)\n",
41+
"Once this is done start the Linux distrubition that was previously installed from the Start Menu\n",
42+
"\n",
43+
"```bash\n",
44+
"curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O Miniconda2-latest-Linux-x86_64.sh\n",
45+
"sh Miniconda2-latest-Linux-x86_64.sh\n",
46+
"```\n",
4147
"\n",
4248
"\n",
4349
"## Create a conda environment and install limix, jupyter notebook\n",
4450
"\n",
51+
"### For Linux, Mac OSX and WSL follow this:\n",
52+
"\n",
4553
"```bash\n",
4654
"$ git clone https://github.com/timeu/gwas-lecture.git \n",
4755
"$ # or download archive from and extract it from https://github.com/timeu/gwas-lecture/archive/master.zip\n",
4856
"$ cd gwas-lecture\n",
4957
"$ conda env create -f environment.yml\n",
5058
"```\n",
5159
"\n",
60+
"\n",
61+
"## Docker container\n",
62+
"\n",
63+
"As a fallback if any of the installations above fail, it is possible to use a docker container that comes with all libraries pre-installed. First make sure to install [Docker](https://docs.docker.com/install/) on your machine.\n",
64+
"Once docker is installed just run: \n",
65+
"\n",
66+
"```\n",
67+
"$ docker run -it -p 8888:8888 timeu/gwas-lecture\n",
68+
"```\n",
69+
"Open http://localhost:8888 in your browser and copy and paste the token for the docker run above\n",
70+
"\n",
71+
"\n",
5272
"## Start jupyter notebook\n",
5373
"\n",
5474
"```\n",
@@ -70,10 +90,7 @@
7090
"\n",
7191
"In the terminal, type:\n",
7292
"* install.packages('IRkernel')\n",
73-
"* IRkernel::installspec() # to register the kernel in the current R installation\n",
74-
"\n",
75-
"Launch jupyter with the specified kernel:\n",
76-
"* jupyter console --kernel=ir"
93+
"* IRkernel::installspec() # to register the kernel in the current R installation"
7794
]
7895
}
7996
],

Lecture-6-BroadSenseHeritability.ipynb

Lines changed: 37 additions & 48 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ To open these notebooks in Jupyter, download the files to a directory on your co
1313
Online read-only versions
1414
=========================
1515

16+
1617
Use the following links:
1718

1819
* [Lecture-0 Setup of Python Environment](http://nbviewer.ipython.org/urls/raw.github.com/timeu/gwas-lecture/master/Lecture-0-Setup-of-Python-Environment.ipynb)

data/BYxRM/BYxRM.hdf5

1.63 MB
Binary file not shown.

data/arab107/atwell_107.hdf5

40.1 MB
Binary file not shown.

gwas-dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM continuumio/miniconda
2+
3+
RUN apt-get update --fix-missing && apt-get install -y r-base && apt-get clean && rm -rf /var/lib/apt/lists/*
4+
5+
ADD environment.yml /tmp/environment.yml
6+
RUN conda env create -f /tmp/environment.yml
7+
8+
RUN Rscript -e 'install.packages(c("IRkernel","lme4"),repos="https://cran.rstudio.com")'
9+
RUN /bin/bash -c "source activate gwas-lecture && Rscript -e 'IRkernel::installspec()'"
10+
11+
# Pull the environment name out of the environment.yml
12+
RUN echo "source activate $(head -1 /tmp/environment.yml | cut -d' ' -f2)" > ~/.bashrc
13+
ENV PATH /opt/conda/envs/$(head -1 /tmp/environment.yml | cut -d' ' -f2)/bin:$PATH
14+
15+
RUN mkdir /root/gwas-lecture
16+
COPY . /root/gwas-lecture
17+
18+
EXPOSE 8888
19+
CMD ["/opt/conda/envs/gwas-lecture/bin/jupyter", "notebook", "--ip='0.0.0.0'","--allow-root","--port","8888","--no-browser","--notebook-dir","/root/gwas-lecture/"]

install.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
install.packages("lme4")

runtime.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
r-2018-02-05
2+
python-2.7

0 commit comments

Comments
 (0)