There is a growing interest in the use of cloud computing for scientific applications, including scientific workflows. Key attractions of the cloud include the pay-as-you-go model and elasticity. While the elasticity offered by clouds can be beneficial for many applications and use-scenarios, it also imposes significant challenges in the development of applications or services. For example, no general framework exists that can enable a scientific workflow to execute in a dynamic fashion, i.e. exploiting elasticity of clouds and automatically allocating and deal locating resources to meet time and/or cost constraints. This paper presents a case-study in creating a dynamic cloud workflow implementation of a scientific application. We work with Mass Matrix, an application which searches proteins and peptides from tandem mass spectrometry data. In order to use cloud resources, we first parallelize the search method used in this algorithm. Next, we create a flexible workflow using the Pegasus Workflow Management System. Finally, we add a new dynamic resource allocation module, which can use fewer or a larger number of resources based on a time constraint specified by the user. We evaluate our implementation using several different datasets, and show that the application scales quite well, and that our dynamic framework is effective in meeting time constraints.