I was wondering if there is a method using perl or python to remove columns from MSA that have only gaps - and/or N and/or ? (everything except a nucleotide). It will be to run it on several MSA.
seq1 ATCGNN-??ATCG seq2 ATCGNN--ATCGCG seq3 ATCG-?NCGAAAAA
(Remove columns 5,6,7)
I know that there is some tool like TrimAl who has the option to remove gappy positions but I dont know if I can adapt it to look at positions with only characters '-' 'N' '?'. I want to keep ?,N,- in others part of the alignments, so I don't think that the command tr can help?