zcang / scGeom

MIT License
5 stars 0 forks source link

inconsistent size of B matrix? #1

Open ljschumacher opened 7 months ago

ljschumacher commented 7 months ago

I noticed that in _topology_tools.py the B matrix is size n1 (genes) by n2 (cells) B = np.zeros((n1, n2)) https://github.com/zcang/scGeom/blob/addb2f6a194ba97f43692bb91fcb549260e144bc/scgeom/tools/_topology_tools.py#L214

whereas in _network_generation.py, which imports locCSN, it is 2 by n2 B = np.zeros((2, n2))

https://github.com/xuranw/locCSN/blob/eaf53a6d6f3476f1794cded53288dee375680594/locCSN/csn.py#L171C35-L171C46

Is this intended? If so, why?

zcang commented 7 months ago

Hi, we are currently using (by default) the CSN method from "Dai, Hao, et al. "Cell-specific network constructed by single-cell RNA sequencing data." Nucleic acids research 47.11 (2019): e62-e62." https://github.com/wys8c764/CSN/blob/master/csnet.m We just added a clarification to the documentation of the function in _topology_tools.py. While we currently use CSN, we kept locCSN as an option in the file _network_generation.py. The source codes of these two packages CSN and locCSN have similar variable namings in some parts.

ljschumacher commented 7 months ago

Thanks for the reply and update to the documentation. To clarify, you are saying that topology_tools.py uses only the older CSN method (Dai et al)? And the size of B in locCSN is different, which is only used in _network_generation.py? So if one wanted to use the locCSN network, one would have to pre-compute it, and pass it to _topology_tools.py while setting compute_csn= False?