Skip to content

Commit

Permalink
Merge pull request #8 from pasmopy/yamashiro
Browse files Browse the repository at this point in the history
Fix R script
  • Loading branch information
Hiroaki Imoto committed Jun 19, 2021
2 parents c5d47be + 937331d commit a5d5612
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions classification/brca_heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,8 @@ annotation[is.na(annotation)] <- 0
for (i in 1:nrow(annotation)){
if (annotation$days_to_death[i] == 0){
annotation$prognosis[i] <- 20
} else if (annotation$days_to_death[i] < 365 & annotation$days_to_death[i] > 0) {
annotation$prognosis[i] <- 1
} else if (annotation$days_to_death[i] > 366 & annotation$days_to_death[i] < 730){
annotation$prognosis[i] <- 2
} else if (annotation$days_to_death[i] > 731 & annotation$days_to_death[i] < 1095){
annotation$prognosis[i] <- 3
} else if (annotation$days_to_death[i] > 1096 & annotation$days_to_death[i] < 1825){
annotation$prognosis[i] <- 4
} else if (annotation$days_to_death[i] > 1826 & annotation$days_to_death[i] < 2190){
annotation$prognosis[i] <- 5
} else if (annotation$days_to_death[i] > 2191 & annotation$days_to_death[i] < 2555){
annotation$prognosis[i] <- 6
} else if (annotation$days_to_death[i] > 2556 & annotation$days_to_death[i] < 2920){
annotation$prognosis[i] <- 7
} else if (annotation$days_to_death[i] > 2921 & annotation$days_to_death[i] < 3650){
annotation$prognosis[i] <- 8
} else if (annotation$days_to_death[i] > 3651 & annotation$days_to_death[i] < 4015){
annotation$prognosis[i] <- 9
} else if (annotation$days_to_death[i] > 4016 & annotation$days_to_death[i] < 4380){
annotation$prognosis[i] <- 10
} else if (annotation$days_to_death[i] > 4381){
annotation$prognosis[i] <- 11
} else {
annotation$prognosis[i] <- floor(annotation$days_to_death[i]/365)
}
}

Expand Down

0 comments on commit a5d5612

Please sign in to comment.