Skip to content

Commit db8aa92

Browse files
Merge pull request #1 from gavinmdouglas/nsti_float_fix
fixed NSTI option
2 parents 9e0aec7 + 4e42819 commit db8aa92

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

q2_picrust2/_custom_tree_pipeline.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def custom_tree_pipeline(table: biom.Table,
1111
tree: skbio.TreeNode,
1212
threads: int = 1,
1313
hsp_method: str = "mp",
14-
max_nsti: int = 2) -> (biom.Table,
15-
biom.Table,
16-
biom.Table,
17-
biom.Table):
14+
max_nsti: float = 2.0) -> (biom.Table,
15+
biom.Table,
16+
biom.Table,
17+
biom.Table):
1818

1919
# Run pipeline in temporary directory so that files are not saved locally.
2020
with TemporaryDirectory() as temp_dir:
@@ -52,12 +52,14 @@ def custom_tree_pipeline(table: biom.Table,
5252
EC_metagenome_out = path.join(picrust2_out, "EC_metagenome_out")
5353
system_call_check("metagenome_pipeline.py -i " + biom_infile + " -m " +
5454
hsp_out_16S + ".tsv -f " + hsp_out_EC + ".tsv -p " +
55-
str(threads) + " -o " + EC_metagenome_out)
55+
str(threads) + " -o " + EC_metagenome_out +
56+
" --max_nsti " + str(max_nsti))
5657

5758
KO_metagenome_out = path.join(picrust2_out, "KO_metagenome_out")
5859
system_call_check("metagenome_pipeline.py -i " + biom_infile + " -m " +
5960
hsp_out_16S + ".tsv -f " + hsp_out_KO + ".tsv -p " +
60-
str(threads) + " -o " + KO_metagenome_out)
61+
str(threads) + " -o " + KO_metagenome_out +
62+
" --max_nsti " + str(max_nsti))
6163

6264
# Run pathway inference step.
6365
pathways_out = path.join(picrust2_out, "pathways_out")

q2_picrust2/_full_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def full_pipeline(table: biom.Table,
1515
seq : pd.Series,
1616
threads: int = 1,
1717
hsp_method: str = "mp",
18-
max_nsti: int = 2) -> (biom.Table,
18+
max_nsti: float = 2.0) -> (biom.Table,
1919
biom.Table,
2020
biom.Table,
2121
biom.Table):

q2_picrust2/plugin_setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
parameters={'threads': Int % Range(1, None),
3232
'hsp_method': Str % Choices(HSP_METHODS),
33-
'max_nsti': Int % Range(0, None)},
33+
'max_nsti': Float % Range(0.0, None)},
3434

3535
outputs=[
3636
('ko_metagenome', FeatureTable[Frequency]),
@@ -72,7 +72,7 @@
7272

7373
parameters={'threads': Int % Range(1, None),
7474
'hsp_method': Str % Choices(HSP_METHODS),
75-
'max_nsti': Int % Range(0, None)},
75+
'max_nsti': Float % Range(0.0, None)},
7676

7777
outputs=[
7878
('ko_metagenome', FeatureTable[Frequency]),

0 commit comments

Comments
 (0)