 #include "../device/from_nvbio/dna.h"
 
 namespace firepony {
+
+#include <thrust/iterator/transform_iterator.h>
+
+struct iupac16 : public thrust::unary_function<char, uint8>
+{
+    uint8 operator() (char in)
+    {
+        return from_nvbio::char_to_iupac16(in);
+    }
+};
 
 bool load_vcf(variant_database_host *output, reference_file_handle *reference_handle, const char *filename, uint32 data_mask)
 {


                // xxxnsubtil: same as above, this is not padded to dword size
                h.alternate_sequence.resize(alt_start + alt_len);
                for(uint32 i = 0; i < alt_len; i++)
                {
                    h.alternate_sequence[alt_start + i] = from_nvbio::char_to_iupac16(alt[i]);
                }
            }

            if (data_mask & VariantDataMask::QUAL)

                // xxxnsubtil: we don't pad reference data to a dword multiple since variants are
                // meant to be read-only, so RMW hazards should never happen
                h.reference_sequence.resize(ref_start + ref_len);
                assign(ref_len,
                       thrust::make_transform_iterator(ref.begin(), iupac16()),
                       h.reference_sequence.stream_at_index(ref_start));
            }

            if (data_mask & VariantDataMask::ALTERNATE)
