writeMeltedChromosomalMatrixToDisk {CNVScope} | R Documentation |
Writes an RData file with a ggplot2 object within the current directory.
writeMeltedChromosomalMatrixToDisk( whole_genome_matrix, chrom1, chrom2, filename, extra_data_matrix = NULL, transpose = F, sequential = T, debug = T, desired_range_start = 50, desired_range_end = 300 )
whole_genome_matrix |
A matrix to have edges averaged with genomic coordinates in the form chr1_50_100 set as the column and row names. |
chrom1 |
first chromosome of the two which will subset the matrix. (this is done in row-column fasion). |
chrom2 |
second chromosome of the two which will subset the matrix. (this is done in row-column fasion). |
filename |
the filename to be written |
extra_data_matrix |
A matrix with additional variables about each point, one position per row with as many variables as remaining columns. |
transpose |
transpose the matrix? |
sequential |
Disable paralleization with doParallel? registerDoSEQ() is used for this. |
debug |
verbose output for debugging |
desired_range_start |
the downsampled matrix must be of this size (rows & cols) at minimum |
desired_range_end |
the downsampled matrix must be of this size (rows & cols) at maximum |
ggplotmatrix a matrix with values sufficient to create a ggplot2 heatmap with geom_tile() or with ggiraph's geom_tile_interactive()
load(system.file("extdata","grch37.rda",package = "CNVScope")) load(system.file("extdata","nbl_result_matrix_sign_small.rda",package = "CNVScope")) load(system.file("extdata","ensembl_gene_tx_table_prot.rda",package = "CNVScope")) writeMeltedChromosomalMatrixToDisk(whole_genome_matrix = nbl_result_matrix_sign_small, chrom1 = 1,chrom2 = 1,desired_range_start = 25, desired_range_end = 25) file.remove("chr1_chr1_melted.RData")