FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

[Seqan-dev] FragmentStore - extracting member data

<-- thread
<-- date
  • From: Krishnamohan KAVS <krishnamohan.kavs@genotypic.co.in>
  • To: seqan-dev@lists.fu-berlin.de
  • Date: Sat, 30 Jun 2012 12:22:56 +0530
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: [Seqan-dev] FragmentStore - extracting member data

Title: Signature
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.
#2/13, Balaji Complex, 80 Feet Road,
R.M.V.2nd Stage, Bangalore - 560094
Tel: +91 80 40538200, +91 80 40538215 (Direct)
Fax: +91 80 40538222

Email: krishnamohan.kavs@genotypic.co.in
Web: http://www.genotypic.co.in



 

<-- thread
<-- date
  • seqan-dev - June 2012 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the seqan-dev mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal