deps/kb_meme/meme-5.0.1/src/momo-input.c
/**
 * Parse a tsv body line into filter_value, sequence, scan, and protein_id
 */
Parse a tsv body line into filter_value, sequence, scan, and protein_id
Parse a tsv body line into filter_value sequence scan and protein_id
void parse_tsv_bodyline(MOMO_OPTIONS_T* options,
                        char** filter_value,
                        char** sequence,
                        char** scan,
                        char** protein_id,
                        int index_of_filter,
                        int index_of_sequence,
                        int index_of_scan,
                        int index_of_protein,
                        char* line) {
  char* token;
  int i = 0;
  while ((token = strsep(&line, "\t")) != NULL) {
    if (i == index_of_sequence) {
      *sequence = strdup(token);
    }
    if (i == index_of_scan) {
      *scan = strdup(token);
    }
    if (i == index_of_protein) {
      *protein_id = strdup(token);
    }
    if (options->filter && i == index_of_filter) {
      *filter_value = strdup(token);
    }
    i++;
  }
}
void parse_tsv_bodyline ( MOMO_OPTIONS_T * options , char * * filter_value , char * * sequence , char * * scan , char * * protein_id , int index_of_filter , int index_of_sequence , int index_of_scan , int index_of_protein , char * line ) { char * token ; int i = 0 ; while ( ( token = strsep ( & line , " \t " ) ) != NULL ) { if ( i == index_of_sequence ) { * sequence = strdup ( token ) ; } if ( i == index_of_scan ) { * scan = strdup ( token ) ; } if ( i == index_of_protein ) { * protein_id = strdup ( token ) ; } if ( options -> filter && i == index_of_filter ) { * filter_value = strdup ( token ) ; } i ++ ; } }
Parse a tsv body line into filter_value, sequence, scan, and protein_id
Parse a tsv body line into filter_value sequence scan and protein_id