Giter Club home page Giter Club logo

Comments (8)

mortonjt avatar mortonjt commented on June 12, 2024

from deepblast.

Zhu-Siqi avatar Zhu-Siqi commented on June 12, 2024

Thanks for your quick reply!

I have used my model to create the match and gap scoring matrices, and expect to use your differentiable_sw modual to get the alignment prediction. In other words, I have match scoring matrix M # (size: a*b) and gap scoring matrix G # (size: a*b), a and b are the lengths of two sequence. Now, I want to get a align matrix A # (size: a*b) and A[i][j] is the predicted alignment of the ith and jth residue. How can I get such a align matrix from your differentiable_sw modual?

Due to the lack of comments, it is a little difficult to understand the result returned by SmithWatermanDecoder. Could you explain what the aln tensor means and add some comments in your code? Your code is elegantly written but lacks comments, which hinders its readability XD. As I just want to use a modual from your work instead of finetuning your model, the comments are not enough to tell me where I can start my work.

from deepblast.

mortonjt avatar mortonjt commented on June 12, 2024

from deepblast.

Zhu-Siqi avatar Zhu-Siqi commented on June 12, 2024

Does the aln matrix means the expected alignment between the two proteins? Why do I always get 0 in the first row and column of aln matrix and 1 as the last element of 'aln' matrix? The picture below shows the result of my test code.
Because I define the match and gap scoring matrices randomly, the locations of gap should be different. Do I confuse what the align matrix means or give the inappropriate inputs?
图片

from deepblast.

Zhu-Siqi avatar Zhu-Siqi commented on June 12, 2024

After running your test code (https://github.com/flatironinstitute/deepblast/blob/master/deepblast/tests/test_sw.py), I also get the same result.

from deepblast.

mortonjt avatar mortonjt commented on June 12, 2024

Hi yes this is by construction -- we zero out the first row / column to make autograd work ...

from deepblast.

Zhu-Siqi avatar Zhu-Siqi commented on June 12, 2024

Thanks! I understand the zeros in the first row and column. However, why is the last element always one? If so, it means that the last element is always aligned.

Thanks again for your reply! I also look forward to see an example like https://github.com/spetti/SMURF/blob/main/examples/SSW_examples/sw_in_tensorflow_pytorch.ipynb. Your work is similar with it. However, without a good example file, I couldn't follow your work well :(

from deepblast.

mortonjt avatar mortonjt commented on June 12, 2024

Got it. Yes we generate those types of alignment visualizations as depicted in the tensorboard readouts.
https://github.com/flatironinstitute/deepblast/blob/master/deepblast/trainer.py#L248-L251

We are currently in the middle of doing a overhaul of the tutorials, more updates to come by July

from deepblast.

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.