             output->new_entry(id);
             auto& chromosome = output->get_sequence(id);
 
-            // note: VCF positions are 1-based, but we convert to 0-based
-            chromosome.feature_start.push_back(record.alignment_start() - 1);
-            chromosome.feature_stop.push_back(record.alignment_stop() - 1);
+            chromosome.feature_start.push_back(data->pos);
+            chromosome.feature_stop.push_back(data->pos + data->rlen - 1);
         }
     }
 


    if (!loaded)
    {
        std::vector<std::string> gamgee_chromosomes(0);

        for(auto& record : gamgee::VariantReader<gamgee::VariantIterator>{std::string(filename)})
        {
            // header.chromosomes() and record.chromosome_name() are *very* slow
            // unfortunately, gamgee does not really expose a better way of implementing this
            auto gamgee_chromosome_id = record.chromosome();
            if (gamgee_chromosome_id >= gamgee_chromosomes.size())
            {
                // reload the list of chromosomes from gamgee
                gamgee_chromosomes = record.header().chromosomes();
            }

            const std::string& chromosome_name = gamgee_chromosomes[gamgee_chromosome_id];
            reference_handle->make_sequence_available(chromosome_name);

            uint32 id = reference_handle->sequence_data.sequence_names.lookup(chromosome_name);

 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <string>

#include <htslib/vcf.h>

#include "../command_line.h"
#include "reference.h"
