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

byte index out of bounds for GRCh37:10:5139789:A:AGTG #131

Closed
holtgrewe opened this issue Oct 21, 2023 · 3 comments · Fixed by #132
Closed

byte index out of bounds for GRCh37:10:5139789:A:AGTG #131

holtgrewe opened this issue Oct 21, 2023 · 3 comments · Fixed by #132
Labels
bug Something isn't working

Comments

@holtgrewe
Copy link
Contributor

holtgrewe commented Oct 21, 2023

Describe the bug
When annotating GRCh37:10:5139789:A:AGTG with mehari, hgvs::mapper crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Annotate said variant.
  2. See the error trace at bottom

Expected behavior
Annotation should work.

Screenshots
N/A

Additional context

thread 'main' panicked at 'byte index 1 is out of bounds of ``', /opt/conda/conda-bld/mehari_1695048327300/_build_env/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hgvs-0.11.0/src/mapper/altseq.rs:701:56
stack backtrace:
   0: rust_begin_unwind
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
   2: core::str::slice_error_fail_rt
   3: core::str::slice_error_fail
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/str/mod.rs:87:9
   4: hgvs::mapper::altseq::AltSeqToHgvsp::build_hgvsp
   5: hgvs::mapper::variant::Mapper::c_to_p::{{closure}}
   6: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
   7: core::iter::adapters::try_process
   8: hgvs::mapper::variant::Mapper::c_to_p
   9: hgvs::mapper::assembly::Mapper::c_to_p
  10: mehari::annotate::seqvars::csq::ConsequencePredictor::build_ann_field
  11: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  12: alloc::vec::in_place_collect::<impl alloc::vec::spec_from_iter::SpecFromIter<T,I> for alloc::vec::Vec<T>>::from_iter
  13: core::iter::adapters::try_process
  14: mehari::annotate::seqvars::csq::ConsequencePredictor::predict
  15: mehari::annotate::seqvars::run_with_writer
  16: mehari::annotate::seqvars::run
  17: tracing_core::dispatcher::with_default
  18: mehari::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This happens when calling c_to_p on the following variant:

NM_001253909.2:c.416_417insGTG
CdsVariant {
    accession: Accession {
        value: "NM_001253909.2",
    },
    gene_symbol: None,
    loc_edit: CdsLocEdit {
        loc: Certain(
            CdsInterval {
                start: CdsPos {
                    base: 416,
                    offset: None,
                    cds_from: Start,
                },
                end: CdsPos {
                    base: 417,
                    offset: None,
                    cds_from: Start,
                },
            },
        ),
        edit: Certain(
            Ins {
                alternative: "GTG",
            },
        ),
    },
}
@holtgrewe
Copy link
Contributor Author

Hm, variantvalidator.org does not like this:

image

@holtgrewe
Copy link
Contributor Author

I assume that we have to run the projection through the original hgvs Python code and see what happens there.

@holtgrewe
Copy link
Contributor Author

The VEP prediction is correct * => ** plus inframe_insertion&stop_retained_variant.

#Uploaded_variation Location Allele Consequence IMPACT SYMBOL Gene Feature_type Feature BIOTYPE EXON INTRON HGVSc HGVSp cDNA_position CDS_position Protein_position Amino_acids Codons Existing_variation DISTANCE STRAND FLAGS SYMBOL_SOURCE HGNC_ID MANE_SELECT MANE_PLUS_CLINICAL TSL APPRIS REFSEQ_MATCH REFSEQ_OFFSET GIVEN_REF USED_REF BAM_EDIT SIFT PolyPhen AF CLIN_SIG SOMATIC PHENO PUBMED MOTIF_NAME MOTIF_POS HIGH_INF_POS MOTIF_SCORE_CHANGE TRANSCRIPTION_FACTORS
. 10:5139789-5139789 GTG inframe_insertion,stop_retained_variant MODERATE AKR1C3 8644 Transcript NM_001253909.2 protein_coding 3/3 - - - 447-448 416-417 139 /* taa/taGTGa - - 1 - EntrezGene - - - - - - - - - - - - - - - - - - - - - -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant