     sh_lib_quant_subprocess_id          BIGINT;
     sh_lib_raw_sample_conc              REAL;
     sh_lib_comp_sample_conc             REAL;
+
+    -- Variables for shotgun pooling
+    sh_pool_process_id                  BIGINT;
+    sh_pool_subprocess_id               BIGINT;
+    sh_pool_subcomposition_id           BIGINT;
+    sh_pool_container_id                BIGINT;
+    sh_pool_composition_id              BIGINT;
 BEGIN
     --------------------------------------------
     -------- CREATE PRIMER WORKING PLATES ------

    INSERT INTO qiita.quantification_process (process_id)
        VALUES (sh_lib_quant_process_id)
        RETURNING quantification_process_id INTO sh_lib_quant_subprocess_id;

    -- Start plating samples - to make this easier, we are going to plate the
    -- same 12 samples in the first 6 rows of the plate, in the 7th row we are

                    -- Quantify library plate
                    INSERT INTO qiita.concentration_calculation (quantitated_composition_id, upstream_process_id, raw_concentration, computed_concentration)
                        VALUES (shotgun_lib_comp_id, sh_lib_quant_subprocess_id, sh_lib_raw_sample_conc, sh_lib_comp_sample_conc);

                    -- Pooling
                    INSERT INTO qiita.pool_composition_components (output_pool_composition_id, input_composition_id, input_volume, percentage_of_output)
                        VALUES (sh_pool_subcomposition_id, shotgun_lib_comp_id, 1, 1/384);
                END LOOP; -- Shotgun col pad
            END LOOP; -- Shotgun row pad

