def test_defaults(self): with open(self.get_data_path('expected/pyro-default.tsv')) as fh: exp_table = biom.Table.from_tsv(fh, None, None, lambda x: x) exp_rep_seqs = list( skbio.io.read(self.get_data_path('expected/pyro-default.fasta'), 'fasta', constructor=skbio.DNA)) for seq in exp_rep_seqs: del seq.metadata['description'] exp_md = qiime2.Metadata.load( self.get_data_path('expected/pyro-default-stats.tsv')) table, rep_seqs, md = denoise_pyro(self.demux_seqs, 100) self.assertEqual(table, exp_table) self.assertEqual(_sort_seqs(rep_seqs), _sort_seqs(exp_rep_seqs)) self.assertEqual(md, exp_md)
def test_trunc_len_bigger_than_max_len(self): with self.assertRaisesRegex(ValueError, 'max_len'): denoise_pyro(self.demux_seqs, 100, max_len=99) # Shouldn't fail when max_len > trunc_len denoise_pyro(self.demux_seqs, 100, max_len=160)