Check whether the split GT array references valid allele IDs @param rec the record containing ref and alt alleles @param gt the split GT. @return false if any of the GT elements are out of range.
(VcfRecord rec, int[] gt)
| 292 | * @return false if any of the GT elements are out of range. |
| 293 | */ |
| 294 | public static boolean isValidGt(VcfRecord rec, int[] gt) { |
| 295 | final int maxId = rec.getAltCalls().size(); |
| 296 | for (int gtId : gt) { |
| 297 | if (gtId < MISSING_GT || gtId > maxId) { |
| 298 | return false; |
| 299 | } |
| 300 | } |
| 301 | return true; |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Check if the supplied file is has an extension indicative of VCF. |
no test coverage detected