Description Usage Arguments Details Value Examples
View source: R/create_hic_table.R
Create hic.table object from a sparse upper triangular Hi-C matrix
1 2 |
sparse.mat1 |
Required, sparse upper triangular Hi-C matrix, 7 column BEDPE format of the upper triangle of the matrix, OR InteractionSet object with the genomic ranges of the interacting regions for the upper triangle of the Hi-C matrix and a single metadata column containing the interaction frequencies for each interacting pair for the first dataset you wish to jointly normalize. |
sparse.mat2 |
Required, sparse upper triangular Hi-C matrix, 7 column BEDPE format of the upper triangle of the matrix, OR InteractionSet object with the genomic ranges of the interacting regions for the upper triangle of the Hi-C matrix and a single metadata column containing the interaction frequencies for each interacting pair for the second dataset you wish to jointly normalize. |
chr |
The chromosome name for the matrices being entered i.e 'chr1' or 'chrX'. Only needed if using sparse upper triangular matrix format. If using BEDPE format leave set to NA. |
scale |
Logical, should scaling be applied to the matrices to adjust for total read counts. If TRUE the IFs of the second sparse matrix will be adjusted as follows: IF2_scaled = IF2 / (sum(IF2)/sum(IF1)). |
include.zeros |
Logical, If set to TRUE the function will include pairwise interactions where one of the interaction frequencies is 0. |
subset.dist |
Should the matrix be subset to only include interactions up
to a user specified matrix unit distance? i.e. to only include
the cells of the matrix which are at a unit distance less than or equal to
100 set |
subset.index |
Should the matrix be subset by a user specified distance?
Input as a vector of 4 numbers (i.start, i.end, j.start, j.end).
i.e. to only include a subset of the matrix with row numbers 20 <= i <= 40
and column numbers 30 <= j <= 50 set as |
This function is used to transform two sparse upper triangular Hi-C matrices
into an object usable in the hic_loess
function.
Sparse upper triangular Hi-C matrix format is typical of the Hi-C data available
from the Aiden Lab http://www.aidenlab.org/. If you have a full
Hi-C contact matrix, first transform it to sparse upper triangular format using
the full2sparse
function. Sparse matrices should have 3 columns
in the following order: Start location of region 1, Start location of region 2,
Interaction Frequency. Matrices in 7 column BEDPE format should
have 7 columns in the following order: Chromosome name of the first region,
Start location of first region, End location of first region,
Chromosome name of the second region, Start location of the second region,
End location of the second region, Interaction Frequency. Please enter either
two sparse matrices or two matrices in 7 column BEDPE format or two
InteractionSet objects; do not mix and match.
A hic.table object.
1 2 3 4 5 6 7 | # Create hic.table object using included Hi-C data in sparse upper
# triangular matrix format
data('HMEC.chr22')
data('NHEK.chr22')
hic.table <- create.hic.table(HMEC.chr22, NHEK.chr22, chr = 'chr22')
# View result
hic.table
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.