public List < Variant > read ( ) { Variant variant = null ; boolean valid = false ; while ( iterator . hasNext ( ) && ! valid ) { variant = iterator . next ( ) ; valid = isValid ( variant ) ; } if ( valid ) { // New variants in the variation collection created during the update of the frequencies may not have // the variant type set and this might cause NPE if ( variant . getType ( ) == null ) { variant . setType ( variant . inferType ( variant . getReference ( ) , variant . getAlternate ( ) ) ) ; } return Collections . singletonList ( variant ) ; } else { return null ; } }
Performs one read of from a CellBase variation collection .