Skip to content

Update GFF3Record.java#2377

Merged
danielabutano merged 2 commits intointermine:devfrom
sammyjava:patch-12
Dec 8, 2021
Merged

Update GFF3Record.java#2377
danielabutano merged 2 commits intointermine:devfrom
sammyjava:patch-12

Conversation

@sammyjava
Copy link
Member

@sammyjava sammyjava commented Jun 3, 2021

Added getSymbols() method to return "Symbol" attribute if it exists; otherwise null. Same deal as getNames() but we (and others) have explicit Symbol attributes in GFF.

Details

Summary of pull request, including references to relevant tickets (if applicable).

Testing

Besides running unit tests, how can the reviewer test your feature / bug fix? Are there edge cases to be aware of?

Checklist

Before your pull request can be approved, be sure to check all boxes:

  • Passing unit test for new or updated code (if applicable)
  • Passes all tests – according to Travis
  • Documentation (if applicable)
  • Single purpose
  • Detailed commit messages
  • Well commented code
  • Checkstyle

Sam Hokin added 2 commits June 3, 2021 09:32
Added getSymbols() method to return "Symbol" attribute if it exists; otherwise null. Same deal as getNames() but we (and others) have explicit Symbol attributes in GFF.
@sammyjava
Copy link
Member Author

Bugger.

----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/intermine/intermine/client/tests/test_registry.py", line 18, in test_getData
    self.assertEqual(registry.getData('flymine'), None)
  File "/home/runner/work/intermine/intermine/client/intermine/registry.py", line 73, in getData
    service = Service(link)
  File "/home/runner/work/intermine/intermine/client/intermine/webservice.py", line 282, in __init__
    raise ServiceError("Could not validate service - is the root url (%s) correct? %s" % (root, e))
ServiceError: u'Could not validate service - is the root url (https://www.flymine.org/flymine/service) correct? [Errno 504] Gateway Time-out: \'<html>\\r\\n<head><title>504 Gateway Time-out</title></head>\\r\\n<body bgcolor="white">\\r\\n<center><h1>504 Gateway Time-out</h1></center>\\r\\n<hr><center>nginx/1.10.3</center>\\r\\n</body>\\r\\n</html>\\r\\n\''

@sammyjava
Copy link
Member Author

@danielabutano how can I run this again? It looks to me that it failed because flymine wasn't online. My change shouldn't have any effect on unit tests. I think Travis had a "run again" option but I can't seem to find it here.

@sammyjava
Copy link
Member Author

BUMP @danielabutano how can I run this again? It looks to me that it failed because flymine wasn't online. My change shouldn't have any effect on unit tests. I think Travis had a "run again" option but I can't seem to find it here.

@danielabutano danielabutano self-requested a review December 6, 2021 09:41
@danielabutano
Copy link
Member

Hi @sammyjava I have a question. When the new method is called? I do no see any changes on the GFF3Converter class.
I would have expected something similar to:
List<?> names = record.getNames();

@sammyjava
Copy link
Member Author

sammyjava commented Dec 8, 2021

I call it in my LIS extension of GFF3RecordHandler. :) But it ought to be in the core GFFRecord since it's an attribute of GFFs, quite general. Here's my example https://github.com/legumeinfo/lis-bio-sources/blob/d76f5e6db677c6d09ef4ee0f780d763a56236b17/lis-gff/src/main/java/org/intermine/bio/dataconversion/LISGFF3RecordHandler.java#L107

public class LISGFF3RecordHandler extends GFF3RecordHandler {
...
    public void process(GFF3Record record) {
        String type = record.getType();
        if (type.equals("protein_match") || type.equals("protein_hmm_match")) return;
        String id = record.getId();
        String name = null;
        if (record.getNames()!=null) name = record.getNames().get(0);
        String symbol = null;
        if (record.getSymbols()!=null) symbol = record.getSymbols().get(0);
        ....

@danielabutano danielabutano merged commit 42f065f into intermine:dev Dec 8, 2021
@danielabutano danielabutano added this to the InterMine 5.0.4 milestone Dec 8, 2021
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.

2 participants