/* Read an alignment in FASTA format */
alignment =
NJ_read_fasta(nj_args);
-
+
if(!alignment) {
return(NULL);
}
* From proteins, we may want to allow users to specify
* a substitution matrix (feature)
*/
+
dmat =
NJ_compute_dmat(nj_args,
alignment);
if(!dmat) {
fprintf(stderr, "Clearcut: Error computing distance matrix\n");
}
-
+
/* now free the memory associated with the alignment */
NJ_free_alignment(alignment);
/* allocate val matrix in dmat */
dmat->val = (float *)calloc(dmat->ntaxa*dmat->ntaxa, sizeof(float));
+
if(!dmat->val) {
fprintf(stderr, "Clearcut: Memory allocation error in NJ_compute_dmat()\n");
return(NULL);
fprintf(stderr, "Clearcut: Invalid distance correction model.\n");
return(NULL);
}
-
+
return(dmat);
}