diff --git a/src/obi_align.c b/src/obi_align.c index 9fd747e..8453a7c 100644 --- a/src/obi_align.c +++ b/src/obi_align.c @@ -51,7 +51,15 @@ int obi_align_one_column(Obiview_p seq_view, OBIDMS_column_p seq_column, const c k = 0; - if ((seq_column->header)->returned_data_type != OBI_SEQ) + // If no sequence column is given and the view has the type NUC_SEQS_VIEW, the default sequence column is aligned + if ((seq_column == NULL) && (strcmp((seq_view->infos)->view_type, VIEW_TYPE_NUC_SEQS) == 0)) + { + seq_column = obi_view_get_column(seq_view, NUC_SEQUENCE_COLUMN); + if (seq_column == NULL) + return -1; + } + // Check that the given sequence column contains nucleotide sequences + else if ((seq_column->header)->returned_data_type != OBI_SEQ) { obi_set_errno(OBI_ALIGN_ERROR); obidebug(1, "\nTrying to align a column of a different type than OBI_SEQ");