| 158 | } |
| 159 | |
| 160 | bool SeekSubclones::PercentageTest(std::vector <float>& data, float& threshold) |
| 161 | { |
| 162 | int upvalues = 0; |
| 163 | int downvalues = 0; |
| 164 | bool subclone = false; |
| 165 | for (unsigned int i = 0; i < data.size(); i++) |
| 166 | { |
| 167 | if (data[i] < threshold) |
| 168 | { |
| 169 | downvalues++; |
| 170 | } |
| 171 | if (data[i] > threshold) |
| 172 | { |
| 173 | upvalues++; |
| 174 | } |
| 175 | } |
| 176 | int max_count = upvalues; |
| 177 | int min_count = downvalues; |
| 178 | if (upvalues < downvalues) |
| 179 | { |
| 180 | max_count = downvalues; |
| 181 | min_count = upvalues; |
| 182 | } |
| 183 | double percentage = 1; |
| 184 | if (max_count > 100) |
| 185 | { |
| 186 | percentage = (float)min_count/(float)max_count; |
| 187 | } |
| 188 | else {percentage = 1;} |
| 189 | if (percentage < 0.20 && (min_count + max_count > 100)) |
| 190 | { |
| 191 | subclone = true; |
| 192 | } |
| 193 | return subclone; |
| 194 | } |
| 195 | |
| 196 | |
| 197 | void SeekSubclones::EstimateSubclonalPopulation(vector <float> data, float threshold, int ploidy_) |
nothing calls this directly
no outgoing calls
no test coverage detected