def test_build_di_demux_command(self): with tempfile.NamedTemporaryFile() as barcode_fasta_f: with tempfile.NamedTemporaryFile() as barcode_fasta_r: obs = _build_demux_command(self.seqs_dir_fmt, { 'fwd': barcode_fasta_f, 'rev': barcode_fasta_r }, self.per_sample_dir_fmt, self.untrimmed_dir_fmt, 0.1, 2) self.assertTrue(barcode_fasta_f.name in obs[2]) self.assertTrue('--pair-adapters' == obs[11]) self.assertTrue(barcode_fasta_r.name in obs[13])
def test_build_demux_command(self): with tempfile.NamedTemporaryFile() as barcode_fasta: obs = _build_demux_command(self.seqs_dir_fmt, barcode_fasta, self.per_sample_dir_fmt, self.untrimmed_dir_fmt, 0.1) self.assertTrue(barcode_fasta.name in obs[2]) self.assertTrue('0.1' in obs[4]) self.assertTrue(str(self.per_sample_dir_fmt) in obs[6]) self.assertTrue(str(self.untrimmed_dir_fmt) in obs[8]) self.assertEqual(str(self.seqs_dir_fmt.file.view(FastqGzFormat)), obs[9])
def test_build_demux_command(self): with tempfile.NamedTemporaryFile() as barcode_fasta: obs = _build_demux_command(self.seqs_dir_fmt, { 'fwd': barcode_fasta, 'rev': None }, self.per_sample_dir_fmt, self.untrimmed_dir_fmt, 0.1) self.assertTrue(barcode_fasta.name in obs[2]) self.assertTrue('0.1' in obs[4]) self.assertTrue(str(self.per_sample_dir_fmt) in obs[6]) # fwd self.assertTrue(str(self.per_sample_dir_fmt) in obs[10]) # rev self.assertTrue(str(self.untrimmed_dir_fmt) in obs[8]) # fwd self.assertTrue(str(self.untrimmed_dir_fmt) in obs[12]) # rev exp_f = str(self.seqs_dir_fmt.forward_sequences.view(FastqGzFormat)) self.assertEqual(exp_f, obs[13]) exp_r = str(self.seqs_dir_fmt.reverse_sequences.view(FastqGzFormat)) self.assertEqual(exp_r, obs[14])