From 6f6099687d5bce54487e23a5563fb5a038f66fcc Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Tue, 29 Nov 2016 16:52:41 +0100 Subject: [PATCH] Sequence alignment: if no sequence column is given and the view has the type NUC_SEQS_VIEW, the default sequence column is aligned --- src/obi_align.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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");