Description Usage Arguments Value See Also Examples
Converts contact map in sparse data frame format into data frame with interaction, where one row is single interaction. This is usefull for bootstraping Hi-C interactions.
1 | sparse2interactions(sparse.mtx)
|
sparse.mtx |
data.frame Hi-C contact map in sparse format with mandatory columns i, j, val |
data.frame with 2 columns, which are i-th (x) and j-th (y) coordinates of every interaction.
1 2 3 4 5 | # create data frame with artificial interactions, where val
# indicates total number of interactions between bins i and j
sparse.mtx <- data.frame(i = c(1,3,5,7,8,9,11), j = c(7,2,1,1,3,10,9), val = c(10,8,3,1,1,2,20))
print(sparse.mtx)
sparse2interactions(sparse.mtx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.