Integrating sample preparation and analysis in single entity