def test_write_trunc_qual(self):
     """ writes truncated qual scores out in correct format """
     
     seq_order = ['seq1', 'seq2', 'seq3']
     
     output_dir = '/tmp/truncate_fasta_qual_test/'
     
     create_dir(output_dir)
     
     qual_out_fp = output_dir + 'seqs_filtered.qual'
     
     write_trunc_qual(trunc_qual_scores, qual_out_fp, seq_order)
     
     # Needs to correctly insert newline after every 60 base calls
     expected_scores = expected_qual_scores
     
     actual_qual = open(qual_out_fp, "U")
     
     actual_qual = [line.strip() for line in actual_qual]
     
     self.assertEqual(actual_qual, expected_scores)
Beispiel #2
0
    def test_write_trunc_qual(self):
        """ writes truncated qual scores out in correct format """

        seq_order = ['seq1', 'seq2', 'seq3']

        output_dir = '/tmp/truncate_fasta_qual_test/'

        create_dir(output_dir)

        qual_out_fp = output_dir + 'seqs_filtered.qual'

        write_trunc_qual(trunc_qual_scores, qual_out_fp, seq_order)

        # Needs to correctly insert newline after every 60 base calls
        expected_scores = expected_qual_scores

        actual_qual = open(qual_out_fp, "U")

        actual_qual = [line.strip() for line in actual_qual]

        self.assertEqual(actual_qual, expected_scores)