RNA Detection

(nextflipdebug2) #1
threshold_score<- seq(-2,2,1)
threshold_number<- seq(5,15,5)

# Compute the number of simulated cells meeting the requirements # for the selected
combinations of scores and the number of voxels # above that score:
number_cells_above¼matrix(nrow¼length(threshold_score),ncol¼length(threshold_-
number))
for(j in 1:length(threshold_number)){
print(j)
number_cells_above[,j]¼unlist(lapply(seq_along(threshold_score),function(i){
sup¼apply(mapping_simulated,2,function(x){
length(x[x>threshold_score[i]])
})
length(sup[sup>threshold_number[j]])
}))
}
number_cells_above¼data.frame(number_cells_above)
rownames(number_cells_above)¼as.character(threshold_score)
colnames(number_cells_above)¼as.character(threshold_number)

# Compute the proportions
proportion_cells_thresholds¼number_cells_above/(dim(mapping_simulated)[2])
proportion_cells_thresholds


  1. Running this script should generate a table just as follows:


Voxels

Score^51015
 2 0.69 0.51 0.5
 1 0.39 0.31 0.25
0 0.25 0.25 0.19
1 0.17 0.17 0.17
2 0.15 0.07 0.07

Based on this table, we can define the values for the threshold-
ing of the mapping results for sequenced cells:

120 Kaia Achim et al.

Free download pdf