Re: [Seqan-dev] File into pattern matching


Consider using awk or grep for such tasks since they are specialized for such cases.

I fixed/removed the link on the Trac start page.

HTH,
Manuel
________________________________________
From: Jakob Schulze [jakob.schulze@fu-berlin.de]
Sent: Thursday, October 17, 2013 8:03 PM
To: seqan-dev@lists.fu-berlin.de
Subject: [Seqan-dev] File into pattern matching

Hey,
I am trying to search a bunch of patterns (e.g. 'chr9\t30594839\t') in a
40 GB samtools pileup file.
(one record each line, containing position and mapping data)

Unfortunately the samtools flag -r for partial pileup seems to be
broken, so I am left searching in the huge complete file.
Is there a way to directly pass a file stream as a haystack to Finder?

Something like this?
Finder<std::fstream> finder(inStream);


Using a recordreader to read file line by line takes forever:

std::fstream inStream(argv[1], std::ios::binary | std::ios::in);
seqan::RecordReader<std::fstream, seqan::SinglePass<> > reader(inStream);
String<CharString> needles;
Pattern<String<CharString>, MultiBfam> pattern(needles);
while (!atEnd(reader)) {
    int res = readLine(line, reader);
    Finder<CharString> finder(line);
}


Best Regards,
Jakob

Btw: http://trac.seqan.de/wiki/BuildManual/IntegrationWithYourOwnBuildSystem
is totally awesome, it took me a flash to get it running with Makefiles.
However, I just noticed that the link to "Use your own build system"
under http://trac.seqan.de/ --> Howtos seems to be broken.

_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev