Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

101 pval selection #102

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion moonstone/analysis/differential_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_multiple_features(self, feature, test_to_use):
list_ofgroups = []
for variable in variable_dic:
list_ofgroups.append(variable_dic[variable][self.full_table.columns[family]])
#test = self.tests_functions_used[test_to_use](*np.asarray(list_ofgroups))
# test = self.tests_functions_used[test_to_use](*np.asarray(list_ofgroups))
test = self.tests_functions_used[test_to_use](*list_ofgroups) # works for kruskal and one way anova
features.append(feature)
taxons.append(self.full_table.columns[family])
Expand Down
386 changes: 379 additions & 7 deletions moonstone/analysis/diversity/base.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions moonstone/plot/counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def plot_mean_distribution(

mean_series = self.df.mean(axis=1)
binned_mean = SeriesBinning(mean_series).binned_data
bar_fig = BarGraph(binned_mean, plotting_options, show=show, output_file=output_file)
bar_fig.plot_one_graph(plotting_options, show=show, output_file=output_file)
bar_fig = BarGraph(binned_mean)
bar_fig.plot_one_graph(plotting_options=plotting_options, show=show, output_file=output_file)


class PlotTaxonomyCounts:
Expand Down
11 changes: 1 addition & 10 deletions moonstone/plot/graphs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,9 @@ class BaseGraph(ABC):
def __init__(
self,
data: Union[pd.Series, pd.DataFrame],
plotting_options: dict = None,
show: bool = True,
output_file: Union[bool, str] = False,
):
"""
:param data: data to plot
:param show: set to False if you don't want to show the plot
:param output_file: name of the output file
:param plotting_options: options of plotting that will override the default setup \n
[!] Make sure the value given to an argument is of the right type \n
options allowed : 'log': `bool` ; 'colorbar': `[str, List[str]]` ;
'tickangle': `[int, float]`
"""
self.data = data

Expand Down Expand Up @@ -236,7 +227,7 @@ def plot_one_graph(
if groups:
filtered_df = self.data[self.data[group_col].isin(groups)]
filtered_df[group_col] = filtered_df[group_col].astype("category")
filtered_df[group_col].cat = filtered_df[group_col].cat.set_categories(groups)
filtered_df[group_col] = filtered_df[group_col].cat.set_categories(groups, ordered=True)
filtered_df = filtered_df.sort_values([group_col])
else:
filtered_df = copy.deepcopy(self.data)
Expand Down
26 changes: 13 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
author='Kenzo-Hugo Hillion, Agnès Baud, Mariela Furstenheim, Sean Kennedy',
author_email='kehillio@pasteur.fr',
install_requires=[
'pandas==2.0.2',
'matplotlib==3.3.0',
'plotly==5.17.0',
'statsmodels==0.14.0',
'python-slugify==4.0.1',
'pyaml==20.4.0',
'numpy==1.24.3',
'scikit-bio==0.5.9',
'scikit-learn==1.3.1',
'hdmedians==0.14.2',
'cython==0.29.21',
'scipy==1.9.0'
'pandas>=2.0.2',
'matplotlib>=3.3.0',
'plotly>=5.17.0',
'statsmodels>=0.14.0',
'python-slugify>=4.0.1',
'pyaml>=20.4.0',
'numpy>=1.24.3',
'scikit-bio>=0.5.9',
'scikit-learn>=1.3.1',
'hdmedians>=0.14.2',
'cython>=0.29.21',
'scipy>=1.9.0'
],
packages=find_packages(),
entry_points={'console_scripts': ['moonstone=moonstone.main:run']},
)
)
Loading
Loading