I wonder if there is a free tool that I can use to extract parts of a phylip alignment (not interleaved). An example of a phylip alignment could be like:
2 7
Seq1
ACGTA AC
Seq2
ACGAG AT
I want to extract a part of it, say, from column 3 to column 5.
In addition to Whetting's answer on using biopython, you should be able to add an eliminate characters section in your PHYLIP matrix file similar to the characters block exclude function in a NEXUS file. I don't use PHYLIP much (one of the reasons I haven't adopted the program is that I have never really understood the reason for the PHYLIP file format over NEXUS file format). Is there a reason you have to use PHYLIP?
I think MESQUITE will allow you to import all your characters (nucleotides and morphology) and then lets you export PHYLIP format data matrices based on which characters you would like to exclude, but I have not actively used this.
Seaview (http://pbil.univ-lyon1.fr/software/seaview.html) can be used as an alternative. You can just drag and drop the phylip file, highlight the part you want and save this as a new phylip file...
Seaview (http://pbil.univ-lyon1.fr/software/seaview.html) can be used as an alternative. You can just drag and drop the phylip file, highlight the part you want and save this as a new phylip file...