Module Import alias Import alias Import alias identifier Import alias identifier ImportFrom alias alias FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num keyword NameLoad NameLoad Assign NameStore ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Assign NameStore Call NameLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Set TupleLoad Num Num Num TupleLoad Num Num Num Assign NameStore Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Assign NameStore Call NameLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad NameLoad Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Set TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore Call NameLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad NameLoad Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareGt Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Num Assign NameStore Call NameLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad NameLoad Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr CompareGt Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad ListLoad Num Num Num Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad ListLoad Num Num Num Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad ListLoad ListLoad Num Num Num ListLoad Num Num Num Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad ListLoad Num Num Num Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr ListLoad TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return GeneratorExp Dict Str Str NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num FunctionDef arguments args NameParam defaults body Return SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num Index Num decorator_list Assign NameStore Call NameLoad ListLoad TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam defaults body Return SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num Index Num decorator_list Assign NameStore Call NameLoad ListLoad TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num FunctionDef arguments args NameParam defaults body Return SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num Index Num decorator_list Assign NameStore Call NameLoad ListLoad TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str TupleLoad Str Dict Str Str Str Str keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad Num Num Num keyword Num keyword Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad Num Num Num keyword Num keyword Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad Num Num Num keyword Num With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore ListLoad Num Num Assign NameStore ListLoad TupleLoad NameLoad Num TupleLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Import alias Expr Call AttributeLoad NameLoad attr
N/A N/A unittest N/A warnings N/A numpy np N/A numpy.testing npt skbio.stats subsample_counts isubsample setup N/A N/A N/A N/A N/A Ignore warnings during tests. N/A N/A N/A warnings simplefilter ignore N/A teardown N/A N/A N/A N/A N/A Clear the list of warning filters, so that no filters are active. N/A N/A N/A warnings resetwarnings N/A SubsampleCountsTests N/A N/A unittest TestCase N/A test_subsample_counts_nonrandom N/A N/A self N/A N/A N/A a N/A N/A np array N/A 0 5 0 N/A N/A N/A npt assert_equal N/A subsample_counts a 5 a N/A exp N/A N/A np array N/A 0 2 0 N/A N/A N/A npt assert_equal N/A subsample_counts a 2 exp N/A N/A N/A npt assert_equal N/A subsample_counts a 2 replace True exp N/A a N/A 3 0 1 N/A exp N/A N/A np array N/A 0 0 0 N/A N/A N/A npt assert_equal N/A subsample_counts a 0 exp N/A N/A N/A npt assert_equal N/A subsample_counts a 0 replace True exp N/A test_subsample_counts_without_replacement N/A N/A self N/A N/A N/A a N/A N/A np array N/A 2 0 1 N/A actual N/A set N/A i N/A range 1000 N/A N/A obs N/A subsample_counts a 2 N/A N/A N/A actual add N/A tuple obs N/A N/A N/A self assertEqual actual N/A N/A 1 0 1 N/A 2 0 0 N/A obs N/A subsample_counts a 2 N/A N/A N/A self assertTrue N/A N/A N/A np array_equal obs N/A N/A np array N/A 1 0 1 N/A N/A np array_equal obs N/A N/A np array N/A 2 0 0 N/A test_subsample_counts_with_replacement N/A N/A self N/A N/A N/A a N/A N/A np array N/A 2 0 1 N/A actual N/A set N/A i N/A range 1000 N/A N/A obs N/A subsample_counts a 2 replace True N/A N/A N/A actual add N/A tuple obs N/A N/A N/A self assertEqual actual N/A N/A 1 0 1 N/A 2 0 0 N/A 0 0 2 N/A a N/A N/A np array N/A 2 0 1 2 1 8 6 0 3 3 5 0 0 0 5 N/A actual N/A set N/A i N/A range 1000 N/A N/A obs N/A subsample_counts a 35 replace True N/A N/A N/A self assertEqual N/A N/A obs sum 35 N/A N/A N/A actual add N/A tuple obs N/A N/A N/A self assertTrue N/A N/A len actual 10 N/A test_subsample_counts_with_replacement_equal_n N/A N/A self N/A N/A N/A a N/A N/A np array N/A 0 0 3 4 2 1 N/A actual N/A set N/A i N/A range 1000 N/A N/A obs N/A subsample_counts a 10 replace True N/A N/A N/A self assertEqual N/A N/A obs sum 10 N/A N/A N/A actual add N/A tuple obs N/A N/A N/A self assertTrue N/A N/A len actual 1 N/A test_subsample_counts_invalid_input N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError N/A N/A N/A subsample_counts N/A 1 2 3 -1 N/A N/A N/A self assertRaises TypeError N/A N/A N/A subsample_counts N/A 1 2.3 3 2 N/A N/A N/A self assertRaises ValueError N/A N/A N/A subsample_counts N/A N/A 1 2 3 N/A 4 5 6 2 N/A N/A N/A self assertRaises ValueError N/A N/A N/A subsample_counts N/A 0 5 0 6 N/A N/A ISubsampleTests N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A np random seed 123 N/A N/A self sequences N/A N/A a_1 AATTGGCC-a1 N/A a_2 AATTGGCC-a2 N/A b_1 AATTGGCC-b1 N/A b_2 AATTGGCC-b2 N/A a_4 AATTGGCC-a4 N/A a_3 AATTGGCC-a3 N/A c_1 AATTGGCC-c1 N/A a_5 AATTGGCC-a5 N/A c_2 AATTGGCC-c2 N/A c_3 AATTGGCC-c3 N/A mock_sequence_iter N/A N/A self items N/A N/A N/A N/A N/A SequenceID Sequence sid seq N/A N/A sid seq items N/A test_isubsample_simple N/A N/A self N/A N/A N/A maximum 10 bin_f N/A N/A x N/A N/A N/A N/A N/A N/A N/A x N/A SequenceID rsplit _ 1 N/A 0 N/A N/A exp N/A sorted N/A N/A a N/A SequenceID Sequence a_5 AATTGGCC-a5 N/A a N/A SequenceID Sequence a_1 AATTGGCC-a1 N/A a N/A SequenceID Sequence a_4 AATTGGCC-a4 N/A a N/A SequenceID Sequence a_3 AATTGGCC-a3 N/A a N/A SequenceID Sequence a_2 AATTGGCC-a2 N/A b N/A SequenceID Sequence b_2 AATTGGCC-b2 N/A b N/A SequenceID Sequence b_1 AATTGGCC-b1 N/A c N/A SequenceID Sequence c_3 AATTGGCC-c3 N/A c N/A SequenceID Sequence c_2 AATTGGCC-c2 N/A c N/A SequenceID Sequence c_1 AATTGGCC-c1 key N/A N/A N/A x N/A N/A x N/A 0 N/A obs N/A isubsample N/A N/A self mock_sequence_iter N/A self sequences maximum bin_f bin_f N/A N/A N/A self assertEqual N/A sorted obs key N/A N/A N/A x N/A N/A x N/A 0 exp N/A test_per_sample_sequences_min_seqs N/A N/A self N/A N/A N/A maximum 10 N/A minimum 3 bin_f N/A N/A x N/A N/A N/A N/A N/A N/A N/A x N/A SequenceID rsplit _ 1 N/A 0 N/A N/A exp N/A sorted N/A N/A a N/A SequenceID Sequence a_5 AATTGGCC-a5 N/A a N/A SequenceID Sequence a_1 AATTGGCC-a1 N/A a N/A SequenceID Sequence a_4 AATTGGCC-a4 N/A a N/A SequenceID Sequence a_3 AATTGGCC-a3 N/A a N/A SequenceID Sequence a_2 AATTGGCC-a2 N/A c N/A SequenceID Sequence c_3 AATTGGCC-c3 N/A c N/A SequenceID Sequence c_2 AATTGGCC-c2 N/A c N/A SequenceID Sequence c_1 AATTGGCC-c1 key N/A N/A N/A x N/A N/A x N/A 0 N/A obs N/A isubsample N/A N/A self mock_sequence_iter N/A self sequences maximum minimum bin_f bin_f N/A N/A N/A self assertEqual N/A sorted obs key N/A N/A N/A x N/A N/A x N/A 0 exp N/A test_per_sample_sequences_complex N/A N/A self N/A N/A N/A maximum 2 bin_f N/A N/A x N/A N/A N/A N/A N/A N/A N/A x N/A SequenceID rsplit _ 1 N/A 0 N/A N/A exp N/A sorted N/A N/A a N/A SequenceID Sequence a_2 AATTGGCC-a2 N/A a N/A SequenceID Sequence a_3 AATTGGCC-a3 N/A b N/A SequenceID Sequence b_2 AATTGGCC-b2 N/A b N/A SequenceID Sequence b_1 AATTGGCC-b1 N/A c N/A SequenceID Sequence c_1 AATTGGCC-c1 N/A c N/A SequenceID Sequence c_2 AATTGGCC-c2 key N/A N/A N/A x N/A N/A x N/A 0 N/A obs N/A isubsample N/A N/A self mock_sequence_iter N/A self sequences maximum bin_f bin_f buf_size 1 N/A N/A N/A self assertEqual N/A sorted obs key N/A N/A N/A x N/A N/A x N/A 0 exp N/A test_min_gt_max N/A N/A self N/A N/A N/A gen N/A isubsample N/A 1 2 3 maximum 2 minimum 10 N/A N/A N/A self assertRaises ValueError N/A N/A N/A next gen N/A test_min_lt_zero N/A N/A self N/A N/A N/A gen N/A isubsample N/A 1 2 3 maximum 0 minimum -10 N/A N/A N/A self assertRaises ValueError N/A N/A N/A next gen N/A test_max_lt_zero N/A N/A self N/A N/A N/A gen N/A isubsample N/A 1 2 3 maximum -10 N/A N/A N/A self assertRaises ValueError N/A N/A N/A next gen N/A test_binf_is_none N/A N/A self N/A N/A N/A maximum 2 N/A items N/A 1 2 N/A exp N/A N/A True 1 N/A True 2 N/A obs N/A isubsample items maximum N/A N/A N/A self assertEqual N/A list obs exp N/A N/A N/A N/A __name__ __main__ N/A N/A nose N/A N/A N/A nose runmodule