Definition Measures of LD Normalized LD \(r^2\) - correlation coefficient for bi-allelic loci LD of multiple allelic loci or multiple loci References Definition Consider a pair of genes A and B, each has 2 alleles A/a and B/b, respectively. When applying Mendelian inheritance on the population level, one can predict the relative frequency of all 4 combinations (i.e. haplotype), given the relative frequency of each allele.

Continue reading

Usage Click on the scatter plot area, or type in the coordinates to add a new point, for example type -3 4 to add a point at \((-3,4)\). [To be implemented] Right-click on a point to remove it Drag the point around to change it coordinate Observe the correlation measures to see how they change with your data points Correlation measures Pearson correlation The Pearson correlation coefficient between a pair of vairable \((X,Y)\) is defined as [1]

Continue reading

Importance sampling

An example Formalization References \[ \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\E}{\mathbb{E}} \] An example The example below is taken from [1] Let \(X\) be a random variable with uniform distribution in \([0,10]\), \[ X \sim Uniform(0,10) \] Consider the function \(h(x) = 10 e^{-2|x-5|}\). Suppose we want to calculate \(\E_X[h(X)]\). By definition, \[\begin{align} \E_X[h(X)] &= \int_{0}^{10} h(x) f(x)dx \\ &= \int_{0}^{10} exp(-2|x-5|) dx \end{align}\] A straightforward way to do this is sampling \(X_i\) from the uniform(0,10) density and calculating the mean of \(10\cdot h(X_i)\)

Continue reading

\[ \newcommand{\matrix}[1]{\mathbf{#1}} \] Let \(\matrix{A}\) be a data set of \(m\) points in \(\mathbb{R}^d\). One application of SVD is to create a compressed representation of \(\matrix{A}\). Rank-\(k\) approximation of \(A\) is created by calculating the singular value decomposition of \(\matrix{A}\) \[ \matrix{A} = \matrix{U}\matrix{\Sigma}{\matrix{V}} \] and reconstruct it with \(k \leq d\) first singular values. \[ \matrix{A_k} = \matrix{U_k}\matrix{\Sigma_k}\matrix{V_k^T} \] SVD in R Each implementation of SVD has some varieties in the output representation.

Continue reading

Packing web with webpack

Pre-requisites Starting directory structure Install the dependencies for development Install the dependencies of your package Configure webpack This tutorial will work you through the use of webpack to bundle your website or application. The code is available at https://github.com/ttdtrang/woofing-golden Pre-requisites You will need Node.js npm package manager Webpack installation will be included in the tutorial. Starting directory structure Assume we have a directory woofing-golden which contains the codes for your web app.

Continue reading

1 Description Ubuntu 16.04 Server Edition, installed with desktop environment Freezes suddenly and randomly, everything except the mouse ssh works fine restart works, only until login screen. Once logged in, nothing appears (system menu, desktop, mouse click doesn’t work, etc.) 2 Diagnosis Look at /var/log/kernel.log and /var/log/syslog for the related message Dec 1 16:44:36 neurocan kernel: [ 140.789097] nouveau 0000:02:00.0: Xorg[2366]: failed to idle channel 4 [Xorg[2366]] Dec 1 16:44:37 neurocan kernel: [ 141.

Continue reading

This task is an embarrassingly parallel task, as explored in a previous post. import numpy as np import pandas as pd import time from scipy.stats import pearsonr from pyspark import SparkContext, SparkConf from scipy.sparse import coo_matrix ## The measurement (input data) is specified in a matrix ## samples x variables m = 150 n = 1000 measurements = np.random.rand(m*n).reshape((m,n)) nThreads = [1,2,4,6,8,10,12,14,16] dt = np.zeros(len(nThreads)) for i in range(len(nThreads)): ## Parameters NMACHINES = nThreads[i] NPARTITIONS = NMACHINES*4 conf = (SparkConf() .

Continue reading

Author's picture

Trang Tran


Student

USA