Skip to content

Stereopy integration - #48

Open
milka1g wants to merge 17 commits into
mainfrom
stereopy_integration
Open

Stereopy integration#48
milka1g wants to merge 17 commits into
mainfrom
stereopy_integration

Conversation

@milka1g

@milka1g milka1g commented Jul 4, 2023

Copy link
Copy Markdown
Collaborator

Removed scanpy as a dependency and used stereopy's function for calculating neighbor graph and leiden clustering. Updated functions to use AnnBasedStereoExpData and updated tutorial notebook. Using stereopy's logger and AlgorithmBase base class.

@milka1g
milka1g requested review from josicb16 and vladimirkovacevic and removed request for josicb16 July 4, 2023 14:37
Comment thread ccd/community_clustering_algorithm.py Outdated
"""
stats = self.tissue.uns['cell mixtures stats']
sc.settings.set_figure_params(dpi=300, facecolor='white')
set_figure_params(dpi=300, facecolor='white')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use dpi parameter

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be used everywhere? Since now we have different dpis at different places in code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread ccd/community_clustering_algorithm.py Outdated
Comment thread ccd/community_clustering_algorithm.py Outdated
"""Plot a table showing cell type abundance per cluster."""

sc.settings.set_figure_params(dpi=300, facecolor='white')
set_figure_params(dpi=300, facecolor='white')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.dpi

Comment thread community_detection.py Outdated
total = total.loc[sorted(total.index.values, key=lambda x: float(x) if x != "total_cells" else float('inf'))]

sc.settings.set_figure_params(dpi=300, facecolor='white')
set_figure_params(dpi=300, facecolor='white')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.dpi

Comment thread community_detection.py Outdated
df = pd.concat(cells_in_comm_per_slice.values(), axis=1).fillna(0).mul(100).T
df = df[sorted(df.columns.values, key=lambda x: float(x) if x != "unknown" else float('inf'))]
sc.settings.set_figure_params(dpi=200, facecolor='white')
set_figure_params(dpi=200, facecolor='white')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.dpi

Comment thread community_detection.py Outdated
fig, ax = plt.subplots(figsize=(20,10))
fig.subplots_adjust(wspace=0)
sc.settings.set_figure_params(dpi=300, facecolor='white')
set_figure_params(dpi=300, facecolor='white')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.dpi

Comment thread community_detection.py Outdated
axes = axes.ravel()
fig.subplots_adjust(wspace=0)
sc.settings.set_figure_params(dpi=300, facecolor='white')
set_figure_params(dpi=300, facecolor='white')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.dpi

Comment thread main.py Outdated

logging.info(f'main.py took {total_time:.4f}s')
logging.warning('END')
logger.info(f'main.py took {total_time:.4f}s')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cell Community Detection took... instead main.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this as warning instead info

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread main.py Outdated
logging.info(f'main.py took {total_time:.4f}s')
logging.warning('END')
logger.info(f'main.py took {total_time:.4f}s')
logger.warning('END')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread requirements.txt
scipy==1.7.3
seaborn~=0.11.1
anndata==0.8.0
tqdm>=4.60.0

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stereopy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants