[Biopython-dev] Notification: incoming/38

biopython-bugs at bioperl.org biopython-bugs at bioperl.org
Tue Jul 17 23:30:33 EDT 2001


JitterBug notification

new message incoming/38

Message summary for PR#38
	From: katel at worldpath.net
	Subject: skipping Martel fields
	Date: Tue, 17 Jul 2001 23:30:31 -0400
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From katel at worldpath.net Tue Jul 17 23:30:31 2001
Received: from localhost (localhost [127.0.0.1])
	by pw600a.bioperl.org (8.11.2/8.11.2) with ESMTP id f6I3UVw20215
	for <biopython-bugs at pw600a.bioperl.org>; Tue, 17 Jul 2001 23:30:31 -0400
Date: Tue, 17 Jul 2001 23:30:31 -0400
Message-Id: <200107180330.f6I3UVw20215 at pw600a.bioperl.org>
From: katel at worldpath.net
To: biopython-bugs at bioperl.org
Subject: skipping Martel fields

Full_Name: Katharine Lindner
Module: 
Version: 1.00a
OS: Winndows 98
Submission from: (NULL) (207.3.148.253)


Set up a test case with the format at the end.   The parser skips the line sfter
a short codon

Examples:
SEQTPA         92    83 act THR T
SEQTPA         93    84 cc
SEQTPA         94    85 gag GLU E
SEQTPA         95    86 ggc GLY G

Skips residue 94

Format:

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
amino_1_letter_codes = 'ACDEFGHIKLMNPQRSTVWY-'

nucleotides = 'gcat-'

amino_alts = map( Martel.Str, amino_3_letter_codes )

codon = Martel.Group( "codon", Martel.MaxRepeat( Martel.Any( nucleotides ), 1, 3
) )
amino_3_letter_code = Martel.Group( "amino_3_letter_code", \
    reduce( Martel.Alt, amino_alts ) )
amino_1_letter_code = Martel.Group( "amino_1_letter_code", \
    Martel.Any( amino_1_letter_codes ) )
amino_acid = Martel.Group( "amino_acid",
                           blank_space +
                           amino_3_letter_code +
                           blank_space +
                           amino_1_letter_code )
residue = Martel.Group( "residue",
                           blank_space +
                           codon +
                           Martel.Opt( amino_acid ) )


kabatid = Martel.Group("kabatid",
                    Martel.Rep1(Martel.Integer()))
pubmed_num = Martel.Group("pubmed_num",
                    Martel.Rep1(Martel.Integer()))
residue_num = Martel.Group("residue_num",
                    Martel.Rep1(Martel.Integer()))
kabat_num = Martel.Group("kabat_num",
                    Martel.Rep1(Martel.Integer()) +
                    Martel.Opt( Martel.Any( alpha ) ) )
id_line = Martel.Group("id_line",
                          Martel.Str("KADBID") +
                          blank_space +
                          kabatid +
                          Martel.ToEol() )
residue_line = Martel.Group( "residue_line",
                             Martel.Str( "SEQTPA" ) +
                             blank_space +
                             residue_num +
                             blank_space +
                             kabat_num +
                             Martel.Opt( residue ) +
                             floop )
kabat_record_end_line =      Martel.Group( "record_end",
                             Martel.Str( "RECEND" ) +
                             Martel.ToEol() +
                             Martel.ToEol() +
                             Martel.ToEol())
residue_lines = Martel.Group( "residue_lines", Martel.Rep( residue_line ) )
kabat_record = id_line + residue_lines + kabat_record_end_line









More information about the Biopython-dev mailing list