YosefLab / Cassiopeia

A Package for Cas9-Enabled Single Cell Lineage Tracing Tree Reconstruction
https://cassiopeia-lineage.readthedocs.io/en/latest/
MIT License
75 stars 24 forks source link

#cassiopeia.pl.plot_matplotlib() failed to add meta_data information #241

Closed jinyongfan closed 4 months ago

jinyongfan commented 4 months ago

Hi Matt

I analysis my data with cassiopeia recently. When I used cas.pl.plot_matplotlib(cas_tree, orient='right', allele_table=allele_table,meta_data='Sample',add_root=True) to add tree meta_data information, PlottingError: Meta data item not in CassiopeiaTree cell meta. BUT I check that cas_tree.cell_meta.Sample saved in cas_tree object. ALSO, cas.pl.plot_matplotlib(cas_tree, orient='right', allele_table=allele_table,add_root=True) plotting successfully. I wondered that if there were something I missed when I added meta_data?

jinyongfan commented 4 months ago

the meta_data format should be a list cas.pl.plot_matplotlib(cas_tree, orient='right', allele_table=allele_table,meta_data=["Sample"],add_root=True) I make it.

mattjones315 commented 4 months ago

Hi @jinyongfan , thanks for posting this issue and producing a solution. I've also fixed this in #240 so that you can pass in a single string and it will be plotted.