lmb-embrapa / machado

This repository provides users with a framework to store, search and visualize biological data.
GNU General Public License v3.0
26 stars 14 forks source link

Support identical feature names in different organisms #347

Closed njbooher closed 1 year ago

njbooher commented 2 years ago

This pull request addresses issue #344

I still need to look this over a bit more.

Also, I believe JBrowseFeatureViewSet still needs reworked to include organism somewhere. Possibly as part of the path.

I hereby agree to licence this and any previous contributions under the terms of the GNU General Public License version 3 as published by the Free Software Foundation

I have read the CONTRIBUTING.rst file and understand that TravisCI will be used to confirm the tests and flake8 style checks pass with these changes.

I am happy be thanked by name in the CONTRIB.rst files, and have added myself to the file as part of this pull request. (This acknowledgement is optional. Note we list the names sorted alphabetically.)

codecov-commenter commented 2 years ago

Codecov Report

Merging #347 (463acbb) into master (29a235d) will decrease coverage by 0.72%. The diff coverage is 46.32%.

@@            Coverage Diff             @@
##           master     #347      +/-   ##
==========================================
- Coverage   66.47%   65.75%   -0.73%     
==========================================
  Files          30       30              
  Lines        4215     4301      +86     
  Branches      730      744      +14     
==========================================
+ Hits         2802     2828      +26     
- Misses       1350     1407      +57     
- Partials       63       66       +3     
Impacted Files Coverage Δ
machado/api/serializers.py 0.00% <0.00%> (ø)
machado/api/urls.py 0.00% <0.00%> (ø)
machado/api/views.py 0.00% <0.00%> (ø)
machado/loaders/similarity.py 86.73% <ø> (ø)
machado/loaders/common.py 69.90% <50.00%> (-0.81%) :arrow_down:
machado/loaders/feature.py 67.98% <80.88%> (+1.72%) :arrow_up:
machado/loaders/analysis.py 65.15% <100.00%> (ø)
machado/loaders/sequence.py 86.20% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

azneto commented 2 years ago

It is looking good so far, but we need to thoroughly test it. The current tests will evaluate the functions, but the interfaces (loading tools, API, and web interface) will require manual testing. There's a sample.tar.gz file that can be used for testing purposes. I suggest creating a new installation from scratch.

In regard to JBrowseFeatureViewSet, you can create a new parameter (openapi.Parameter) for organism and modify get_serializer_context and get_queryset to filter by organism as well. The JBrowse configuration file trackList.json.sample can be set to submit the organism:

         "query": {
            "organism": "Arabidopsis thaliana"
         }
njbooher commented 2 years ago

It's the first week of classes (which is a busy time for us) so there may be a delay. But I will try to get to this soon.

njbooher commented 2 years ago

i've tested this with the sample data using the loaders, jbrowse, and the api.

will test it with loading my real data later in the week.

failing test is related to https://github.com/lmb-embrapa/machado/commit/fdf04c64b8d9b04705ae684a012ad42c9b541867

azneto commented 2 years ago

The new tests are working fine in my machine, but are failing on travis. I've just removed them and will further investigate.

njbooher commented 2 years ago

I have now tested this with my real data and it worked fine.

azneto commented 2 years ago

I'll review it and let you know. thx

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
10.7% 10.7% Duplication

azneto commented 1 year ago

Sorry it took so long. I've just created a brand new instance of Machado and went through every step from the documentation and it's running fine. The documentation still requires a few updates.