Protein Localization with Flexible DNA or RNA