-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paired end/mate mair reads #18
Comments
Hi August, I'm glad you're finding this project useful, thank you! Your questions are good ones, and let me try to address what I can at the moment: Currently, I am not using BWAs paired-end algorithms. From what I can tell from working through the code, BWA generates and alignment for each pair, and then has a function that takes the individual alignments and does some joint inference to refine. This has been on my to-do list for expanding the functionality of BWAWrapper, but hasn't been implemented yet. In principle, it wouldn't be too difficult. There should be no hidden multithreading, except that perhaps the way BWA gets called is that it starts a single worker thread. Do you have some valgrind output that is suggesting that there are extra threads being started? I try to make functions "const" wherever possible to suggest that they are thread-safe. An exception is the const function QueryRegion in RefGenome, which is not thread-safe because it calls a non-thread-safe function in htslib to retrieve sequence from a reference genome (I asked htslib folks). I agree that more systematically documenting these would be the best approach. Are there specific aspects re: thread safety we should prioritize looking at? |
Hi Jeremiah And here's the source (quickie.cpp) using namespace SeqLib; const string REFGENOME = "chrAll.standardChroms.fa"; int if (argc < 2) { /* Mapping w/ BWA */ bwa.LoadIndex(REFGENOME); bwa.SetGapOpen(4); BamRecordVector results; FastqReader q(argv[1]); while (q.GetNextSequence(s) ) { } return 0; And here's oog.fq: @M01451:39:000000000-AGNHG:1:1101:18315:2050 1:N:0:25
Thanks again! |
Hi August, BWA scoops up many sequences at once, and then loops through the alignment function (presumably to minimize number of fetches from a file). I've seen those valgrind warnings on BamWriter, they are innocuous. It is saying that they are coming from an uninitialized value in Not sure about the best paired-end strategy, but am guessing that adapting BWA's method would be best. If you wanted to make a new BWAWrapper function to handle pairs of reads, I would welcome the PR! Hope this helps, |
Hi @walaj, I'm also interested in using the SeqLib BWA wrapper for PE reads. You mentioned;
Could you point me in the direction of where this is in bwa? I've been struggling to work out what functions are related to this. |
First I'd like to thank you for the time you've dedicated to this project. I really (for one) really appreciate it!
I have two questions than can be construed as "issues". First, it's a little unclear how one might use the BWAWrapper object to perform paired end read mapping. I see that we have access to the underlying bwa-mem routines, but I have to admit it's a little daunting. I don't suppose a routine could be added to BWAWrapper to illustrate how this might be done (this is not entirely a selfless question, I realize, but I do imagine that it would be of general use to the community)?
Second, it's not entirely clear (from the documentation) how and if any of the routines you have provided are thread safe, or if multithreading is happening behind the scenes (it appears that the underlying bwa-mem routines may be doing some sort of bag of tasks multithreading.). Obviously there is some degree of state that is being recorded (getters/setters), so the potential is certainly there for race conditions.
Thanks again, and I apologize if this is not the correct medium to ask this of you.
-August Woerner
The text was updated successfully, but these errors were encountered: