Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning for when a coordinate occurs outside of 100 base pairs of the start/end of a transcript #372

Open
katiestahl opened this issue Sep 26, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request priority:medium Medium priority

Comments

@katiestahl
Copy link
Contributor

katiestahl commented Sep 26, 2024

Feature description

We should have a warning for when a coordinate occurs outside 100 base pairs of the start or end of a transcript.

Example:
a user could call genomic_to_tx_segment with

genomic_ac="NC_000001.11",
seg_start_genomic=99999999999999999999999,
gene="TPM3",
get_nearest_transcript_junction=True

and it would return results. (below output is from calling api/utilities/get_exon?chromosome=NC_000001.11&start=99999999999999999999999999999&gene=TPM3 from the fusion-builder api, which calls genomic_to_tx_segment directly.)

{
  "coordinates_data": {
    "gene": "TPM3",
    "genomic_ac": "NC_000001.11",
    "tx_ac": "NM_152263.4",
    "seg_start": {
      "exon_ord": 9,
      "offset": -1e+29,
      "genomic_location": {
        "type": "SequenceLocation",
        "sequenceReference": {
          "type": "SequenceReference",
          "refgetAccession": "SQ.Ya6Rs7DHhDeg7YaOSg1EoNi3U_nQ9SvO"
        },
        "end": 1e+29
      }
    },
    "errors": [],
    "service_meta": {
      "name": "cool_seq_tool",
      "version": "0.7.1",
      "response_datetime": "2024-09-26T17:13:08.423570Z",
      "url": "https://github.com/GenomicMedLab/cool-seq-tool"
    }
  }
}

Use case

As a user, I might accidentally enter an incorrect coordinate that gets resolved to the nearest transcript junction and get some odd results that may be confusing. I would benefit from a message warning me that my entered data or the returned data could be unexpected.

Proposed solution

Add a warning when the coordinate occurs so many base pairs away from the start/end of a transcript

Alternatives considered

No response

Implementation details

When genomic_to_tx_segment is called with get_nearest_transcript_junction=True, return an error if the coordinates occur over 100 base pairs away from the transcript start / end

Potential Impact

No response

Additional context

Example of response from calling genomic_to_tx_segment with erroneous coordinates

Screenshot 2024-09-26 at 1 07 14 PM

you can see that the entered coordinate and corresponding offset will scale infinitely

Contribution

Yes, I can create a PR for this feature.

@katiestahl katiestahl added enhancement New feature or request priority:medium Medium priority labels Sep 26, 2024
@katiestahl katiestahl changed the title Add warning for when a coordinate occurs within a certain # of base pairs of the start/end of a transcript Add warning for when a coordinate occurs within 100 base pairs of the start/end of a transcript Sep 26, 2024
@katiestahl katiestahl changed the title Add warning for when a coordinate occurs within 100 base pairs of the start/end of a transcript Add warning for when a coordinate occurs outside of 100 base pairs of the start/end of a transcript Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants