in reply to manipulating alignment data

my current code. Which currently produces the wrong output

What does the correct output look like?



while (my $line = <F>) { chomp($line); <F>; # skip firts line of phylip

That last line will skip every second line of the file (lines 2, 4, 6, 8, etc.)    If you only want to skip the first line then:

<F>; # skip first line of phylip while (my $line = <F>) { chomp($line);

Replies are listed 'Best First'.
Re^2: manipulating alignment data
by AWallBuilder (Beadle) on Mar 28, 2012 at 11:45 UTC

    oops, yes should put the <F> before the while loop, thanks.

    the correct output,should be:

    position 2 is not conserved position 3 is not conserved position 5 is not conserved position 6 is not conserved position 8 is not conserved

    i am getting that all positions EXCEPT position 4 are conserved.