I used the function to check if the fasta is smaller than 25 characters. If it is then it is a peptide: https://github.com/pslacerda/pymol-labimm/blob/master/scripts/peptbase/create.py#L186
There is another way to check for peptides using only selection? Em seg., 6 de jul. de 2020 às 02:47, Thomas Holder < thomas.hol...@schrodinger.com> escreveu: > Hi Pedro, > > cmd.get_fastastr() always returned a FASTA formatted string. What changed > in PyMOL 2.2 is that it now creates a record for every chain, not just for > every object. There is a new "key" argument, you get the old behavior with > key="model". > > print(cmd.get_fastastr(key="model")) > > If you actually want the plain sequence and not the fasta formatted > string, then I suggest you use a function like this: > > def get_sequence(selection='all'): > return ''.join(L.strip() for L in > cmd.get_fastastr(selection).splitlines() > if not L.startswith('>')) > > > Cheers, > Thomas > > > > On Jul 4, 2020, at 5:17 PM, Pedro Lacerda <pslace...@gmail.com> wrote: > > > > Hi, > > > > The get_fastastr function changed. Before it returned the aminoacid > sequence. Now it returns a FASTA formatted string. > > > > How can I get the old behaviour (ie. get the aminoacid sequence)? > > > > -- > > Pedro Sousa Lacerda > > > > Laboratório de Bioinformática e Modelagem Molecular > > Faculdade de Farmácia / UFBA > > > > @pslacerda > > +55 71 9 9981-1856 > > http://lattes.cnpq.br/8338596525330907 > > _______________________________________________ > > PyMOL-users mailing list > > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net > > Unsubscribe: > https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > > -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular Faculdade de Farmácia / UFBA @pslacerda +55 71 9 9981-1856 http://lattes.cnpq.br/8338596525330907
_______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe