So in short, I did a blastn with standalone blast using all known miRNAs against the EST sequences in a genome (word length 7 and e-value 0.01). Now to confirm one of the next steps would be obtain the pre-miRNA sequence of each hit and do an mFOLD for structural confirmation. Each paper I read always mentions to get a sliding window (of 70 - 100 nt length) but how do you get this sliding window from the BLASTN output.. Do you have to code something yourself or is there an easier way to do it. Thanks.
DISCLAIMER: I have never worked with miRNAs.
However, from what little I know, the mature miRNA is produced by modifying the pre-miRNA. This means that you should be able to infer the pre-miRNA by mapping your miRNA to the genome using a tool like BLAT. Since you already have an EST which represents a transcribed sequence, you can map your EST back to the genome. You can simplify this by using a tool like
exonerate that also models splicing.
A BLASTN would work for mapping the mature miRNA but you should correct some parameters.
E-value is fine but increase the word length. Keep it close to 17 because you are interested in perfect matches. With miRNA small mismatches can mean a different miRNA altogether. Also run for only plus/plus alignments. (You can see this post on biostar for details on how to do it)
What you can also do is to use
bowtie (sometimes BLAST is very slow and though BLAST allows multiple threads there is no option for utilize multiple cores i.e true parallelization). Again use the option
--norc to avoid plus-minus alignments.
bowtie-build on your EST sequences to make an index.
However, there is one more problem; it is unlikely that you'll get pre-miRNA sequences in your EST collection. This is because the stable form is mature miRNA and pre is generally too shortlived to be sequenced properly without appropriate selective measures.
Capturing small RNAs by sequencing is also not that straightforward. It needs size fractionation of RNA and subsequent library preparation from the small RNA fraction. So I guess you will not discover miRNAs from ESTs.
If you have small RNA sequences then you can align it to the genome and then select the $\pm 70$ nt to find the hairpin. In fact there is an algorithm called mirdeep which does that; you can use it and avoid writing your own codes. If you are good at perl then you can modify it to suit your specific needs if any.