Support InterProScan 5.74 output and non-spec GFF attributes#9
Open
JWDebler wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keeps
ipr_to_gffandprot_to_genomeworking with recent InterProScanreleases 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
(
https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/schemas, previouslyhttp://www.ebi.ac.uk/interpro/resources/schemas/interproscan5).get_tagnow strips any leading{...}namespace instead of asserting afixed URI, so it is robust to future changes;
--namespacedefaults toauto-detect.
funfamhmmer3-matchtype (CATH-Gene3D FunFam) emitted by newerInterProScan.
process_hmmer3is parameterised by match/location tag namesand reused for funfam.
gff
;inside attribute values (invalid per spec but emittedby tools such as funannotate, e.g. gene names like
SULTR3;4). A piecewithout
=is treated as a continuation of the previous value instead ofraising
ValueError, and is re-escaped correctly on output.data
pkg_resources.resource_filenamewith animportlib.resourcesshim.