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

[Seqan-dev] Help me

<-- thread -->
<-- date -->
  • From: Julio Cesar Carbajal <carbaj1@hotmail.com>
  • To: Tobias R. <seqan-dev@lists.fu-berlin.de>
  • Date: Thu, 10 Feb 2011 16:45:22 +0000
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: [Seqan-dev] Help me

Hello


Please, help me.

I have problem using a external file such as lagan1.fasta (Escherichia coli) with demo program: find_exact.cpp.
During the running of the program, the program no count occurrences of needle in the haystack.


Could you say me how to solve this problem.


Thanks.

Julio


/// THE CODE OF MY PROBLEM

#include <iostream>
#include <seqan/find.h>

#include <fstream>
#include <cstdio>

#include <seqan/sequence.h>
#include <seqan/file.h>


using namespace seqan;

int main()
{

// Open a file using a file reader string.
    String<char> my_haystack = String<char, FileReader<Fasta> > ("lagan1.fasta");

    String<char> my_needle = "GATC";

    Finder<String<char> > finder(my_haystack);
    Pattern<String<char>, Horspool> pattern(my_needle);
   
// proof printing: correct printing
    ::std::cout << my_haystack << "\n\n\n"; 
    ::std::cout << my_needle << "\n";   

// the problem: no count the find position of my_needle within the my_haystack.
// How to solve this problem?

    while (find(finder, pattern))
    {
        ::std::cout << position(finder) << ","; 
    }                         

    ::std::cout << ::std::endl;


    // fstrm.close();
    return (0);
}


<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] Help me
      • From: "Reinert, Knut" <Knut.Reinert@fu-berlin.de>
  • seqan-dev - February 2011 - 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