JonnyTran / OpenOmics

A bioinformatics API to interface with public multi-omics bio databases for wicked fast data integration.
https://openomics.readthedocs.io/en/latest/
MIT License
31 stars 13 forks source link

Review 2 - Automated tests - Failed builds in Travis CI #117

Open JonnyTran opened 3 years ago

JonnyTran commented 3 years ago

Description

When raising a PR the build in Travis CI failed for all python versions. There is some work needed to get these issues resolved though I didn't inspect the output in detail. See https://travis-ci.com/github/gawbul/OpenOmics/builds/216404830

JonnyTran commented 3 years ago

I've been having trouble with the automated tests on Travis CI as I've ran out of free credits. Currently it's not automatically testing until I've set up a paid subscription.

Will look into this further as it's important to have OpenOmics be compatible with Python 3.5, 3.7, 3.8, 3.9 as well as across Mac OS, Windows, and Linux.

JonnyTran commented 3 years ago

Running build at Travis.org temporarily at https://travis-ci.org/github/BioMeCIS-Lab/OpenOmics/builds

Will close when Linux, Mac OS, and Python 3.6, 3.7, 3.8, 3.9 have successful builds

JonnyTran commented 3 years ago

Added GitHub Actions CI at https://github.com/BioMeCIS-Lab/OpenOmics/commit/66b8cfea0c60c008ea4f8250304193783839ae72 and TravisCI is no longer being used.

This will run pytests with Python 3.5, 3.7, 3.8, 3.9 as well as across Mac OS, Windows, and Linux.

Will close this issue once almost all builds are without errors.

erik-whiting commented 2 years ago

hi @JonnyTran I noticed you removed the help wanted label but I think I might be able to take a stab at this. are you still not interested in outside assistance?

JonnyTran commented 2 years ago

Hi @erik-whiting, thanks for reaching out! Yes, I'd appreciate any outside help on this issue or any features/improvement for OpenOmics to help in your bioinformatics work. Please feel free to make a pull request.

erik-whiting commented 2 years ago

just updating you to let you know I'm still working on finding the source of this test failure

erik-whiting commented 2 years ago

@JonnyTran I have figured out why this is failing but I don't know enough about the various databases to figure out how to fix it. Here's what I've gathered so far:

In test_annotaions.py, the test on line 72 called "test_annotate_GeneOntology" is failing with the message "KeyError: "['gene_name'] not in index"". This is happening because the gene_name column doesn't exist in the GeneOntology database.

My theory is that the issue has something to do with the COLUMNS_RENAME_DICT for the GeneOntology class, which looks like this:

COLUMNS_RENAME_DICT = {
        "DB_Object_Symbol": "gene_name",
        "DB_Object_ID": "gene_id",
        "GO_ID": "go_id",
    }

I think this is where the problem is because the columns in the data frame do not include gene_name nor gene_id. In fact, the data frame's columns in GeneOntology are:

go_id
name
namespace
def
synonym
is_a
alt_id
subset
xref
relationship
comment

None of the data in these columns are gene names or are capturing the gene data from the relevant files, so I think there is some kind of translation issue going on between the source data and your project. I tried to navigate through the files in geneontology.org but nothing jumped out at me (however, I'm not a genomics expert so maybe this is an easy fix for you).

Anyway, I think once you find the right string for grabbing the gene name and gene ID, your problems with this test will be solved and your CI build will pass. I'm sorry I couldn't be more help, I'm hoping the information I've provided gives you enough context to know where the problem is (I have a feeling it will be an easy fix but I've been wrong before).

sdhutchins commented 2 years ago

I'm going to test out what you found @erik-whiting! and see if we can get this working soon.

erik-whiting commented 2 years ago

@sdhutchins awesome! if there's anything I can do to help out, let me know. it's been almost a year since I looked at the code, but always happy to help.

sdhutchins commented 2 years ago

See #168 and PR #167 @erik-whiting @JonnyTran