LouisFaure / scFates

a scalable python suite for tree inference and advanced pseudotime analysis from scRNAseq data.
https://scfates.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
47 stars 1 forks source link

`root` and `leaves` with `test_association()` #24

Closed james-cranley closed 4 months ago

james-cranley commented 8 months ago

Hi, this is a great package, thank you.

in the test_association documentation (https://scfates.readthedocs.io/en/latest/scFates.tl.test_association.html) it mentions there are optional root and leaves parameters to "restrain the test to a subset of the tree".

This looks like an association will be assessed for only the shortest root-to-tips path, is that correct?

When i try to use this I get an error:

e.g.

scf.tl.test_association(adata, leaves=[23,24], root=49)
>>>
`test_association() got an unexpected keyword argument 'leaves'`

When I inspect the source code for that function I can't see how one passes the root and leaves parameters either.

I can see there is a scf.tl.root() function to assign root, this seems like a good way to assign the root for ongoing analysis...but AFAICT there is no equiavlent function for leaves.

Any help would be gratefully received!

LouisFaure commented 8 months ago

Hi @james-cranley,

root and leaves parameters have been removed from test_association, the API documentation was not properly updated unfortunately, sorry for the confusion.

As there is no easy way to figure out later on whether the results from test_association relate to the whole tree or a subset, function always run on the whole tree.

I would recommend to subset the tree before running test_association using scf.tl.subset_tree function, here is some information about how to use that function.

james-cranley commented 8 months ago

Thanks, Louis. I will try that route. Best, James.