User:Jtbchamp99/sandbox

GAMtools
GAMtools is a collection of software utilities for Genome Architecture Mapping data developed by Robert Beagrie. Bowtie2 is required before running GAMtools. Fastq format data is input file. The program will do sequence mapping first. Then windows calling, producing proximity matrics and quality control checks.

Mapping the sequencing data
The Gamtools use gamtools process_nps command to implement the mapping task. It maps the raw sequence data from the nuclear profiles.

Windows calling
Compute the number of reads from each nuclear profile, which overlap with each window in the background genome file. The default window size is 50kb. After this, it generates a segregation table.

Producing proximity matrices
The command for this process is gamtools matrix. The input file is the segregation table that calculated from windows calling.

Performing quality control checks
This function is included in the gamtools process_nps. With the quality control check, the gamtools can exclude poor quality nuclear profiles.

Calculating chromatin compaction
The GAMtools use gamtools compaction command to calculate an estimation of chromatin compaction. The level of compaction is inversely proportional to the locus volume. Genomic loci with a low volume are said to have a high level of compaction, and loci with a high volume have a low level of compaction. Loci with a low compaction level are expected to be intersected more often by the cryosection slices. GAMtools uses this information to assign a compaction value to each chromatid based on it's detection frequency across many nuclear profiles. The compaction rate of these loci is not static, and will continually change throughout the life of the cell. Genomic loci are thought to be de-compacted when that gene is active. This allows a researcher to make assumptions about which genes are currently active in a cell, using the results of the GAMtools data. A loci with low compaction is also thought to be related to transcriptional activity.

SLICE
SLICE (StatisticaL Inference of Co-sEgregation) plays a key role in GAM data analysis. It was developed in the laboratory of Mario Nicodemi to provide a math model to identify the most specific interactions among loci from GAM cosegregation data. It estimates the proportion of specific interaction for each pair loci at a given time. It is a kind of likelihood method. The first step of SLICE is to provide a function of the expected proportion of GAM nuclear profiles. Then find the best probability result to explain the experimental data.

SLICE Model
The SLICE Model is based on a hypothesis that the probability of non-interacting loci falls into the same nuclear profile is predictable. The probability is depended on the distance of these loci. The SLICE Model considers a pair of loci as two types: one is interacting, the other is non-interacting. As the hypothesis, the proportions of nuclear profiles state can be predicted by mathematical analysis. By deriving a function of the interaction probability, these GAM data can also be used to find prominent interactions and explore the sensitivity of GAM.

Calculate distribution in a single nuclear profile
SLICE considers a pair of loci can be interaction or non-interaction across the cell population. The first step of this calculation is to describe a single locus. A pair of loci, A and B, can have two possible states: one is that A and B have no interactions with each other. The other is that they have. The first problem is that whether a single locus can be found in a nuclear profile.

The mathematical expression is:

Single locus probability: $$v_0,v_1$$

- <$$v_1$$> probability that the locus is found in an nuclear profile.

- <$$v_0$$>$$=1-$$<$$v_1$$> probability that the locus is not found in a nuclear profile.

- <$$v_1$$>=$$V_{NP}/V_{nucleus}$$

Estimation of average nuclear radius
As the equation above, the volume of the nuclear is a necessary value for calculation. The radii of these nuclear profiles can be used to estimate the nuclear radius. The SLICE prediction for radius matches Monte Carlo simulations(more detail about this step will be updated after get the license of the figure in the original author's paper.). With the result of the estimated radius, the probability of two loci in a non-interacting state and the probability of these two loci in an interacting state can be estimated.

Here is the mathematical expression of non-interacting:

<$$u_i$$>,i = 0, 1, 2 represents: find 0, 1 or 2 loci of a pair of non-interacting loci.

Two loci in a non-interacting state:$$u_i$$

$$=,=,=$$

Here is the mathematical expression of interacting:

Estimation of two loci interaction state: $$t_i$$ probability

$$$$~$$$$, $$$$~0, $$$$~$$=1- $$

Calculate probability of pairs of loci in single nuclear profile
With the results of previous processes, the occurrence probability of a pair of loci in one nuclear profile can be calculated by statistics method. A pair of loci can exist in three different states. Each of them has a probability of $$P_i,i = 0, 1, 2$$

Occurrence probability of pairs of loci in single nuclear profiles:$$P_2,P_1,P_0$$

$$P_2$$: probability of two pairs of loci are in a state of interaction;

$$P_1$$: probability of one interacts the other, but the other does not interact;

$$P_0$$: probability of the two not interact.

SLICE Statistical Analysis

$$N_{0,0}/N=P_2+P_1+P_0$$

$$N_{2,0}/N=N_{0,2}=P_2+<t_1u_1>P_1+<u_1^2>P_0$$

$$N_{i,j}$$ represent: number i is for A. Number j is for B.(i and j are equal to 0, 1 or 2 loci).

Detection efficiency
As the number of experiments is limited, there should be some detection efficiency. Considering the detection efficiency can expand this SLICE model to accommodate additional complications. It is a statistical method to improve the calculation result. In this part, the GAM data is divided into two types: one is that the locus in the slice is found in the experiments, and the other is that the locus in the slice is not detected in the experiments.

Estimating interaction probabilities of pairs
Based on the estimated detection efficiency and the previous probability of $$u_0,u_1,u_2$$,the interaction probability of pairs can be calculated. The loci are detected by next generation sequencing.

Graph analysis approach
Once cosegregation of all of the targeted genomic windows has been calculated, related subsets or "communities" within the set of windows can be approximated via graph analysis.

Deriving an adjacency (graph) matrix
Once a cosegregation matrix has been established, the process of converting it to an adjacency matrix to represent a graph is a relatively simple process. Each cell of the cosegregation matrix must be compared to a threshold value between 0.0 and 1.0. This value can be adjusted depending on the desired specificity of the graph. If a higher value is chosen as the threshold, then the graph will generally have fewer edges, as high thresholds require the two windows to be strongly linked. If a lower value is chosen, then the graph will generally have more edges, as windows will not need to be as strongly linked to be classified as an edge. A reasonable starting point to set this value to is the mean value of the cosegregation graph. However, if the simple mean is used, then the threshold may be higher than intended. This is because the cosegregation value of any window to itself will be a value of 1.0. Since the adjacency matrix being constructed is non-reflexive, meaning that a window cannot share an edge with itself, the diagonal of the adjacency must be all zeroes, and the diagonal of the cosegregation matrix is not relevant. To compensate for this, one can simply discount the values along the diagonal of the cosegregation matrix to normalize the mean. To see the effect of this adjustment, see the attached figure. Once the threshold value is set, the translation becomes rather direct. If the cell of the cosegregation matrix is along the main diagonal, then its respective cell in the adjacency matrix will be 0 as previously mentioned. Otherwise, it is compared with the threshold. If the value is lower than the threshold, then the respective cell in the adjacency matrix will be a 0, otherwise it will be a 1.

Assess centrality of windows
Once the adjacency matrix has been established, then the windows can be assessed via several different measures of centrality. One such measure is degree centrality. Degree centrality is calculated by dividing the number of edges a given node of the graph (one of the genomic windows) has by the quantity of the total number of nodes minus one. See the included figure for an example of this calculation. The centrality of a node can be a good indicator of that individual node's potential to be strongly influential in the dataset based upon its relatively high amount of connections.

Community detection
Once centrality values have been calculated, it becomes possible to infer related subsets of the data. These related subsets of the data are called "communities" which are clusters in the data that are closely linked within, but not as closely linked to the rest of the data outside. While one of the most common applications of community detection is in regards to social media and mapping social connections, it can be applied to problems such as genomic interactions. A relatively simple method of approximating communities is to isolate several significant nodes based on centrality measures, such as degree centrality, and to then build communities from them. A community of a node will be the full set of nodes immediately linked to it, as well as the node itself. For instance, in the figure to the left, the community around node C would be all four nodes of the graph, while the community of D would just be nodes C and D. Detection of communities in genomic windows may highlight potential chromatin interactions, or other interactions not previously expected or understood, and provide a target for further study.