ecopcr: fixed and improved the options to keep nuclotides around the
amplicon
This commit is contained in:
@ -77,7 +77,8 @@ static int create_output_columns(Obiview_p o_view, bool kingdom_mode);
|
||||
* @param err2 The number of errors in the second primer.
|
||||
* @param strand The DNA strand direction of the amplicon (R(everse) or D(irect)).
|
||||
* @param kingdom_mode Whether the kingdom or the superkingdom informations should be printed to the output.
|
||||
* @param keep_nucleotides Number of nucleotides kept on each side of the amplicon.
|
||||
* @param keep_nucleotides Number of nucleotides kept on each side of the amplicon (not including the primers if they are kept).
|
||||
* @param keep_primers Whether to keep the primers.
|
||||
* @param i_id_column A pointer on the input sequence identifier column.
|
||||
* @param o_id_column A pointer on the output sequence identifier column.
|
||||
* @param o_ori_seq_len_column A pointer on the original sequence length column.
|
||||
@ -124,6 +125,7 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view,
|
||||
int32_t err1, int32_t err2,
|
||||
char strand, bool kingdom_mode,
|
||||
int keep_nucleotides,
|
||||
bool keep_primers,
|
||||
OBIDMS_column_p i_id_column, OBIDMS_column_p o_id_column, OBIDMS_column_p o_ori_seq_len_column,
|
||||
OBIDMS_column_p o_amplicon_column, OBIDMS_column_p o_amplicon_length_column,
|
||||
OBIDMS_column_p o_taxid_column, OBIDMS_column_p o_rank_column, OBIDMS_column_p o_name_column,
|
||||
@ -328,6 +330,7 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view,
|
||||
int32_t err1, int32_t err2,
|
||||
char strand, bool kingdom_mode,
|
||||
int keep_nucleotides,
|
||||
bool keep_primers,
|
||||
OBIDMS_column_p i_id_column, OBIDMS_column_p o_id_column, OBIDMS_column_p o_ori_seq_len_column,
|
||||
OBIDMS_column_p o_amplicon_column, OBIDMS_column_p o_amplicon_length_column,
|
||||
OBIDMS_column_p o_taxid_column, OBIDMS_column_p o_rank_column, OBIDMS_column_p o_name_column,
|
||||
@ -382,7 +385,7 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view,
|
||||
oligo2[o1->patlen] = 0;
|
||||
error2 = err1;
|
||||
|
||||
if (keep_nucleotides == 0)
|
||||
if (!keep_primers)
|
||||
amplicon+=o2->patlen;
|
||||
else
|
||||
{
|
||||
@ -401,7 +404,7 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view,
|
||||
oligo2[o2->patlen] = 0;
|
||||
error2 = err2;
|
||||
|
||||
if (keep_nucleotides==0)
|
||||
if (!keep_primers)
|
||||
amplicon+=o1->patlen;
|
||||
else
|
||||
{
|
||||
@ -411,16 +414,11 @@ static int print_seq(Obiview_p i_view, Obiview_p o_view,
|
||||
}
|
||||
|
||||
ecoComplementSequence(oligo2);
|
||||
if (keep_nucleotides == 0)
|
||||
if (!keep_primers)
|
||||
amplicon[amplicon_len]=0;
|
||||
else
|
||||
{
|
||||
amplicon_len = ldelta+rdelta+amplicon_len;
|
||||
for (i=0; i<ldelta; i++)
|
||||
amplicon[i]|=32;
|
||||
for (i=1; i<=rdelta; i++)
|
||||
amplicon[amplicon_len-i]|=32;
|
||||
|
||||
amplicon[amplicon_len] = 0;
|
||||
}
|
||||
|
||||
@ -659,6 +657,7 @@ int obi_ecopcr(const char* i_dms_name,
|
||||
double salt,
|
||||
int saltmethod,
|
||||
int keep_nucleotides,
|
||||
bool keep_primers,
|
||||
bool kingdom_mode)
|
||||
{
|
||||
|
||||
@ -717,6 +716,9 @@ int obi_ecopcr(const char* i_dms_name,
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
if (keep_nucleotides > 0)
|
||||
keep_primers = true;
|
||||
|
||||
if (circular)
|
||||
{
|
||||
circular = strlen(primer1);
|
||||
@ -1076,6 +1078,7 @@ int obi_ecopcr(const char* i_dms_name,
|
||||
erri, errj,
|
||||
'D', kingdom_mode,
|
||||
keep_nucleotides,
|
||||
keep_primers,
|
||||
i_id_column, o_id_column, o_ori_seq_len_column,
|
||||
o_amplicon_column, o_amplicon_length_column,
|
||||
o_taxid_column, o_rank_column, o_name_column,
|
||||
@ -1163,6 +1166,7 @@ int obi_ecopcr(const char* i_dms_name,
|
||||
erri, errj,
|
||||
'R', kingdom_mode,
|
||||
keep_nucleotides,
|
||||
keep_primers,
|
||||
i_id_column, o_id_column, o_ori_seq_len_column,
|
||||
o_amplicon_column, o_amplicon_length_column,
|
||||
o_taxid_column, o_rank_column, o_name_column,
|
||||
|
Reference in New Issue
Block a user