AlexsLemonade / AlexsLemonade/refinebio

Fix RNA Seq agent accession gathering process

Open
#3,248 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
135
Forks
21
PR merge metrics
No merged PRs in 30d

Description

### Context
While running `gather_weekly_accessions` command `rnaseq_agent.py` throws an error.

### Problem or idea

```
2023-04-06 17:06:59,627 local data_refinery_foreman.gatherer.management.commands.gather_accessions INFO: MicroArray ArrayExpress accession agent has gathered 0 new accessions since 2023-04-02.
2023-04-06 17:07:08,108 local data_refinery_foreman.gatherer.management.commands.gather_accessions INFO: MicroArray GEO accession agent has gathered 0 new accessions since 2023-04-02.
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/home/user/data_refinery_foreman/gatherer/management/commands/gather_weekly_accessions.py", line 18, in handle
call_command(
File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 181, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/home/user/data_refinery_foreman/gatherer/management/commands/gather_accessions.py", line 211, in handle
agent_accessions = agent.collect_data()
File "/home/user/data_refinery_foreman/gatherer/agents/rnaseq_agent.py", line 129, in collect_data
accessions.update(self.fetch_data(taxon_id=taxon_id))
File "/home/user/data_refinery_foreman/gatherer/agents/rnaseq_agent.py", line 203, in fetch_data
accessions.update(entries)
File "/home/user/data_refinery_foreman/gatherer/agents/rnaseq_agent.py", line 198, in
entries = (
File "/home/user/data_refinery_foreman/gatherer/agents/rnaseq_agent.py", line 186, in
GatheredAccession.create_from_external_entry(
File "/usr/local/lib/python3.8/dist-packages/data_refinery_common/models/gathered_accession.py", line 51, in create_from_external_entry
data.get("accession") or data.get("gse") or data.get("secondary_study_accession")
AttributeError: 'str' object has no attribute 'get'
```

### Solution or next step

Troubleshoot and fix the exception.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with gatherer/agents/rnaseq_agent.py, especially collect_data and fetch_data around the reported lines, then inspect gatherer/management/commands/gather_weekly_accessions.py and gather_accessions.py. Run the gather_weekly_accessions command to reproduce the exception. Done means RNA-seq accession gathering completes without the reported AttributeError and gathers valid accessions.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.