Пример #1
0
    def setUp(self):
        self.isa = Investigation()
        self.isa.ontology_source_references = [
            OntologySource('A', 'f1', '1', 'd1'),
            OntologySource('B', 'f2', '2', 'd2')
        ]
        self.parser = isatab.AssayTableParser(self.isa)

        self.assay_table = \
            u'Sample Name\tExtract Name\tLabeled Extract Name\tRaw Data File\n' \
            u'sample1\textract1\t\tfile1.txt\n' \
            u'sample2\t\tlabeled1\tfile2.txt'

        self.assay_table_with_process = \
            u'Sample Name\tProtocol REF\tExtract Name\tProtocol REF\tLabeled Extract Name\tProtocol REF\tRaw Data File\n' \
            u'sample1\tsample extraction\textract1\tlabeling\tlabeled1\tscanning\tfile1.txt\n' \
            u'sample2\tsample extraction\textract1\tlabeling\tlabeled1\tscanning\tfile2.txt'

        self.sample_list = [Sample(name='sample1'), Sample(name='sample2')]
        self.data_file_list = [
            DataFile(filename='file2.txt', label='Raw Data File'),
            DataFile(filename='file1.txt', label='Raw Data File')
        ]
        self.other_material_list = [
            LabeledExtract(name='labeled1'),
            Extract(name='extract1')
        ]
Пример #2
0
 def test_isatab_parse_bii_s_1_proteome(self):
     with io.open(
             os.path.join(self._tab_data_dir, 'BII-I-1',
                          'i_investigation.txt')) as fp:
         investigation_parser = isatab.InvestigationParser()
         investigation_parser.parse(fp)
         self.parser = isatab.AssayTableParser(investigation_parser.isa)
         self.parser.parse(
             os.path.join(self._tab_data_dir, 'BII-I-1', 'a_proteome.txt'))
         self.assertEqual(len(self.parser.samples), 8)
         self.assertEqual(len(self.parser.data_files), 7)
         self.assertEqual(len(self.parser.other_material), 19)
         self.assertEqual(len(self.parser.process_sequence), 16)
Пример #3
0
 def test_isatab_parse_bii_s_7_Gx(self):
     with io.open(
             os.path.join(self._tab_data_dir, 'BII-S-7',
                          'i_matteo.txt')) as fp:
         investigation_parser = isatab.InvestigationParser()
         investigation_parser.parse(fp)
         self.parser = isatab.AssayTableParser(investigation_parser.isa)
         self.parser.parse(
             os.path.join(self._tab_data_dir, 'BII-S-7',
                          'a_matteo-assay-Gx.txt'))
         self.assertEqual(len(self.parser.samples), 29)
         self.assertEqual(len(self.parser.data_files), 29)
         self.assertEqual(len(self.parser.other_material), 29)
         self.assertEqual(len(self.parser.process_sequence), 116)