Description Usage Arguments Details Value
Converts a dataframe to a sparsematrix. required for ploting the HiC plots
1 | matrix.sparse(input)
|
input |
A dataframe of HiC interactions |
matrix.sparse <- function (input){
i <- Matrix::Matrix(as.matrix(input), sparse = TRUE) # Converts dataframe back to a matrix and converts this to a sparseMatrix format
output = summary(i) #Expands back to a list
colnames(output)= c("V1","V2","V3")
return(output)
}
A sparsematrix 3 columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.