Skip to content

Support InterProScan 5.74 output and non-spec GFF attributes#9

Open
JWDebler wants to merge 1 commit into
ccdmb:masterfrom
JWDebler:fix/interproscan-5.74-compat
Open

Support InterProScan 5.74 output and non-spec GFF attributes#9
JWDebler wants to merge 1 commit into
ccdmb:masterfrom
JWDebler:fix/interproscan-5.74-compat

Conversation

@JWDebler

Copy link
Copy Markdown
Member

Keeps ipr_to_gff and prot_to_genome working with recent InterProScan
releases and common third-party GFF3 files. Verified end-to-end on a real
~4 GB InterProScan 5.74 XML and a funannotate genome GFF.

ipr_to_gff

  • Handle the new XML schema namespace in recent InterProScan versions
    (https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/schemas, previously
    http://www.ebi.ac.uk/interpro/resources/schemas/interproscan5).
    get_tag now strips any leading {...} namespace instead of asserting a
    fixed URI, so it is robust to future changes; --namespace defaults to
    auto-detect.
  • Support the funfamhmmer3-match type (CATH-Gene3D FunFam) emitted by newer
    InterProScan. process_hmmer3 is parameterised by match/location tag names
    and reused for funfam.

gff

  • Tolerate unescaped ; inside attribute values (invalid per spec but emitted
    by tools such as funannotate, e.g. gene names like SULTR3;4). A piece
    without = is treated as a continuation of the previous value instead of
    raising ValueError, and is re-escaped correctly on output.

data

  • Replace the deprecated pkg_resources.resource_filename with an
    importlib.resources shim.

Updates to keep ipr_to_gff and prot_to_genome working with recent
InterProScan releases and common third-party GFF3 files.

ipr_to_gff:
- Handle the new XML schema namespace introduced in recent InterProScan
  versions (https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/schemas,
  previously http://www.ebi.ac.uk/interpro/resources/schemas/interproscan5).
  get_tag now strips any leading "{...}" namespace rather than asserting on
  a fixed URI, so it is robust to future namespace changes, and --namespace
  defaults to auto-detect.
- Support the funfamhmmer3-match type (CATH-Gene3D FunFam), which newer
  InterProScan versions emit. process_hmmer3 is parameterised by the match
  and location tag names and reused for funfam matches.

gff:
- Tolerate unescaped ';' inside GFF3 attribute values (invalid per spec but
  emitted by tools such as funannotate, e.g. gene names like "SULTR3;4").
  A ';'-separated piece without '=' is treated as a continuation of the
  previous value instead of raising ValueError.

data:
- Replace the deprecated pkg_resources.resource_filename with an
  importlib.resources-based shim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant