# NOT RUN {
load(system.file("extdata","nbl_result_matrix_sign_small.rda",package = "CNVScope"))
submatrix_tiny<-nbl_result_matrix_sign_small
tiny_test<-getAsymmetricBlockIndices(submatrix_tiny,nb_change_max=10,algorithm="jointSeg")
# }
# NOT RUN {
submatrix_wide<-submatrix_tiny[1:5,]
submatrix_narrow<-submatrix_tiny[,1:5]
wide_test<-getAsymmetricBlockIndices(submatrix_wide,distrib = "G",model = "Dplus",
nb_change_max = 1e4)
#the below work, but the time to run all of these would be greater than 10 seconds..
random_wide<-matrix(runif(n = 400*200),ncol=400,nrow=200)
random_narrow<-matrix(runif(n = 400*200),ncol=200,nrow=400)
random_wide_test_avg<-getAsymmetricBlockIndices(random_wide,
distrib = "G",model = "Dplus",nb_change_max = 1e4)
random_narrow_test_avg<-getAsymmetricBlockIndices(random_narrow,
distrib = "G",model = "Dplus",nb_change_max = 1e4)
random_wide_test_copy<-getAsymmetricBlockIndices(random_wide,
distrib = "G",model = "Dplus",nb_change_max = 1e4,MI_strategy = "copy")
random_narrow_test_copy<-getAsymmetricBlockIndices(random_narrow,
distrib = "G",model = "Dplus",nb_change_max = 1e4,MI_strategy = "copy")
genomicmatrix=random_narrow
nb_change_max=100
model = "D"
distrib = "G"
MI_strategy="copy"
#question-- does it pick different breakpoints if transposed first?
#Answer: yes, at least in Dplus model.
rm(genomicmatrix)
rm(model)
rm(distrib)
rm(MI_strategy)
random_wide_test_copy<-getAsymmetricBlockIndices(genomicmatrix = random_wide,
distrib = "G",
model = "Dplus",nb_change_max = 1e2,MI_strategy = "copy")
random_narrow_test_copy<-getAsymmetricBlockIndices(random_narrow,distrib = "G",
model = "Dplus",
nb_change_max = 1e2,MI_strategy = "copy")
random_wide_test_copy_t<-getAsymmetricBlockIndices(genomicmatrix = t(random_wide),
distrib = "G",model = "Dplus",
nb_change_max = 1e2,MI_strategy = "copy")
random_narrow_test_copy_t<-getAsymmetricBlockIndices(genomicmatrix = t(random_narrow),
distrib = "G",model = "Dplus",
nb_change_max = 1e2,MI_strategy = "copy")
length(intersect(random_wide_test_copy$breakpoints_col,
random_wide_test_copy_t$breakpoints_row))/length(unique(c(random_wide_test_copy$breakpoints_col,
random_wide_test_copy_t$breakpoints_row)))
random_wide_test_copy_with_transpose<-getAsymmetricBlockIndices(genomicmatrix = random_wide,
distrib = "G",model = "Dplus",nb_change_max = 1e2,MI_strategy = "copy",transpose = T)
random_narrow_test_copy_with_transpose<-getAsymmetricBlockIndices(genomicmatrix = random_narrow,
distrib = "G",model = "Dplus",nb_change_max = 1e2,MI_strategy = "copy",transpose = T)
random_narrow_test_copy_with_transpose<-getAsymmetricBlockIndices(genomicmatrix = random_narrow,
distrib = "G",model = "Dplus",nb_change_max = 1e2,MI_strategy = "copy",transpose = T)
conserved_breakpoints_col<-intersect(random_narrow_test_copy_with_transpose$breakpoints_col,
random_narrow_test_copy_with_transpose$t_breakpoints_row)
conserved_breakpoints_row<-intersect(random_narrow_test_copy_with_transpose$breakpoints_row,
random_narrow_test_copy_with_transpose$t_breakpoints_col)
random_wide_test_copy_with_transpose<-getAsymmetricBlockIndices(genomicmatrix = random_wide,
distrib = "G",model = "Dplus",nb_change_max = 1e2,MI_strategy = "copy",transpose = T)
conserved_breakpoints_col<-intersect(random_wide_test_copy_with_transpose$breakpoints_col,
random_wide_test_copy_with_transpose$t_breakpoints_row)
conserved_breakpoints_row<-intersect(random_wide_test_copy_with_transpose$breakpoints_row,
random_wide_test_copy_with_transpose$t_breakpoints_col)
# }
Run the code above in your browser using DataLab