Rewriting a query and eliminating subqueries
I think this will get you there... cavaet: I'm a SQL Server person...

SELECT 
  ws_id
, n50
, num_singletons
, num_segments_less_100
, kmer
, num_all_reads
, number_bases_in_contigs
, num_bases_in_singletons 
FROM 
 stats_assembly sa
 join workflow_steps ws1 
   on sa.ws_id = ws1.id 
   and ws1.submodule_id = 2
 join workflows wf1 
   on ws1.workflow_id = wf1.id 
 join workflows wf2 
   on wf1.sample_id = wf2.sample_id 
 join workflow_steps ws2
   on wf2.id = ws2.workflow_id 
   and ws2.id = 462