hmmer-3.3/easel/miniapps/esl-alimerge.c
/* validate_no_nongaps_in_rf_gaps
 *                   
 * Given an RF string with gaps defined as by alphabet <abc>
 * and another string of same length. Make sure none of the 
 * positions that are gaps in the RF string are non-gaps in the
 * other string. Return TRUE if none are. Return FALSE if at
 * least one is.
 * 
 * Returns TRUE if 0 characters in <other_str> in same position
 *         as a gap in <rf_str> are non-gaps. FALSE otherwise.
 */


Given an RF string with gaps defined as by alphabet 
and another string of same length. Make sure none of the
positions that are gaps in the RF string are non-gaps in the
other string. Return TRUE if none are. Return FALSE if at
least one is.

Returns TRUE if 0 characters in  in same position
as a gap in  are non-gaps. FALSE otherwise.
Given an RF string with gaps defined as by alphabet and another string of same length . Make sure none of the positions that are gaps in the RF string are non - gaps in the other string . Return TRUE if none are . Return FALSE if at least one is . Returns TRUE if 0 characters in in same position as a gap in are non - gaps . FALSE otherwise .
int 
validate_no_nongaps_in_rf_gaps(const ESL_ALPHABET *abc, char *rf_str, char *other_str, int64_t len) 
{
  int64_t i;
  for(i = 0; i < len; i++) { 
    if((! rfchar_is_nongap_nonmissing(abc, rf_str[i])) && (rfchar_is_nongap_nonmissing(abc, other_str[i]))) return FALSE;
  }
  return TRUE;
}
int validate_no_nongaps_in_rf_gaps ( const ESL_ALPHABET * abc , char * rf_str , char * other_str , int64_t len ) { int64_t i ; for ( i = 0 ; i < len ; i ++ ) { if ( ( ! rfchar_is_nongap_nonmissing ( abc , rf_str [ i ] ) ) && ( rfchar_is_nongap_nonmissing ( abc , other_str [ i ] ) ) ) return FALSE ; } return TRUE ; }
validate_no_nongaps_in_rf_gaps
validate_no_nongaps_in_rf_gaps