Difference between revisions of "Tutorials"

From Statistical Genetics Courses

Jump to: navigation, search
(Pleiotropy)
 
(170 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Running Tutorials on Your Computer==
+
==Tutorials for Courses==
We have created a debian repository to make it easier to use our tutorials. This repository allows you to install all required software and example data included in tutorials on your computer. Using this repository will require that you have administrator access to a computer with Linux System. If you don't have this level of access or your computer running non-Linux systems (Windows or OS), you have two options. First, you could install the repository on a remote cloud serve, such as [https://www.vultr.com/ VULTR]. Second, you can install a Virtual Machine program (such as [https://www.virtualbox.org/ VirtualBox]) on your computer, and then load our pre-configured virtual machine image (VM Image) into the Virtual Machine.
+
* [[Tutorials#FastLMM_&_GCTA|FastLMM & GCTA]
 +
* [[Tutorials#Mendelian Randomization|Mendelian Randomization]]
 +
* [[Tutorials#Pleiotropy|Pleiotropy]]
 +
* [[Tutorials#PLINK_GWAS:_Data_Quality_Control_and Association_Analysis_Controlling_for_Population_Substructure|PLINK GWAS: QC and Controlling for Population Substructure]]
 +
* [[Tutorials#Power_Analysis|Power Analysis]]
 +
* [[Tutorials#REGENIE|REGENIE]]
 +
* [[Tutorials#Regression_and_Intro_to_PLINK_and_R|Regression and Intro to PLINK and R]]
 +
* [[Tutorials#Pencil_and_Paper_Exercise|Pencil and Paper Exercise]]
  
The VM Image is available [https://statgen.research.bcm.edu/files/images/Statgen.ova here]. The password for the student account is "LetMeIn". Feel free to change it to whatever you like.
+
==Running Tutorials on Your Computer==
 +
We adopt [https://www.docker.com/ docker] to run our course material, and we have created various [https://hub.docker.com/u/statisticalgenetics docker repositories] with freely available Docker images for users to readily run our exercises on their own computers using [https://docs.docker.com/desktop/ Docker Desktop]. These docker images are for multi-platform use (Mac, Windows, or Linux). More information regarding instructions to install Docker Desktop and to run the course material on your computer is detailed in the documentation below. 
  
To install the repository on the cloud server, virtual machine, or your own computer, you need to follow these configuration steps. Please run as the root user or using the sudo command.
+
===General instructions===
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Statistical_Genetics_Exercise_Instructions.pdf Instructions to install Docker Desktop and running the course material on your computer]
  
<pre>echo "deb [trusted=yes] https://statgen.research.bcm.edu/deb ./" | sudo tee -a /etc/apt/sources.list.d/statgen.list
+
===Tutorial specific instructions===
sudo add-apt-repository -y ppa:webupd8team/java
+
Please refer to the previous section for instructions on the installation of Docker Desktop and basic usages. 
sudo apt-get update
+
</pre>
+
  
Using the following command you can install all exercises on your computer. If you want to install specific exercise at your demands, please refer to commands listed in each section below.
+
Material and instructions for specific exercise are listed in each section below. They provide links to pdf versions of the exercises and a minimal set of commands to use for downloading the docker images and running an exercise. 
  
<pre> </pre>
+
==FastLMM & GCTA==
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/FastLMM_GCTA.pdf FastLMM & GCTA Exercise [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/FastLMM_GCTA_Outputs.pdf FastLMM & GCTA Output [PDF]]
 +
* [https://hub.docker.com/r/statisticalgenetics/fastlmm-gcta FastLMM & GCTA Docker Image]
  
==Annotation==
+
To pull and download the docker image from the Docker Hub repository,
* [http://statgen.us/files/tutorials/functional-annotation/FunctionalAnnotation_exercise_2018v2.pdf Functional Annotation Exercise <nowiki>[PDF]</nowiki>]
+
* [[Commands in Annotation Exercise|Commands in Exercise]]
+
  
==Cochran Armitage Trend Test==
+
<pre>docker pull statisticalgenetics/fastlmm-gcta</pre>
* [http://statgen.us/files/tutorials/Armitage_sample_size_Berlin_1.pdf CATT Exercise <nowiki>[PDF]</nowiki>]
+
To run the exercise from the downloaded docker image,
  
==GATK and IGV==
+
<pre>docker run --rm -p 8888:8888 statisticalgenetics/fastlmm-gcta</pre>
* [http://statgen.us/files/tutorials/Variant_calling_exercices_GATK_IGV.pdf GATK/IGV Exercise <nowiki>[PDF]</nowiki>]
+
  
====Software Links====
+
==Mendelian Randomization==
:* [https://www.broadinstitute.org/gatk/ GATK]
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Mendelian_Randomization.pdf Mendelian Randomization Exercise [PDF]]
:* [http://www.broadinstitute.org/igv/ IGV] ([http://statgen.us/files/software/igv.jar Download JAR file])
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Mendelian_Randomization_Outputs.pdf// Mendelian Randomization Output [PDF]]
 +
* [https://hub.docker.com/r/statisticalgenetics/mendelian-randomization Mendelian Randomization Docker Image]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Mendelian_Randomization_Questions.pdf Mendelian Randomization Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Mendelian_Randomization_Answers.pdf Mendelian Randomization Answers [PDF]]
  
====Result Files====
+
To pull and download the docker image from the Docker Hub repository,
:* [http://statgen.us/files/2016/07/gatk_results.tar.gz GATK/IGV exercise]
+
  
==GenABEL==
+
<pre>docker pull statisticalgenetics/mendelian-randomization</pre>
* [http://statgen.us/files/tutorials/genabel/GenABEL_with_PLINK1.9.pdf GenABEL Exercise <nowiki>[PDF]</nowiki>]
+
To run the exercise from the downloaded docker image,
* [[GeneABEL Exercise|Commands in Exercise]]
+
  
==GWAS: Data Quality Control==
+
<pre>docker run --rm -p 8888:8888 statisticalgenetics/mendelian-randomization</pre>
* [http://statgen.us/files/tutorials/gwas-qc/PLINK_data_QC.pdf Exercise <nowiki>[PDF]</nowiki>]
+
* [[GWAS Data QC Exercise|Commands in Exercise]]
+
  
====Installing Packages====
+
==Pleiotropy and Mediation Analysis==
To install from packages, follow the configuration steps above and run the following command.
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Pleiotropy.pdf Pleiotropy Exercise [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Pleiotropy_Outputs.pdf Pleiotropy Output [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handout/Pleiotropy_answers.pdf Pleiotropy Docker Image]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Pleiotropy_Questions.pdf Pleiotropy Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Pleiotropy_Answers.pdf Pleiotropy Answers [PDF]]
  
<pre>sudo apt-get install plink-tutorial</pre>
+
To pull and download the docker image from the Docker Hub repository,
The exercise's files will then be installed in the folder ''/home/shared/Plink_DataQC''. You can run from there or copy the files into your user's home directory and proceed with the exercise.
+
  
==GWAS: Association Analysis Controlling for Population Substructure==
+
<pre>docker pull statisticalgenetics/pleiotropy</pre>
* [http://statgen.us/files/tutorials/gwas-substructure/GWAS_Data_Controlling_for_Substructure.pdf Exercise <nowiki>[PDF]</nowiki>]
+
To run the exercise from the downloaded docker image,
* [[GWAS_Controlling_for_Population_Substructure|Commands in Exercise]]
+
  
====Installing Packages====
+
<pre>docker run --rm -p 8888:8888 statisticalgenetics/pleiotropy</pre>
To install from packages, follow the configuration steps above and run the following command.
+
  
<pre>sudo apt-get install plink-tutorial</pre>
+
==PLINK GWAS: Data Quality Control and Association Analysis Controlling for Population Substructure==
The exercise's files will then be installed in the folder ''/home/shared/Plink_substructure''. You can run from there or copy the files into your user's home directory and proceed with the exercise.
+
These exercises run using a shared docker image, however the exercises are split into two separate notebooks.
  
<!--
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_Data_QC.pdf PLINK GWAS: Data QC Exercise [PDF]]
==Population Genetics==
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_Data_QC_Outputs.pdf PLINK GWAS: Data QC Output [PDF]]
* [http://statgen.us/files/tutorials/population/berlinseq.2.2.PopGen_exercise.pdf Population Exercise <nowiki>[PDF]</nowiki>]
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_Data_QC_Questions.pdf PLINK GWAS: Data QC Questions [PDF]]
* [http://statgen.us/files/tutorials/population/berlinseq.2.2.PopGen_answers.pdf Exercise Answers <nowiki>[PDF]</nowiki>]
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_Data_QC_Answers.pdf PLINK GWAS: Data QC Answers [PDF]]
* [http://statgen.us/files/tutorials/population/popgen_drift.q Commands for popgen_drift]
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_GWAS_Substructure.pdf PLINK GWAS: Population Substructure Exercise [PDF]]
* [http://statgen.us/files/tutorials/population/popgen_selection.q Commands for popgen_selection]
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_GWAS_Substructure_Outputs.pdf PLINK GWAS: Population Substructure Output [PDF]]
-->
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_GWAS_Substructure_Questions.pdf PLINK GWAS: Population Substructure Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/PLINK_GWAS_Substructure_Answers.pdf PLINK GWAS: Population Substructure Answers [PDF]]
 +
* [https://hub.docker.com/r/statisticalgenetics/plink-gwas PLINK GWAS Docker Image]
  
==Population Genetics==
+
To pull and download the docker image from the Docker Hub repository,
* [http://statgen.us/files/tutorials/population/Popgen_exe_ans.pdf Popgen Exercise <nowiki>[PDF]</nowiki>]
+
* [http://statgen.us/files/tutorials/population/popgen_drift.q Commands for popgen_drift]
+
* [http://statgen.us/files/tutorials/population/popgen_selection.q Commands for popgen_selection]
+
  
==PSEQ==
+
<pre>docker pull statisticalgenetics/plink-gwas</pre>
* [http://statgen.us/files/tutorials/pseq/PSEQ_exercise.pdf PSEQ Exercise <nowiki>[PDF]</nowiki>]
+
To run the exercise from the downloaded docker image,
* [[PSEQ Commands in Exercise|Commands in Exercise]]
+
  
==Regression==
+
<pre>docker run --rm -p 8888:8888 statisticalgenetics/plink-gwas</pre>
* [http://statgen.us/files/tutorials/regression_exercise.pdf Regression Exercise <nowiki>[PDF]</nowiki>]
+
* [[Regression_Exercise|Commands in Exercise]]
+
  
To install from packages, follow the configuration steps above and run the following command.
+
==Power Analysis==
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Power_Calculations_Questions.pdf Power Analysis Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Power_Calculations_Answers.pdf Power Analysis Answers [PDF]]
  
<pre>sudo apt-get install regression-tutorial</pre>
+
==REGENIE==
The exercise's files will then be installed in the folder ''/home/shared/regression''. You can run from there or copy the files into your user's home directory and proceed with the exercise.
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regenie.pdf Regenie Exercise [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regenie_Outputs.pdf Regenie Output [PDF]]
 +
* [https://hub.docker.com/r/statisticalgenetics/regenie Regenie Docker Image]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regenie_Questions.pdf Regenie Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regenie_Answers.pdf Regenie Answers [PDF]]
  
==RV-TDT==
+
To pull and download the docker image from the Docker Hub repository,
* [http://statgen.us/files/tutorials/rvtdt/rvtdt_exercise.pdf Exercise <nowiki>[PDF]</nowiki>]
+
* [[RV-TDT|Commands in Exercise]]
+
  
====Installing Packages====
+
<pre>docker pull statisticalgenetics/regenie</pre>
To install from packages, follow the configuration steps above and run the following command.
+
To run the exercise from the downloaded docker image,
  
<pre>sudo apt-get install rvtdt-tutorial</pre>
+
<pre>docker run --rm -p 8888:8888 statisticalgenetics/regenie</pre>
The exercise's files will then be installed in the folder ''/home/shared/rvtdt''. You can run from there or copy the files into your user's home directory and proceed with the exercise.
+
  
==SEQSpark==
+
==Regression and Intro to PLINK and R==
* [http://statgen.us/files/tutorials/seqspark/SEQSpark_exercise_Final_v4.pdf SEQSpark Exercise <nowiki>[PDF]</nowiki>]
+
These exercises run using a shared docker image, however the exercises are split into two separate notebooks.
* [[SEQSpark|Commands in Exercise]]
+
* [http://statgen.us/files/images/SEQSpark.ova Virtual Machine Image]
+
  
====Installing Packages====
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regression.pdf Regression Exercise [PDF]]
To install from packages, follow the configuration steps above and run the following command.
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regression_Outputs.pdf Regression Output [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regression_Questions.pdf Regression Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Regression_Answers.pdf Regression Answers [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Intro_Plink_R.pdf Intro to PLINK & R Exercise [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Intro_Plink_R_Outputs.pdf Intro to PLINK & R Output [PDF]]
 +
* [https://hub.docker.com/r/statisticalgenetics/regression-plink-r Regression and Intro to PLINK & R Docker Image]
  
<pre>sudo apt-get install seqspark-tutorial</pre>
+
To pull and download the docker image from the Docker Hub repository,
The exercise's files will then be installed in the folder ''/home/shared/seqspark''. You can run from there or copy the files into your user's home directory and proceed with the exercise.In order for the
+
commands to work correctly, you don't need to reboot, but you should log out and log back in to make sure that the computer's environment is correctly configured.
+
  
==Variant Association Tools==
+
<pre>docker pull statisticalgenetics/regression-plink-r</pre>
* [http://statgen.us/files/tutorials/VAT_exercise_2018_nographs.pdf VAT Exercise <nowiki>[PDF]</nowiki>]
+
To run the exercise from the downloaded docker image,
* [[VAT Commands in Exercise|Commands in Exercise]]
+
  
====Installing Packages====
+
<pre>docker run --rm -p 8888:8888 statisticalgenetics/regression-plink-r</pre>
To install from packages, follow the configuration steps above and run the following command.
+
  
<pre>sudo apt-get install vtools-tutorial</pre>
+
==Pencil and Paper Exercise==
The exercise's files will then be installed in the folder ''/home/shared/vat''. You can run from there or copy the files into your user's home directory and proceed with the exercise.
+
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Population_Genetics_Questions.pdf Population Genetics Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Population_Genetics_Answers.pdf Population Genetics Answers [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Linkage_Disequilibrium_Questions.pdf Linkage Disequilibrium Questions [PDF]]
 +
* [https://github.com/statgenetics/statgen-courses/blob/master/handouts_2026/Linkage_Disequilibrium_Answers.pdf Linkage Disequilibrium Answers [PDF]]

Latest revision as of 10:43, 22 September 2026

Tutorials for Courses

Running Tutorials on Your Computer

We adopt docker to run our course material, and we have created various docker repositories with freely available Docker images for users to readily run our exercises on their own computers using Docker Desktop. These docker images are for multi-platform use (Mac, Windows, or Linux). More information regarding instructions to install Docker Desktop and to run the course material on your computer is detailed in the documentation below. 

General instructions

Tutorial specific instructions

Please refer to the previous section for instructions on the installation of Docker Desktop and basic usages. 

Material and instructions for specific exercise are listed in each section below. They provide links to pdf versions of the exercises and a minimal set of commands to use for downloading the docker images and running an exercise. 

FastLMM & GCTA

To pull and download the docker image from the Docker Hub repository,

docker pull statisticalgenetics/fastlmm-gcta

To run the exercise from the downloaded docker image,

docker run --rm -p 8888:8888 statisticalgenetics/fastlmm-gcta

Mendelian Randomization

To pull and download the docker image from the Docker Hub repository,

docker pull statisticalgenetics/mendelian-randomization

To run the exercise from the downloaded docker image,

docker run --rm -p 8888:8888 statisticalgenetics/mendelian-randomization

Pleiotropy and Mediation Analysis

To pull and download the docker image from the Docker Hub repository,

docker pull statisticalgenetics/pleiotropy

To run the exercise from the downloaded docker image,

docker run --rm -p 8888:8888 statisticalgenetics/pleiotropy

PLINK GWAS: Data Quality Control and Association Analysis Controlling for Population Substructure

These exercises run using a shared docker image, however the exercises are split into two separate notebooks.

To pull and download the docker image from the Docker Hub repository,

docker pull statisticalgenetics/plink-gwas

To run the exercise from the downloaded docker image,

docker run --rm -p 8888:8888 statisticalgenetics/plink-gwas

Power Analysis

REGENIE

To pull and download the docker image from the Docker Hub repository,

docker pull statisticalgenetics/regenie

To run the exercise from the downloaded docker image,

docker run --rm -p 8888:8888 statisticalgenetics/regenie

Regression and Intro to PLINK and R

These exercises run using a shared docker image, however the exercises are split into two separate notebooks.

To pull and download the docker image from the Docker Hub repository,

docker pull statisticalgenetics/regression-plink-r

To run the exercise from the downloaded docker image,

docker run --rm -p 8888:8888 statisticalgenetics/regression-plink-r

Pencil and Paper Exercise