RNA Detection

(nextflipdebug2) #1

  1. In subsequent steps, we apply the mapping method to this set
    of randomly generated samples and summarize the results for
    different thresholds.
    From this null distribution, we choose three different
    thresholds corresponding to different levels of confidence in
    the mapping:
    High confidence mapping: choose the number of voxels
    and the mapping score combination that is true for maximum
    of 10% of simulated samples, i.e., the probability of a simulated
    cell mapping back with the same criteria is less than 10%;
    Medium confidence mapping: the probability of a
    simulated cell mapping back with these criteria should be less
    than 30%;
    Low confidence mapping: the probability of a simulated
    cell mapping back with these criteria should be less than 50%.
    4.Example of the mapping of 10 simulated datasets:


#Iterate over 10 simulated datasets:
cell_counter¼ 1
mapping_simulated_list¼list()
for(dataset in 1:10) {
randomCells ¼ read.table(paste("simulated_data/",dataset,"_bin.data",
sep¼""))
randomRatios¼read.table(paste("simulated_data/",dataset,".data",sep¼""))


map each simulated cell


for(cell_i in 1:100) {
print(cell_i)
mapping_simulated_list[[cell_counter]]<- spatial_map_scoring(randomRa-
tios[cell_i,],randomCells[cell_i,],atlas_specificity_score,atlas)
cell_counter¼cell_counter +1
}
}


#convert to a data frame:
mapping_simulated¼data.frame(mapping_simulated_list)
colnames(mapping_simulated)¼paste("cell_",1:length(mapping_simulated_list),sep¼"")


  1. In the next step, we set the range of threshold scores and the
    number of voxels above that score for the evaluation of the results.
    As the thresholds are arbitrary and dataset dependent,
    choose the threshold_score numbers based on the mean scores
    across the whole simulated dataset.

  2. Set the threshold_number around the number of voxels that
    constitute 1–2 cell sizes. For example, if the mean score is 0 and
    one cell in the atlas is covered by 5–10 voxels:


Spatial Transcriptomics 119
Free download pdf