CrossMap icon indicating copy to clipboard operation
CrossMap copied to clipboard

A rust implementation of CrossMap

Open wjwei-handsome opened this issue 1 year ago • 2 comments

Hi Dr.Wang!

CrossMap is an excellent tool that has helped me a lot!

However, because it requires some dependencies at runtime and some bottlenecks in the python language, its execution speed is relatively slow.

So I reconstructed it using Rust language: https://github.com/wjwei-handsome/crussmap

Due to the following points, the running speed is significantly improved:

  • Use nom to parse chain file rapidly
  • Utilize csv and serde to deserialize bed file.
  • A fast interval tree library: rust-lapper was used to build interval tree and query.
  • Rust is faster than Python

But due to limited time, I just completed the view and bed-convert functions. I will continue to improve in the future!

I would like to get some comments and suggestions from you and everyone, thanks!

wjwei-handsome avatar Apr 13 '23 05:04 wjwei-handsome

This is fantastic. Wish I could help more, but I don't know Rust. Since you already implemented the bed-convert function, how it's speed compared to:

  1. CrossMap
  2. UCSC liftover
  3. FastRemap (https://arxiv.org/abs/2201.06255) When processing, say, 1 million regions?

liguowang avatar Apr 13 '23 17:04 liguowang

Of course, but I still need to improve some code, I will give you a result in the future.

PS: I am a novice at rust, this is also a practice project, which may not be long-term maintenance.

Have a nice day!

wjwei-handsome avatar Apr 14 '23 02:04 wjwei-handsome