Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E ensembl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ensembl-gh-mirror
  • ensembl
  • Merge requests
  • !524

Refactor code in SliceAdaptor::fetch_by_region

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed Marek Szuba requested to merge feature/refactor_fetch_by_region into master Oct 07, 2020
  • Overview 1
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: nwillhoft

Description

There is code in SliceAdaptor::fetch_by_region() that has been marked for refactoring, specifically the code dealing with synonym/wildcard/fuzzy-matching. During work on creating a chromosome alias feature, I worked on refactoring this code into two new subroutines. This has led to splitting the original task into two (1. chromosome alias feature, and 2. refactoring code). See JIRA tickets ENSCORESW-3021 and ENSCORESW-3562.

Use case

This refactored code will be used by any SliceAdaptor::fetch_by_region request where the seq_region_name user argument is not an exact match to a seq_region_name attribute in the relevant core database.

I understand that this code is used extensively by Ensembl users and therefore a note here to say that these changes will of course be extensively tested. (Use cases to be added here during this work.)

Benefits

In brief, the removal of superfluous code and making the code more readable.

During work on the chromosome alias feature, it became clear that the synonym/wildcard/fuzzy-match code needed to be refactored into subroutines to avoid large chunks of duplicate code being used in SliceAdaptor::fetch_by_region.

Possible Drawbacks

Testing

Have you added/modified unit tests to test the changes?

Not yet added any.

If so, do the tests pass/fail?

Have you run the entire test suite and no regression was detected?

Not yet run.

Edited Nov 14, 2022 by Stefano Giorgetti
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/refactor_fetch_by_region