Commit 7c3a1dd6 authored by Stefano Beretta's avatar Stefano Beretta
Browse files

Update VisualZoneR_analysis.R

parent 15241bb6
...@@ -72,16 +72,17 @@ for (sample in samples) { ...@@ -72,16 +72,17 @@ for (sample in samples) {
# Final Zones # Final Zones
finalScores <- masub1 + masub1liv finalScores <- masub1 + masub1liv
finalScores[finalScores == (-4)] <- "Zone_A" finalzones <- finalScores
finalScores[finalScores == (-3)] <- "Zone_B" finalzones[finalzones == (-4)] <- "Zone_A"
finalScores[finalScores == (-2)] <- "Zone_C" finalzones[finalzones == (-3)] <- "Zone_B"
finalScores[finalScores == (-1)] <- "Zone_D" finalzones[finalzones == (-2)] <- "Zone_C"
finalScores[finalScores == 0] <- "Zone_E" finalzones[finalzones == (-1)] <- "Zone_D"
finalScores[finalScores == 1] <- "Zone_F" finalzones[finalzones == 0] <- "Zone_E"
finalScores[finalScores == 2] <- "Zone_G" finalzones[finalzones == 1] <- "Zone_F"
finalScores[finalScores == 3] <- "Zone_H" finalzones[finalzones == 2] <- "Zone_G"
finalScores[finalScores == "NaN"] <- NA finalzones[finalzones == 3] <- "Zone_H"
FinalTable <- data.frame(SeuratID = as.vector(as.matrix(namesTokeep)), datasub1 = as.vector(as.matrix(finalScores)), drow = rep(1:nrow(masub1), ncol(masub1)), dcol = rep(1:ncol(masub1), nrow(masub1))[order(rep(1:ncol(masub1), nrow(masub1)))]) finalzones[finalzones == "NaN"] <- NA
FinalTable <- data.frame(SeuratID = as.vector(as.matrix(namesTokeep)), datasub1 = as.vector(as.matrix(finalzones)), drow = rep(1:nrow(masub1), ncol(masub1)), dcol = rep(1:ncol(masub1), nrow(masub1))[order(rep(1:ncol(masub1), nrow(masub1)))])
FinalTable <- na.omit(FinalTable) FinalTable <- na.omit(FinalTable)
SeuratPos <- names(crc.integrated@active.ident) SeuratPos <- names(crc.integrated@active.ident)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment