Open
Conversation
this will allow us to ingest gff files like https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/405/GCF_000001405.40_GRCh38.p14/GCF_000001405.40_GRCh38.p14_genomic.gff.gz that do not encode the species, annotation, etc. in the URL (provided users provide this metadata by hand to the GFF constructor)
this gives users the option of keeping the dict in memory, in case they do not want the output written to stdout
(this is a quality of life improvement for processing large numbers of Gff3 files in a script or notebook)
This will allow users who are downloading and processing a large number of gff3 files to clean up after themselves by creating a parent tmp_dir and deleting all of its contents as needed.
also, if the model is missing, throw a custom error Previous commits in this branch made it possible for users to run data_translators/genome_annotation_translator.py without triggering the code that tells them how to download the NCBI model. This should fix that. Throwing a custom error will also allow users of this code to handle different failures modes (maybe ENSEMBL is publishing a non-standard GFF3 file) in different ways.
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.
I've been using bkbit to scrape all of the gff3 files from a specific release of ENSEMBL and ingest them into a prototype tool for automatically mapping gene annotations from one species to another via accepted orthologs.
In the course of that work, I have encountered some quality-of-life fixes that I needed to make for myself. They are folded into this PR. I've tried to keep each change localized to a single commit, explaining myself in the commit message.
I understand that this commit
danielsf@b89b8f3
may be controversial. I am not very savvy with regex and was having a hard time interpreting some failures I was getting when the path for a specific gff3 file did not match the regex. I am open to the idea that I keep that commit isolated to my fork if you do not want to accept it.