I Want To Avoid This One Bioperl Warning
1
0
Entering edit mode
12.5 years ago
Lee Katz ★ 3.2k

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");
bioperl alignment • 3.2k views
ADD COMMENT
1
Entering edit mode
12.5 years ago
Neilfws 49k

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.

ADD COMMENT
0
Entering edit mode

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)?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Is there a way to not receive this warning and retain gaps...?

ADD REPLY

Login before adding your answer.

Traffic: 1835 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6