[BioPython] Prosite / Prorule

Peter biopython at maubp.freeserve.co.uk
Fri Nov 16 16:02:12 UTC 2007


holger.dinkel at gmail.com wrote:
> Hello List,
> 
> I just stumbled upon an error with the parsing of a 'newer' (>20) version of
> Prosite:  Prosite introduced a new field called ProRules which cause errors
> in parsing with Bio/Prosite/__init__.py / Bio/ParserSupport.py.  
> I updated biopython to 1.44, but the error persists.

Could you file a bug and attach a small recent Prosite file which has 
this problem?

> I tried to figure out, where the problem lies, but I do not really understand
> the structure of the parsing modules in 'Bio/Prosite/__init__.py'
> I tried to create a new entry for the prorule:
> define a 
> 
>     def _scan_pr(self, uhandle, consumer):
>         self._scan_line('PR', uhandle, consumer.identification, up_to_one=1)
> 
> add that to the '_scan_fns' and so on, but then the scanning order seems to get
> out of order, and i get a different "SyntaxError: Line does not start with ..." 
> error...

Note that the order in _scan_fns does matter.

> Is the parsing mechanism described anywhere, so I can look it up and fix the error?

Not that I am aware of, however the SwissProt parser looks very similar, 
so we should be able to fix this without too much hassle.

Thanks

Peter




More information about the Biopython mailing list