Comments (11)
Hi! I am also curious to know if anything changed since this thread was started. Cheers
from bwa.
Hi! I will be very happy to see any news in this threads! I am just dreaming about the threads option! It would be great! Cheers!
from bwa.
No, there is no pull request on multi-threaded indexing. Implementing one may take quite some time but might not dramatically improve the performance, especially when you try to build the index within limited space.
Generally, to build a large index, you may consider to use a large block size (option "-b"). This option defaults to 10,000,000. You may increase it to 100,000,000 or even larger, depending on your input. This may save you some time.
from bwa.
@lh3 Thanks, increasing -b
does seem to improve speed considerably.
However I don't quite understand the impact of changing this option. At least during indexing, I don't see any significant memory increase even with values as large as 10,000,000,000.
What's the trade-off or otherwise, why isn't the default value larger?
from bwa.
-b specifies how many bases to process in a batch. The memory used by one batch is 8*{-b}. If you have a "reference genome" larger than 200Gb, you won't observe obvious memory increase with -b set to 10G. For a 3Gb human genome, setting -b to 10G will make the peak RAM 8 times as high at the BWT construction phase.
from bwa.
So if I understand correctly, the ideal -b
value is around # of bases / 8
.
Wouldn't it be possible to have this value adjusted automatically?
From what I gather, there's a first pass that packs the FASTA file. Is the -b
value already used at this stage? If not, could this stage be used to calculate the ideal -b
value?
On the other hand, if finding the ideal -b
during the "pack" phase is impractical, would it be reasonable to have:
-b
set to "auto" by default- if
-b
is set to "auto" perform a full file scan to calculate the ideal-b
. - if
-b
is set to anything but "auto", skip the full file scan and use the given value.
from bwa.
-b is only used when bwa generate "ref.fa.bwt". At that step, bwa index already knows the total length of the reference. -b was added when I wanted to index nt. I have only done that once, so did not bother to explore the optimal -b in general. Yes, it should be possible to automatically adjust -b, but before that I need to do some experiment to see how speed is affected by -b. Thanks for the suggestion anyway.
from bwa.
From the tests I've been running, changing the -b
value from the default of 10,000,000 to 500,000,000 to index a ~90Gb fasta file made the entire process roughly 6 times faster.
I'm now also giving it a try with a value of 20,000,000,000 computed by dividing the value of textLength
by 8. If this scales well, I expect a gain of at least 8 times.
from bwa.
Thanks for the data. 6 times is a lot, much larger than my initial guess. I will consider to automatically adjust -b in a future version of bwa.
from bwa.
Hello! Any news in this stream?
from bwa.
Thanks for the data. 6 times is a lot, much larger than my initial guess. I will consider to automatically adjust -b in a future version of bwa.
Hi, I hope everyone is OK in this thread. I am working with large fasta files and I am wondering if this feature is implemented in the current version? Or will it be implemented any time soon? Or should I continue optimising it?
best wishes
from bwa.
Related Issues (20)
- Is this an wrong alignment score in bwa-mem alignment?
- The bwa index is faulty
- How to interpret the meaning of flag=0 in the alignment results of BAM files generated by bwa-mem2 mem
- Time to release new version? HOT 8
- Non-text characters appearing in SEQ field
- Output reads not paired with a mixture of single end and paired end reads when using smart-pairing
- Question about XA Tag and MAPQ Values HOT 1
- Reads with mapq=0 not mapped to the same location as their mates
- how to eliminate the effects of estimated insertion size distribution HOT 1
- bwa mem hangs after a few thousand reads
- Did bwa index use the SA-IS algorithm?
- Fail to read header from fasta input
- When i use bwa for mapping with grch37.p13.fa and hg19.fa,there exists some differences in some regions.
- Build fails with LTO
- [M::bwa_idx_load_from_disk] read 0 ALT contigs
- Indexing large genome failed HOT 3
- no ID within the read group line
- Could anyone tell me the exact meaning of '-5SP'?
- missing `bwa-0.7.18.tar.bz2` for 0.7.18 release HOT 1
- Is there MD tag in output of bwa?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bwa.