SystemsGenetics / GEMmaker

A workflow for construction of Gene Expression count Matrices (GEMs). Useful for Differential Gene Expression (DGE) analysis and Gene Co-Expression Network (GCN) construction
https://gemmaker.readthedocs.io/en/latest/
MIT License
33 stars 16 forks source link

create_gem rewrite with `join` #273

Open JohnHadish opened 1 year ago

JohnHadish commented 1 year ago

Description of feature

The create-gem.py script currently uses the pandas merge function, which is able to merge on any column. It turns out that the pandas join function is substantially faster, but is slightly more restrictive in that you can only join on the index.

join is essentially instantaneous, even for large matrices, where as merge becomes slow with large matrices. This is most important when you are dealing with massive matrices (greater than ~30,000 samples) where merge gets rather slow.