예제 #1
0
    def test_check_mapping_data_valid_data(self):
        """ Returns expected dict with valid data supplied """

        mapping_data = [
            'Sample1\tAAAA\tACTG\tFile1\ts.1'.split('\t'),
            'Sample2\tCCCC\tACTG\tFile2\ts.2'.split('\t'),
            'Sample3\tTTTT\tACTG\tFile3\ts.3'.split('\t')
        ]

        headers = [
            'SampleID', 'BarcodeSequence', 'LinkerPrimerSequence',
            'InputFileNames', 'Description'
        ]

        filename_column = 'InputFileNames'

        expected_data = {
            'File3': 'Sample3',
            'File2': 'Sample2',
            'File1': 'Sample1'
        }

        actual_data = check_mapping_data(mapping_data, headers,
                                         filename_column)

        self.assertEqual(actual_data, expected_data)
예제 #2
0
    def test_check_mapping_data_valid_data(self):
        """ Returns expected dict with valid data supplied """

        mapping_data = ['Sample1\tFile1', 'Sample2\tFile2', 'Sample3\tFile3']

        expected_data = {
            'File3': 'Sample3',
            'File2': 'Sample2',
            'File1': 'Sample1'
        }

        actual_data = check_mapping_data(mapping_data)

        self.assertEqual(actual_data, expected_data)
예제 #3
0
 def test_check_mapping_data_valid_data(self):
     """ Returns expected dict with valid data supplied """
     
     mapping_data = ['Sample1\tFile1',
                     'Sample2\tFile2',
                     'Sample3\tFile3'
                     ]
                     
     expected_data = {'File3': 'Sample3',
                      'File2': 'Sample2',
                      'File1': 'Sample1'}
     
     actual_data = check_mapping_data(mapping_data)
     
     self.assertEqual(actual_data, expected_data)
예제 #4
0
    def test_check_mapping_data_valid_data(self):
        """ Returns expected dict with valid data supplied """

        mapping_data = [
            "Sample1\tAAAA\tACTG\tFile1\ts.1".split("\t"),
            "Sample2\tCCCC\tACTG\tFile2\ts.2".split("\t"),
            "Sample3\tTTTT\tACTG\tFile3\ts.3".split("\t"),
        ]

        headers = ["SampleID", "BarcodeSequence", "LinkerPrimerSequence", "InputFileNames", "Description"]

        filename_column = "InputFileNames"

        expected_data = {"File3": "Sample3", "File2": "Sample2", "File1": "Sample1"}

        actual_data = check_mapping_data(mapping_data, headers, filename_column)

        self.assertEqual(actual_data, expected_data)
예제 #5
0
 def test_check_mapping_data_valid_data(self):
     """ Returns expected dict with valid data supplied """
     
     mapping_data = ['Sample1\tAAAA\tACTG\tFile1\ts.1'.split('\t'),
                     'Sample2\tCCCC\tACTG\tFile2\ts.2'.split('\t'),
                     'Sample3\tTTTT\tACTG\tFile3\ts.3'.split('\t')
                     ]
     
     headers = ['SampleID', 'BarcodeSequence', 'LinkerPrimerSequence',
      'InputFileNames', 'Description']
     
     filename_column = 'InputFileNames'                
                     
     expected_data = {'File3': 'Sample3',
                      'File2': 'Sample2',
                      'File1': 'Sample1'}
     
     actual_data = check_mapping_data(mapping_data, headers, filename_column)
     
     self.assertEqual(actual_data, expected_data)