Code Monkey home page Code Monkey logo

Comments (2)

ivan-aksamentov avatar ivan-aksamentov commented on May 28, 2024 1

@Wen1953 If I understand correctly, you have created your own dataset, including, for example, files like genemap.gff and reference.fasta.

It seems that Nextclade tries to access the array gap_open_close here on line 23:

gap_open_close[i + 2] = params.penalty_gap_open_out_of_frame;

at index 1709, but it's length is less than that.

The gap_open_close is created on line 9, such that its length is equal to the length of reference sequence + 2, i.e. the length of sequence in reference.fasta, plus 2:

let len = ref_seq.len() + 2;

The array access on line 23 is happening on gene boundaries, as described by the genemap.gff.

My current hypothesis is that genes in your gene map go beyond the reference sequence length. This causes out-of-bounds array access, which causes the crash. Please make sure that your gene map correctly describes the reference sequence, and all genes fit inside its range.

It can also be an off-by-one bug in Nextclade. But I am currently not convinced that it's the case.

If in doubt, please upload your full dataset (e.g. to a GitHub repo) so that we can investigate.

So far Nextclade datasets have been mostly created by the Nextclade team, and we try to ensure that the different files within a dataset are compatible with each other. However, software should never panic and crash and also because there is an increase of interest by the community in creating new datasets, we should definitely add some error handling in this part of the code and to produce a more meaningful error message. If you have time and forces, feel free to contribute an improvement. This would help other people creating Nextclade datasets.

from nextclade.

Wen1953 avatar Wen1953 commented on May 28, 2024

Thanks @ivan-aksamentov . Your hypothesis was right, it was a problem with the files and the reference sequence length and not a nexclade bug. We are trying to work with some avian flu sequence even though there is not a database in nextclade. We are convinced that contribute with more databases to other pathogens will be very useful to science comunity.

from nextclade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.