Git Product home page Git Product logo

Comments (2)

JamieHeather avatar JamieHeather commented on September 24, 2024

(Oops, didn't mean to close that).

OK so this is easily solved without any fixes: it's trying to use a leader sequence that's not present in the reference. Assuming we're talking human, the only TRDV2 leader is for *03, which you can specify via the -l flag. So for example the following works:

python3 stitchr.py -v TRDV2*01 -j TRDJ1*01 -cdr3 CACDTIRPKFSTDKLIF -l TRDV2*03

However that's definitely not the expected error state! Thanks for pointing this out.

from stitchr.

JamieHeather avatar JamieHeather commented on September 24, 2024

Note for posterity.

The code used to assume that every gene region (leader/V/J/C) had at the very least a prototypical allele (*01), so when a gene was requested without an allele this was the safe default option. The problem here arose for a gene where this was not true, as there was a V gene that GENE-DB had a valid prototypical (TRDV2*01) but which lacked a corresponding prototypical leader allele (the only one available for the gene being TRDV2*03). As such the defaulted sequence was not available, and it failed without a useful error message.

Now the code has been edited to follow this process when an allele is not provided:

  1. Look for a prototypical allele
  2. If it doesn't exist, pick an allele from those that do exist (flagging up a warning that it's done this)
  3. If it does, use the the prototypical allele (but check if other alleles exist, and if it does flag that up too)

(Note this only applies for genes that do exist in the data; asking for a non-featured gene will still throw a ValueError).

TRDV2 is actually a useful place to illustrate this behaviour, as has 01/03 allele variable sequences, but only an 03 leader sequence. So asking stitchr to use the following Vs will give the following outputs:

Requested V Stitched V Stitched L
TRDV2 TRDV2*01 TRDV2*03
TRDV2*01 TRDV2*01 TRDV2*03
TRDV2*02 TRDV2*01 TRDV2*03
TRDV2*03 TRDV2*03 TRDV2*03

As always, in general the best results are achieved by specifying exactly which alleles you want where possible, and keeping track of which alleles are used in your stitched sequences.

from stitchr.

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.