Skip to content

Commit c038d18

Browse files
Merge pull request #352 from picrust/v2.5.3
V2.5.3
2 parents e5c1b9c + a4f717c commit c038d18

7 files changed

Lines changed: 24 additions & 19 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
conda init bash
2020
source ~/.bashrc
2121
conda activate picrust2
22-
pip install --editable .
22+
pip install --use-pep517 --config-settings editable_mode=compat -e .
2323
pytest -v

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# PICRUSt2
22

3-
Pleae see the [PICRUSt2 wiki](https://github.com/picrust/picrust2/wiki) for the documentation and tutorials.
3+
Please see the [PICRUSt2 wiki](https://github.com/picrust/picrust2/wiki) for the documentation and tutorials.
44

55
Note that this repository contains the source code for MinPath, which is distributed under the GNU General Public License.
66

7-
**If you have a question about PICRUSt2, please ask this on the [PICRUSt users Google group](https://groups.google.com/g/picrust-users) rather than creating an issue on Github.**
7+
**If you have a question about PICRUSt2, please ask it on the [PICRUSt users Google group](https://groups.google.com/g/picrust-users) rather than creating an issue on GitHub.**
8+

picrust2-env.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ dependencies:
1111
- biom-format >=2.1.10
1212
- cython
1313
- epa-ng=0.3.8
14-
- gappa=0.8.0
14+
- dendropy=4.5.2
15+
- gappa >=0.8.0,<=0.8.5
1516
- glpk >=4.65
1617
- h5py >=2.10.0
1718
- hmmer >=3.1b2,<=3.2.1
@@ -21,8 +22,8 @@ dependencies:
2122
- pandas >=1.1.5
2223
- pytest >=4.4.1
2324
- pytest-cov >=2.6.1
24-
- python >=3.5,<3.9
25+
- python >=3.5
2526
- r-base >=3.5.1
2627
- r-castor >=1.7.2
2728
- scipy >=1.2.1
28-
- sepp=4.3.10
29+
- sepp=4.4.0

picrust2/metagenome_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def strat_funcs_by_samples(func_abun, sample_abun, rare_seqs=[],
153153

154154
# Return dataframe and also unstratified dataframe if specified.
155155
if return_unstrat:
156-
return(strat_func, strat_func.groupby(level='function', axis=0).sum())
156+
return(strat_func, strat_func.groupby(level='function').sum())
157157
else:
158158
return(strat_func)
159159

@@ -392,7 +392,7 @@ def contrib_to_unstrat(contrib_table, sample_order=None):
392392
contrib_table = pd.pivot_table(data=contrib_table, columns='sample',
393393
index='function',
394394
values='taxon_function_abun',
395-
aggfunc=np.sum, fill_value=0)
395+
aggfunc='sum', fill_value=0)
396396

397397
contrib_table.index.name = None
398398
contrib_table.columns.name = None

picrust2/pathway_pipeline.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def path_abun_weighted_by_seq(reaction_abun, func_ids, total_sum, path_abun,
605605

606606
# Get dataframe with sum of all genes per sequence.
607607
seq_path_abun = pd.pivot_table(data=reaction_abun, index="sequence",
608-
aggfunc=np.sum)
608+
aggfunc='sum')
609609

610610
# Get weighted pathway abundance.
611611
strat_path_abun = (seq_path_abun / total_sum) * path_abun
@@ -640,7 +640,7 @@ def contributional_path_abun(reaction_abun, func_ids, total_sum, path_abun,
640640
'taxon',
641641
'taxon_abun',
642642
'taxon_rel_abun'],
643-
aggfunc=np.sum)
643+
aggfunc='sum')
644644

645645
contrib_path.reset_index(inplace=True)
646646

@@ -859,7 +859,7 @@ def contrib_format_pathway_levels(sample_id, contrib_input, minpath_map, out_dir
859859
unstrat_input = contrib_to_unstrat(contrib_input)
860860

861861
# Define dictionary for keeping track of reaction abundances.
862-
reaction_abun = unstrat_input[sample_id].to_dict(defaultdict(int))
862+
reaction_abun = unstrat_input[sample_id].to_dict(into=defaultdict(int))
863863

864864
if run_minpath:
865865
pathways_present = minpath_wrapper(sample_id, unstrat_input,
@@ -961,7 +961,7 @@ def basic_strat_pathway_levels(sample_id, strat_input, minpath_map, out_dir,
961961
unstrat_input = strat_to_unstrat_counts(strat_input)
962962

963963
# Define dictionary for keeping track of reaction abundances.
964-
reaction_abun = unstrat_input[sample_id].to_dict(defaultdict(int))
964+
reaction_abun = unstrat_input[sample_id].to_dict(into=defaultdict(int))
965965

966966
if run_minpath:
967967

@@ -1043,7 +1043,7 @@ def unstrat_pathway_levels(sample_id, unstrat_input, minpath_map, out_dir,
10431043
unstrat_input.set_index("function", drop=True, inplace=True)
10441044

10451045
# Define dictionary for keeping track of reaction abundances.
1046-
reaction_abun = unstrat_input[sample_id].to_dict(defaultdict(int))
1046+
reaction_abun = unstrat_input[sample_id].to_dict(into=defaultdict(int))
10471047

10481048
if run_minpath:
10491049

@@ -1193,16 +1193,16 @@ def regroup_func_ids(in_df, in_format, mapfile, proc):
11931193
index=['sample', 'function', 'taxon',
11941194
'taxon_abun',
11951195
'taxon_rel_abun'],
1196-
aggfunc=np.sum)
1196+
aggfunc='sum')
11971197

11981198
elif in_format == "strat":
11991199
regrouped_table = pd.pivot_table(raw_new_ids_combined,
12001200
index=["function", "sequence"],
1201-
aggfunc=np.sum)
1201+
aggfunc='sum')
12021202
elif in_format == "unstrat":
12031203
regrouped_table = pd.pivot_table(raw_new_ids_combined,
12041204
index="function",
1205-
aggfunc=np.sum)
1205+
aggfunc='sum')
12061206

12071207
regrouped_table.reset_index(inplace=True)
12081208
regrouped_table.columns.name = None
@@ -1427,4 +1427,4 @@ def strat_to_unstrat_counts(strat_df, func_col="function"):
14271427

14281428
strat_df = strat_df.drop(["sequence"], axis=1)
14291429

1430-
return(pd.pivot_table(data=strat_df, index=func_col, aggfunc=np.sum))
1430+
return(pd.pivot_table(data=strat_df, index=func_col, aggfunc='sum'))

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from glob import glob
55

66
__license__ = "GPL"
7-
__version__ = "2.5.2"
8-
__maintainer__ = "Gavin Douglas"
7+
__version__ = "2.5.3"
8+
__maintainer__ = "Langille Lab"
99

1010
long_description = ("Douglas et al. 2020. PICRUSt2 for prediction of "
1111
"metagenome functions. Nature Biotechnology. doi: "

0 commit comments

Comments
 (0)