Dear All, I am a newbie to seqan using it in NGS domain. I am currently (using seqan-1.3.1) reading fastq file using FragmentStore and trying to access the sequences and quality strings for each record. Here is the snippet: #include<seqan/file.h> #include<seqan/index.h> #include<seqan/store.h> #include<iostream> using namespace seqan; using namespace std; int main(int argc, char **argv) { FragmentStore<> fragstore; if(loadReads(fragstore, "some.fastq")){ for(unsigned i=0; i< length(fragstore.readSeqStore); ++i){ DnaQ5 seq = getRead(fragstore, i); cout << seq << endl; } } return 0; } and I get an error: $ g++ load2.cc -I. -std=c++0x In file included from ./seqan/basic.h:125:0, from ./seqan/sequence.h:50, from ./seqan/file.h:47, from load2.cc:1: ./seqan/basic/basic_alphabet_simple.h: In function ‘void seqan::assign(seqan::SimpleType<TTargetValue, TTargetSpec>&, const TSource&) [with TTargetValue = unsigned char, TTargetSpec = seqan::Dna5_, TSource = seqan::Segment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q_> >, seqan::InfixSegment>]’: ./seqan/basic/basic_alphabet_simple.h:101:3: instantiated from ‘seqan::SimpleType<TValue, TSpec>::SimpleType(const T&) [with T = seqan::Segment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q_> >, seqan::InfixSegment>, TValue = unsigned char, TSpec = seqan::Dna5_]’ ./seqan/basic/basic_alphabet_simple.h:1901:2: instantiated from ‘void seqan::assign(seqan::Dna5Q&, const TSource&) [with TSource = seqan::Segment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q_> >, seqan::InfixSegment>, seqan::Dna5Q = seqan::SimpleType<unsigned char, seqan::Dna5Q_>]’ ./seqan/basic/basic_alphabet_simple.h:118:3: instantiated from ‘seqan::SimpleType<TValue, TSpec>& seqan::SimpleType<TValue, TSpec>::operator=(const T&) [with T = seqan::Segment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q_> >, seqan::InfixSegment>, TValue = unsigned char, TSpec = seqan::Dna5Q_, seqan::SimpleType<TValue, TSpec> = seqan::SimpleType<unsigned char, seqan::Dna5Q_>]’ load2.cc:14:35: instantiated from here ./seqan/basic/basic_alphabet_simple.h:352:2: error: cannot convert ‘const seqan::Segment<seqan::String<seqan::SimpleType<unsigned char, seqan::Dna5Q_> >, seqan::InfixSegment>’ to ‘unsigned char’ in assignment Looks like the return type of getRead() is of the type "Segment<String<SimpleType<unsigned char, Dna5Q_>>" , so How do I extract the sequence info as plain char string / c++ string ? Is there any clear documentation on how to access these data members ? Could someone point me to such resources if any. Thanks! Regards, --
K.A.V.S Krishna Mohan Sr.Scientist - Genome Informatics Genotypic
Technology
Pvt. Ltd. Email: krishnamohan.kavs@genotypic.co.in
|