Skip to content

v0.0.26

Compare
Choose a tag to compare
@zktuong zktuong released this 29 Dec 13:45
· 1716 commits to master since this release
f254c8e

Bug fixes and updates:

Prevent transfer from overwriting anndata.obs columns
This was causing issues if the column name already exists. Changed this to now respect the column in anndata.obs first.

Slight adjustment to calculation of gini indices
Added a single zero to the end of each sorted array if the array length is longer than 1 so that the Lorenz curve starts from 0. This effectively solves the problem where the gini indices were originally being returned as negative values. Also added some desecription into the relevant locations to describe why the tabulation for clone/node degree/centrality is different compared to cluster size.

Fixed downsampling and metric options
Some parts were ignoring the options because I forgot to update them in the main function within functions.

Fix rpy2 dependency to be <3.3.5 until I find out what's wrong
Recently updated my mac's R to version 4 and rpy2 >3.3.5 really didn't like it. Not sure if this would be be fixed in 3.4?

New features:

Vertex size gini calculation
Finally had a crack at trying to implement this method. This was proving to be a challenge as native implementation with networkx's node contractions tools was fine for sparse clones but really struggles in highly connected samples. The workaround is a simple counter but having access to the graph would be ideal... Anyway, I will have to think about this more more in the future~, and whether I should remake the clone size gini to use a similar implementation to reflect the network more~. Currently this involves the reconstruction of networks which is quite time consuming, especially if the sample is large.

cluster size gini calculation
This is an attempt to also perform the gini calculation after network contraction. However, it also revealed a problem in that if the sample is not deeply sampled, then the gini index will not be reflected appropriately. For now, an option is placed in to choose whether or not to use the contracted network.

Depreciated:

clone_diversity gini calculation for anndata
No longer possible as the function will now absolutely require the the network to be present first i.e. it requires a dandelion object.