Entering edit mode
6.3 years ago
marongiu.luigi
▴
730
dear all,
would be possible to translate a nucleotide sequence with the three letter code using EMBOSS transeq? I can do it with the one letter code
$ echo atgtttcaggacccacaggagtaa | transeq -filter -osformat2 text
MFQDPQE*
But I don't see in the manual the 3 letter code.
Thank you
If you don't see that option in the manual then no. You could do some replacements with
sed
if you must have three letter code.Any particular reason why you want to do that? It will only be very confusing ...
Just for graphical reasons: with the three letter code, it is easier to see the correspondence with the triplette:
I find this even easier:
yes but you need to add 5 spaces because the sequence is given as MF not ad _M__F_
Not quite right, the general pattern is you have to insert one initial space, then two spaces between every amino acid, then a final space. There are several tricks around to split a string into characters. As I like perl,
split //, $_
would split a string at every character, then join withjoin
. The split PerlDoc has some examples of using them together.It wouldn't be too hard to write a script which converts between one and three letter codes. There must be ample python examples to get you started.
sure, that is not the problem, just wanted to know if transeq does it directly to save the effort...