def test_process_barcode_in_label(self):
     """ Handles label barcodes from one or two fastq labels """
                          
     fastq1_data = ["HWI-ST830:ATCG","AAAATTTTCCCCGGGG", "1234567890ABCDEF"]
     fastq2_data = ["HWI-ST830:GGGG","TCCCCGGGG", "ABCDEFGHI"]
     bcs_out = FakeOutFile()
     
     process_barcode_in_label(fastq1_data, fastq2_data, bcs_out,
      bc1_len = 4, bc2_len = 3, rev_comp_bc1 = True, rev_comp_bc2 = True)
     
     actual_bcs = bcs_out.data.split('\n') 
     expected_bcs = ['@HWI-ST830:ATCG', 'CGATCCC', '+', 'FFFFFFF', '']
     self.assertEqual(actual_bcs, expected_bcs)                 
Exemple #2
0
    def test_process_barcode_in_label(self):
        """ Handles label barcodes from one or two fastq labels """

        fastq1_data = [
            "HWI-ST830:ATCG",
            "AAAATTTTCCCCGGGG",
            np.arange(3, 19, dtype=np.int8)]
        fastq2_data = ["HWI-ST830:GGGG", "TCCCCGGGG",
                       np.arange(3, 12, dtype=np.int8)]
        bcs_out = FakeOutFile()

        process_barcode_in_label(fastq1_data, fastq2_data, bcs_out,
                                 bc1_len=4, bc2_len=3, rev_comp_bc1=True, rev_comp_bc2=True)

        actual_bcs = bcs_out.data.split('\n')
        expected_bcs = ['@HWI-ST830:ATCG', 'CGATCCC', '+', "'''''''", '']
        self.assertEqual(actual_bcs, expected_bcs)
    def test_process_barcode_in_label(self):
        """ Handles label barcodes from one or two fastq labels """

        fastq1_data = [
            "HWI-ST830:ATCG", "AAAATTTTCCCCGGGG", "1234567890ABCDEF"
        ]
        fastq2_data = ["HWI-ST830:GGGG", "TCCCCGGGG", "ABCDEFGHI"]
        bcs_out = FakeOutFile()

        process_barcode_in_label(fastq1_data,
                                 fastq2_data,
                                 bcs_out,
                                 bc1_len=4,
                                 bc2_len=3,
                                 rev_comp_bc1=True,
                                 rev_comp_bc2=True)

        actual_bcs = bcs_out.data.split('\n')
        expected_bcs = ['@HWI-ST830:ATCG', 'CGATCCC', '+', 'FFFFFFF', '']
        self.assertEqual(actual_bcs, expected_bcs)