I guess it's technically okay to collect data before formulating hypotheses so long as you absolutely 100% do NOT look at them, but even that's iffy.
If you do a 1-tailed t-test but pick which tail AFTER you collect your data, you've really done a 2-tailed t-test (but falsely halved your p-value).
You can look at your data any which way you like, with or without pre-specified hypotheses. But if you didn't prespecify (or you prespecified a fishing trip with dozens of tests), you have not tested the hypothesis, you have generated it. As long as you don't lie about it, you can do what you want.
Thank Fork that we mostly do things that simply require us to know βIs it there as DNA?β, and if it is, βDoes it express as protein?β. And if the answer to either question is βNoβ, rinse/repeat!