YosefLab / velovi

https://velovi.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
36 stars 7 forks source link

Small mistake in tutorial #15

Open SarahAncheta opened 1 year ago

SarahAncheta commented 1 year ago

Hi! I was following the tutorial (https://velovi.readthedocs.io/en/latest/tutorial.html), and it has an error. It is returning a dataframe and an array in step (1), which causes an error in step (2).

ext_uncertainty_df = compute_extrinisic_uncertainty(adata, vae) ##Step (1)

for c in ext_uncertainty_df.columns:
    adata.obs[c + "_extrinisic"] = np.log10(ext_uncertainty_df[c].values) ##Step (2)

The mistake is easily fixed by choosing the first item (the dataframe) from ext_uncertainty_df.

ext_uncertainty_df = compute_extrinisic_uncertainty(adata, vae) ## Step (1)

ext_uncertainty_df = ext_uncertainty_df[0] ## Added to fix Step (1)

for c in ext_uncertainty_df.columns:
    adata.obs[c + "_extrinisic"] = np.log10(ext_uncertainty_df[c].values) ## Step (2) now runs with no issues

Thank you! The tutorial is very clear and I appreciate it.