
Get Sample Order based on Proliferation Score.
get_sample_order.RdReturn a sample order based on the late/early ratio (proliferation score).
Arguments
- expr_data
Required parameter, should be the output from
classify_samples(). Note, this function required theclassify_samplesto be run withinclude_data = TRUEargument.- return_this
Set to "late_early" to return late/early ratio. Set to "sample_order" to return the sample order based on late/early ratio (default).
Details
Modified version of the heatmap function plot_classification_heatmap(),
this function only returns the order of samples to be used for downstream plotting functions.
The order is dictated by the early late ratio. and the sample order can readily be sued
elsewhere, if needed.
Examples
#run classifier
sjodahl_classes = classify_samples(this_data = sjodahl_2017,
log_transform = FALSE,
adjust = TRUE,
impute = TRUE,
include_data = TRUE,
verbose = FALSE)
#get sample order
get_sample_order(expr_data = sjodahl_classes$data)
#> [1] 158 194 142 171 43 76 235 83 160 31 68 237 232 187 22 130 259 163
#> [19] 134 245 55 168 131 234 99 47 161 61 137 7 85 236 199 28 264 175
#> [37] 254 202 266 13 94 184 3 253 231 26 54 164 95 103 178 179 221 223
#> [55] 73 224 132 113 46 49 102 166 241 112 97 100 41 167 107 249 239 15
#> [73] 220 91 9 4 114 242 64 36 119 62 233 56 243 29 98 191 246 225
#> [91] 247 205 63 222 240 206 227 156 14 79 21 252 58 190 65 1 248 145
#> [109] 117 125 151 200 251 101 155 172 215 51 212 165 78 69 77 162 75 20
#> [127] 218 81 229 24 116 244 126 170 108 105 123 60 141 136 256 133 80 111
#> [145] 138 23 19 48 208 93 159 188 72 216 12 217 192 25 209 147 182 5
#> [163] 181 122 110 18 230 92 27 124 86 135 257 228 152 66 71 183 118 10
#> [181] 204 44 50 121 57 37 250 186 40 197 153 115 219 203 89 30 177 90
#> [199] 96 139 143 42 201 144 11 106 70 176 150 260 154 6 169 238 185 193
#> [217] 207 180 87 33 173 16 149 104 262 195 35 127 258 109 129 59 261 32
#> [235] 52 211 213 148 263 82 38 120 2 45 53 84 74 196 140 174 267 146
#> [253] 39 67 265 88 17 210 255 214 189 226 128 8 34 157 198
#> Returning sample order...
#> [1] 158 194 142 171 43 76 235 83 160 31 68 237 232 187 22 130 259 163
#> [19] 134 245 55 168 131 234 99 47 161 61 137 7 85 236 199 28 264 175
#> [37] 254 202 266 13 94 184 3 253 231 26 54 164 95 103 178 179 221 223
#> [55] 73 224 132 113 46 49 102 166 241 112 97 100 41 167 107 249 239 15
#> [73] 220 91 9 4 114 242 64 36 119 62 233 56 243 29 98 191 246 225
#> [91] 247 205 63 222 240 206 227 156 14 79 21 252 58 190 65 1 248 145
#> [109] 117 125 151 200 251 101 155 172 215 51 212 165 78 69 77 162 75 20
#> [127] 218 81 229 24 116 244 126 170 108 105 123 60 141 136 256 133 80 111
#> [145] 138 23 19 48 208 93 159 188 72 216 12 217 192 25 209 147 182 5
#> [163] 181 122 110 18 230 92 27 124 86 135 257 228 152 66 71 183 118 10
#> [181] 204 44 50 121 57 37 250 186 40 197 153 115 219 203 89 30 177 90
#> [199] 96 139 143 42 201 144 11 106 70 176 150 260 154 6 169 238 185 193
#> [217] 207 180 87 33 173 16 149 104 262 195 35 127 258 109 129 59 261 32
#> [235] 52 211 213 148 263 82 38 120 2 45 53 84 74 196 140 174 267 146
#> [253] 39 67 265 88 17 210 255 214 189 226 128 8 34 157 198