--
You received this message because you are subscribed to the Google Groups "nvbio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nvbio-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I suppose CUDASW does only local alignment, but modifying it should be fairly straightforward...
nvbio::SharedPointer<nvbio::io::SequenceDataInputStream> reads_file(nvbio::io::open_sequence_file(ref_filename));
nvbio::io::SequenceDataHost reads;
// declare how much sequence data we want to load in each batch
const nvbio::uint32 seqs_per_batch = 128 * 1024; // the maximum number of sequences
const nvbio::uint32 bps_per_batch = 128 * 1024 * 100; // the maximum number of base pairs
// loop through the stream in batches
while (nvbio::io::next(nvbio::DNA_N, &reads, reads_file.get(), seqs_per_batch, bps_per_batch))
{
// copy the loaded batch on the device
const nvbio::io::SequenceDataDevice device_reads(reads);
// and do something with it...
printf("File contains %u sequences.\n", reads.size());
// prepare some typedefs for the involved string-sets and infixes
typedef nvbio::io::SequenceDataAccess<nvbio::DNA_N> read_access_type;
typedef read_access_type::sequence_string_set_type string_set_type; // the read string-set
typedef nvbio::string_set_infix_coord_type infix_coord_type; // the infix coordinate type, for string-sets
typedef nvbio::vector<nvbio::device_tag, infix_coord_type> infix_vector_type; // the device vector type for infix coordinates
typedef nvbio::InfixSet<string_set_type, const nvbio::string_set_infix_coord_type*> seed_set_type; // the infix-set type for representing seeds
// build a read accessor
const read_access_type d_read_access(device_reads);
// fetch the actual read string-set
const string_set_type d_read_string_set = d_read_access.sequence_string_set();
// prepare enough storage for the seed coordinates
infix_vector_type d_seed_coords;
// extract the seeds and get the corresponding string-set representation
const seed_set_type d_seed_set = extract_seeds( d_read_string_set, 20u, 10u, d_seed_coords);
//see the contents of the all seeds
for (size_t i = 0; i < d_seed_set.size(); ++i) {
log_info(stderr, "Seed: %s\n", d_seed_set[i].m_string); //this line crashes
}
return 0;
}