Skip to content

Instantly share code, notes, and snippets.

@gregcaporaso
Last active August 29, 2015 14:18
Show Gist options
  • Save gregcaporaso/7cfeab8c15755d96a05a to your computer and use it in GitHub Desktop.
Save gregcaporaso/7cfeab8c15755d96a05a to your computer and use it in GitHub Desktop.
BIO/CS 290, BIO 599 Assignment 5: Spring 2015
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "",
"signature": "sha256:1c43a81b3ad0d9eaa919b60b75ff498d2549e1b30a738e6e5bce40714c08e255"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Human/Population Genetics Assignment\n",
"====================================\n",
"\n",
"Purpose\n",
"-------\n",
"This assignment will first require you to gain familiarity with two of the most common web based tools for dealing with human genomics, the UCSC human genome browser and the 1000 genomes database. All of the questions in this assignment will be based on actual data from those two sites. Once you are familiar with these tools, you will use the data to complete some simple population genetics excercises.\n",
"\n",
"Goals\n",
"-----\n",
"Become familiar with resources in the field of human genetics. Develop an understanding of how the principles of population genetics can be used to deduce physical characteristics of populations based on a given populations genetic makeup\n",
"\n",
"\n",
"IMPORTANT\n",
"---------\n",
"You should turn in two files a .pdf file with all of your written answers and a .ipynb file with any code that you ran."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Below are a few functions that you will need to complete the assignment.\n",
"----------------------\n",
"\n",
"Remember to learn about what a function does you can run:\n",
"\n",
"`help(name_of_function)`\n",
"\n",
"Try this with the funcitons below to see what they do."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"from assignment_5_util import get_genotype_counts, create_x2_distribution_plot"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Question 1\n",
"----------\n",
"\n",
"1. Go to the [UCSC genome browser](http://genome.ucsc.edu/). Search for BRCA1 (use the top hit for this gene).\n",
"2. What are the genomic coordinates of this gene?\n",
"2. What is the function of this gene?\n",
"3. What is the size of the open reading frame(ORF)?\n",
"4. How many Exons does this gene have?\n",
"5. Does it have any orthologs? "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Question 2\n",
"----------\n",
"\n",
"\n",
"1. Use the Blat tool in the UCSC genome browser to search for this sequence: TTTCTTGATCACATAGACTTCCATTTTCTACTTTTTCTGA in Humans.\n",
"2. What are the chromosomes listed in the results? \n",
"3. What is the score of the 3rd hit? \n",
"4. Why might there be a match that is not the full length of the reference sequence? Hint: you may need to resear\n",
"5. Why might an identical sequence be in two different locations in the genome?\n",
"6. Search for the same sequence but this time in gorilla, orangutan and rhesus monkey, is the gene present on two chromosomes in each of these species? One? None?\n",
"7. Does your answer to 6 suggest anything about when the duplication event occurred? "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Question 3\n",
"----------\n",
"\n",
"There are three vcf files available, generated from the 1000 genomes dataset. Complete the follwing questions for the GBR population and the Finnish populations individually and then again for the populations together. For the snp at location: 89721094. You are welome to calculate these values by hand or with python.You will need to show your work. \n",
"\n",
"The three vcf files which can be opened by running the cell below contain information about the Finnish population(FIN) the British population(GBR) and the two populations together(GBR_and_FIN)\n",
"\n",
"1. What information is contained in the VCF file. Hint: explore this on the [1000 genomes website](http://www.1000genomes.org/)\n",
"2. What are the allele frequencies for this SNP?\n",
"3. What is the predicted heterozygosity?\n",
"4. What is the actual heterozygosity?\n",
"5. Create a null and alternative hypothesis to test if this SNP is in HWE\n",
"6. What is the chi-squared test statistic for this SNP?"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" #Use this call to calculate the values in question 3.\n",
"Great_Britain = 'GBR.vcf'\n",
"Finland = 'FIN.vcf'\n",
"GBR_and_FIN = 'GBR_and_FIN.vcf'"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Use this cell to help answer question 3"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Question 4\n",
"----------\n",
"\n",
"1. Use the `create_x2_distribution` function to estimate the p-value for each of the test statistic generated above. This does not have to be an exact number though you should indicate whether it is signifcant or not based an an alpha of .05.\n",
"2. Based on the p-values you estimated, is the snp in question in HWE in each of the three populations?\n",
"3. If the values are not in HWE discuss what could cause them not to be?\n",
"4. Based on the expected and observed heterozygosity of each population do you believe there is population structure between Finland and Great Britain. Discuss issues with the approach we took to answer this problem\n",
"\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Use this cell to answer question 4"
],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment