mlfpm / deepof

DeepLabCut based data analysis package including pose estimation and representation learning mediated behavior recognition
MIT License
39 stars 6 forks source link

[JOSS] Tutorial dependencies #16

Closed edeno closed 1 year ago

edeno commented 1 year ago

Running through the data formatting tutorial, I needed to install imageio-ffmpeg, pytables

xref: https://github.com/openjournals/joss-reviews/issues/5394

edeno commented 1 year ago

I was also unable to make this plot:

sns.set_context("notebook")

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 6))

deepof.visuals.plot_heatmaps(
    my_deepof_project,
    ["B_Nose"],
    center="arena",
    exp_condition="CSDS",
    condition_value="Nonstressed",
    ax=ax1,
    show=False,
    display_arena=True,
    experiment_id="average",
)

deepof.visuals.plot_heatmaps(
    my_deepof_project,
    ["B_Nose"],
    center="arena",
    exp_condition="CSDS",
    condition_value="Stressed",
    ax=ax2,
    show=False,
    display_arena=True,
    experiment_id="average",
)

plt.tight_layout()
plt.show()

Seems like it was an error from seaborn's kdeplot?

OptionError: "No such keys(s): 'mode.use_inf_as_null'"
edeno commented 1 year ago

I also experienced an error creating this plot:

fig = plt.figure(figsize=(14, 5)).subplot_mosaic(
    mosaic="""
           AAAAB
           AAAAB
           """,
)

deepof.visuals.plot_enrichment(
    my_deepof_project,
    supervised_annotations=supervised_annotation,
    add_stats="Mann-Whitney",
    plot_proportions=True,
    ax = fig["A"],
)

deepof.visuals.plot_enrichment(
    my_deepof_project,
    supervised_annotations=supervised_annotation,
    add_stats="Mann-Whitney",
    plot_proportions=False,
    ax = fig["B"],
)

for ax in fig:
    fig[ax].set_xticklabels(fig[ax].get_xticklabels(), rotation=45, ha='right')
    fig[ax].set_title("")
    fig[ax].set_xlabel("")

fig["A"].get_legend().remove()

plt.tight_layout()
plt.show()

Due to the following import error

ImportError: The statsmodels package is required to use one of the multiple comparisons correction methods proposed in statannotations. Please install statsmodels or pass `comparisons_correction=None`.
lucasmiranda42 commented 1 year ago

Hmmm. I'll have a look! Which installation did you follow? My bet is that the pip requirements I created for 0.3 are missing some optional dependencies of the parent packages, which are not optional to DeepOF

edeno commented 1 year ago

This was the pip install.

lucasmiranda42 commented 1 year ago

Dear @edeno,

The latest release (deepof==0.4.5) should fix these issues. The main modification is the requirements.txt file, as stated. Please reopen and let me know if you still have problems!

Best, and thank you once again, Lucas