Tag Info

7

I would also recommend to take a look at pomegranate, a nice Python package for probabilistic graphical models. It includes solvers for HMMs and much more. Under the hood it uses Cythonised code, so it's also quite fast.

6

If I understand your question correctly, then I think for case of pairwise alignment, there is a simple explanation. I believe the key insight is that: a mismatch should always score better than a gap.* This follows biologically since the insertion/deletion (indel) rate is roughly 1/10th that of the substitution rate (i.e. the occurrence of single ...

5

There are certainly software libraries for working with HMMs. For a general-purpose implementation in C++, take a look at the SeqAn HMM algorithms. For your purposes, i.e. “computing … the most likely hidden sequence given the sequence of observed states”, you’d invoke viterbiAlgorithm with your observed sequence and the HMM graph. More fundamentally I ...

4

If I remember correctly Ewan Birney's Dynamite (a compiler-compiler) as presented at ISMB 1997 had this functionality, there is also some code here on GitHub https://github.com/birney/wise3 which at least mentions Dynamite. Suspect Ewan is too busy these days to work on this, although he has tweeted about blowing dust of his old Dynamite, sorry Dynamite ...

2

The alignment they used to build the HMM is included as supplementary file 8 in the paper you cite: Multiple amino acid sequence alignment of RNH genes and domains from diverse taxa constructed and used for the phylogenetic reconstruction in the present study. (TXT 45 kb) So, you can download that alignment and then use a tool like hmmbuild (part of ...

2

The author writes in the quote that $O$ is to be taken for the whole set of positions $O_{i}$. In the extracts that you provide there is no reason to believe that it is only for a sequence of length 1. The author writes "the observed sequence $O = O_1, O_2...$" Thus as you say $Pr(sequence) = Pr(O) = Pr(O_1) * Pr(O_2)...$ according to my ...

1

[Comments from other post migrated as answer] The parenthetical statement in the first bullet point says without corrections. In which case, if an unseen nucleotide has a probability of zero, the probability of the sequence is zero. If the unseen nucleotides had the probability of NaN, then the sequence has a probability of NaN, which is a more thorough ...

1

Reversible At its simplist the GTR rate, is the General Time Reversible model and most importantly infers the matrix is "reversible", thus as many A mutations will go to C as C mutations go to A and the number of mutations is relative to the G-T mutation rate. The G-T mutation rate is one of the least common mutations (transversion) so all other ...

1

All Chris_Rands said is correct: you set the probability of $X\to Y$ and $Y\to X$ to 0 to forbid adjacent insertions/deletions in the alignment. A lot of textbooks including some classical ones use this rule, but in fact, the rule is questionable. It is easier to see this from Smith-Waterman alignment under the affine gap penalty, which is largely the non-...

1

I am not sure I understood all, but what you do is like doing a Markov chain but instead of saying that the previous position(s) decides the fate of the next one(s) is the block what determines which other block follows it. Mathematically I think that could be explained in terms of linkage disequilibrium (and wikipedia page), but instead of using a single ...

1

The tutorial in the documentation does indeed state what you quoted but a full description of the file format is given in Section 8 of the documentation, starting on page 106. To summarise, as you noted, the number columns A-K is the alphabet size (the number of amino acids). The number of rows underneath is the number of nodes, which corresponds to the ...

1

RepBase explain what these files are on their website. It is usually a good idea to check the documentation when downloading files so you know what you're downloading. Based on the list of files described on the linked page, there is no prirep.ref file, so I assume you mean plnrep.ref which is "Other Plants". In any case, again according to that page, the ...

1

The simple probabilistic scoring scheme you describe to query a target sequence against a (protein) family represented as a multiple sequence alignment (MSA) is actually similar in essence to a Position Weight Matrix (PWM), although PWMs are more refined. PWMs are powerful rapid tools often used for motif analyses. However, your approach (and PWMs) don't ...

Only top voted, non community-wiki answers of a minimum length are eligible