[Biopython-dev] Martel-0.5

Cayte katel at worldpath.net
Thu Jan 11 02:37:18 EST 2001


----- Original Message -----
From: "Andrew Dalke" <dalke at acm.org>
> If you still can't get it working, email me what you have and
> I'll take a closer look at it.
>
  Thank you for your response.  I need to remove some extraneous prints from
the script before I send it.

  I also need to explain my approach.  Unlike Genbank, which has a fairly
consistent format, UniGene has tables, with content that  varies from record
to record.  My plan was to create a dictionary of tables.  Each entry would
contain a nested table of key value pairs, extracted from the table.  I view
the code as scaffolding until someone can suggest a better idea on how to
represent this type of table.

 My HTML stripper inserts delimitors such as ------ to preserve information
needed about the table structure.

These are the Martel definitions.

unigene_title = Martel.Group( "unigene_title", Martel.Str( "UniGene Cluster
" ) + \
    Martel.Re( "[A-Z]" ) + Martel.Re( "[a-z]" ) + Martel.Re( "\.\d+" ) + \
    Martel.AnyEol() )

descriptor = Martel.Group( "descriptor", Martel.ToEol() )
table_name = Martel.Group( "table_name", Martel.ToEol() )
start_table = Martel.Group( "start_table", Martel.Str( "^^^^^" ) +
Martel.AnyEol() )
end_table = Martel.Group( "end_table", Martel.Str( "$$$$$" ) +
Martel.AnyEol() )
start_row = Martel.Group( "start_row", Martel.Str( "=====" ) +
Martel.AnyEol() )
end_row = Martel.Group( "end_row", Martel.Str( "-----" ) + Martel.AnyEol() )
row_data = Martel.Group( "row_data", Martel.Rep1( Martel.ToEol() ) )
row = Martel.Group( "row", start_row + row_data + end_row )
table_contents = Martel.Group( "table_contents", Martel.Rep1( row ) )
unigene_table = Martel.Group( "unigene_table", table_name + start_table +
table_contents + \
    end_table )
record_contents = Martel.Group( "record_contents", Martel.Rep1(
unigene_table ) )
record_prefix = Martel.Group( "record_prefix", Martel.RepN( Martel.ToEol(),
2 ) )
unigene_record = Martel.Group( "unigene_record", record_prefix + \
    unigene_title + descriptor + record_contents )

                      Cayte




More information about the Biopython-dev mailing list