Well, I want to address the warning then. How can I force it to recognize that it is a DNA alphabet (but with all gaps)?
Hi all, I am trying to avoid a bioperl warning. I have a mauve alignment that I am parsing and so sometimes there is a sequence with no characters in it. Therefore I get the following warning several times. How can I avoid it?
--------------------- WARNING ---------------------
MSG: Got a sequence with no letters in it cannot guess alphabet
---------------------------------------------------
I am trying the following code to try to avoid it, and I think that -verbose=>-1 gives me no change also
return Bio::AlignIO->new(-file=>$outfile,-alphabet=>"dna");
1 answer
I think that you can set verbose on any Bioperl object like this:
my $a = Bio::AlignIO->new(-format => "clustalw");
print "verbose = ", $a->verbose, "\n";
$a->verbose(-1);
print "verbose = ", $a->verbose, "\n";
# verbose = 0
# verbose = -1
However, I'd advise against hiding warnings; they are generally there for a reason, to tell you something useful. You could always redirect STDERR to a log file if you don't want them printed in the terminal.
You have already done that using Bio::AlignIO->new(-alphabet => "dna"). Alphabet is set for the alignment, not for members of the alignment. When you think about it, all gaps = no alphabet. It might be better to remove the all-gaps members first; they are not informative.
Is there a way to not receive this warning and retain gaps...?
Log in to answer this question.