@@ -210,14 +210,14 @@ calculate_cluster <- function(cluster_index,
210
210
}
211
211
212
212
# plot the bun values
213
- plot_bun_value <- function (bun_value ,annotation_info ){
213
+ plot_dun_value <- function (dun_value ,annotation_info ){
214
214
215
215
# Parameter in the function
216
- # bun_value : the bun values
216
+ # dun_value : the bun values
217
217
# annotation_info: the cell annotation information
218
218
219
219
# calculate the log2 values
220
- index_tmp = - log2(bun_value )
220
+ index_tmp = - log2(dun_value )
221
221
222
222
# prepare the data for the boxplot
223
223
longData = melt(as.matrix(index_tmp ))
@@ -303,28 +303,28 @@ pdf_dun_tsne <- function(tissue_name){
303
303
304
304
cluster_n = unique(knn5 )
305
305
306
- bun_value = c()
306
+ dun_value = c()
307
307
308
308
for (i in c(1 : dim(annotation_info )[1 ])){
309
309
310
310
if (i %in% cluster_n ){
311
311
312
312
tmp_val = calculate_cluster(i ,as.numeric(knn5 ),data_tsne )
313
313
314
- bun_value = cbind(bun_value ,tmp_val [[1 ]])
314
+ dun_value = cbind(dun_value ,tmp_val [[1 ]])
315
315
316
316
}else {
317
317
318
- bun_value = cbind(bun_value ,c(1 ,1 ,1 ,1 ,1 ,1 ))
318
+ dun_value = cbind(dun_value ,c(1 ,1 ,1 ,1 ,1 ,1 ))
319
319
320
320
}
321
321
322
322
}
323
323
324
- pp = plot_bun_value( bun_value ,annotation_info )
324
+ pp = plot_dun_value( dun_value ,annotation_info )
325
325
326
326
ggsave(
327
- filename = paste0(tissue_name , " _tsne_bun_index .pdf" ),
327
+ filename = paste0(tissue_name , " _tsne_dun_index .pdf" ),
328
328
plot = pp ,
329
329
width = 8 ,
330
330
height = 6
@@ -389,28 +389,28 @@ pdf_dun_tsne1 = function(tissue_name){
389
389
390
390
cluster_n = unique(knn5 )
391
391
392
- bun_value = c()
392
+ dun_value = c()
393
393
394
394
for (i in c(1 : dim(annotation_info )[1 ])){
395
395
396
396
if (i %in% cluster_n ){
397
397
398
398
tmp_val = calculate_cluster(i ,as.numeric(knn5 ),data_tsne )
399
399
400
- bun_value = cbind(bun_value ,tmp_val [[1 ]])
400
+ dun_value = cbind(dun_value ,tmp_val [[1 ]])
401
401
402
402
}else {
403
403
404
- bun_value = cbind(bun_value ,c(1 ,1 ,1 ,1 ,1 ,1 ))
404
+ dun_value = cbind(dun_value ,c(1 ,1 ,1 ,1 ,1 ,1 ))
405
405
406
406
}
407
407
408
408
}
409
409
410
- pp = plot_bun_value( bun_value ,annotation_info )
410
+ pp = plot_dun_value( dun_value ,annotation_info )
411
411
412
412
ggsave(
413
- filename = paste0(tissue_name , " _tsne_bun_index .pdf" ),
413
+ filename = paste0(tissue_name , " _tsne_dun_index .pdf" ),
414
414
plot = pp ,
415
415
width = 8 ,
416
416
height = 6
0 commit comments