tag:blogger.com,1999:blog-32079676.post9102900382247469910..comments2019-12-08T03:37:46.622-08:00Comments on RRResearch: Scoring USS-like sequences in our model (so blind!)Rosie Redfieldhttp://www.blogger.com/profile/06807912674127645263noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-32079676.post-3230993341311352162008-05-14T16:05:00.000-07:002008-05-14T16:05:00.000-07:00Right - I do remember your PWM stuff and the nice ...Right - I do remember your PWM stuff and the nice sequence logos.<BR/><BR/>The point about PWMs is that they are more informative than frequency matrices. Instead of asking "how common is base b in column i", you're asking "how common is base b in column i as opposed to base b anywhere else?" The observation that any base has a 1/4 (-ish) chance of occurring at any position is taken care of in the formulae (such as the one I gave) that calculates the weights.<BR/><BR/>Seems like what you need to know is, how well do scores distinguish true USS from false. I see ROC curves and cross-validation in your future :)Neilhttps://www.blogger.com/profile/14642902803329530119noreply@blogger.comtag:blogger.com,1999:blog-32079676.post-43092162992437983552008-05-14T12:26:00.000-07:002008-05-14T12:26:00.000-07:00Hi Neil,We already have position-weight matrices u...Hi Neil,<BR/><BR/>We already have position-weight matrices up the wazoo - they're what I was generating from genome sequences using the Gibbs motif sampler analysis (see all those posts from last year), and what underlies the sequence logos we have. The tricky part is deciding how to use this information to generate scores on new sequences.<BR/><BR/>In the past (with this Perl model) we have added the scores for the different positions, as you suggest in your point 5. This is fine when we want to compare the scores of individual windows, or of several window positions in very short sequences. <BR/><BR/>But we need to score long fragments and whole genomes for the motifs, and an additive system has such a high background that the motif signals are overwhelmed. The background is inevitable, because in any random sequence 1/4 of all positions will match the best base for that position. (Numbers will vary a bit depending on the base composition...)<BR/><BR/>That's why we're now thinking of instead MULTIPLYING the scores of the different positions in the window to give the score. We think this will cause well-matched sequences to give much higher scores than poorly matched ones (orders of magnitude higher), which is what we need.<BR/><BR/>I haven't yet thought much about the biological implications of using a multiplicative rather than an additive method. Perhaps it's equivalent to assuming that bases at different positions in the USS interact in their effects on uptake.Rosie Redfieldhttps://www.blogger.com/profile/06807912674127645263noreply@blogger.comtag:blogger.com,1999:blog-32079676.post-24297725906593177932008-05-13T22:39:00.000-07:002008-05-13T22:39:00.000-07:00I think a much better scoring method would be to u...I think a much better scoring method would be to use a <I>position weight matrix</I> (PWM). There's a short (not well-written) introduction to PWMs <A HREF="http://en.wikipedia.org/wiki/Position_weight_matrix" REL="nofollow">on Wikipedia</A>.<BR/><BR/>The basic procedure goes like this:<BR/><BR/>1. Get a high-confidence (experimentally-validated) set of USS 10-base core sequences.<BR/>2. Line them up below one another; for instance the 4 sequences from your figure in fasta format would look like:<BR/><BR/>>seq1<BR/>AAAGTGCGGT<BR/>>seq2<BR/>AACGTGCGTA<BR/>>seq3<BR/>TACGCAGGTA<BR/>>seq4<BR/>TGCACAGCTA <BR/><BR/>3. Calculate a frequency matrix from the alignment; this looks like the first table in your figure, but it's better if the rows are bases ACGT and the columns are positions 1-10 in the motif.<BR/><BR/>4. Now you want to convert the frequencies to weights. One formula to do this is:<BR/><BR/>W(<I>b,i</I>) = ( F(b,i) + sqrt(N)/4 ) / ( N + sqrt(N) ) / p(<I>b</I>) / log(2)<BR/><BR/>where F(b,i) is the frequency of base b in column i; N is the number of sequences (= column sum); p(<I>b</I>) is the background frequency of the base (which you might estimate as 0.25 or the frequency in the genome); sqrt(N)/4 and sqrt(N) are "pseudocounts" (just statistical corrections of frequency).<BR/><BR/>Sorry, Blogger comments are not designed for equations!<BR/><BR/>Since you know that some bases are more important than others with respect to uptake, you might want to devise your own weighting scheme too. For instance if column 9 had 10 times the effect on uptake of any other column, you might multiply its weight x10; but you would need a relative scheme that weighted all columns accordingly.<BR/><BR/>5. Now it's just a case of scanning a query sequence 10 bases at a time and summing the weights across each 10-base window to obtain a score. You may want to convert to a relative score (such as 0-100) using (score - minimum score)/(maximum score - minimum score).<BR/><BR/>There is an excellent tutorial on PWMs from the Davuluri group <A HREF="http://www.mbi.osu.edu/2004/ws4materials/davuluri.pdf" REL="nofollow">available as a PDF</A>. The relevant slides are 14-17.<BR/><BR/>This article: <A HREF="http://bioinformatics.oxfordjournals.org/cgi/content/abstract/12/5/431" REL="nofollow">The statistical significance of nucleotide position-weight matrix matches</A> and the citations on that page (at the bottom) are also a good introduction to the topic.<BR/><BR/>There are also quite a few software packages that can calculate matrices given alignments, such as the prophet + profit tools in EMBOSS.<BR/><BR/>Hope this helps. If you could get a good set of 10-base USS sequences together, I'd be happy to code this up in Perl in the next week or two.Neilhttps://www.blogger.com/profile/14642902803329530119noreply@blogger.com