コード例 #1
0
 def test_difference_when_diffs_i_vs_h(self):
     irods_metadata = IrodsSeqFileMetadata('/seq/123.bam',
                                           samples={
                                               'name': set(['S1']),
                                               'accession_number':
                                               set(['EGA1']),
                                               'internal_id': set(['1'])
                                           },
                                           libraries={
                                               'name': set(['123']),
                                               'internal_id': set(['123'])
                                           },
                                           studies={
                                               'name':
                                               set(["Crohns disease"]),
                                               'accession_number':
                                               set(['EGAS4']),
                                               'internal_id':
                                               set(['4'])
                                           })
     header_metadata = SAMFileHeaderMetadata(
         '/seq/123.bam',
         samples={
             'name': set(['S100']),
             'accession_number': set(),
             'internal_id': set()
         },
         libraries={'internal_id': set(['123'])},
         studies={})
     result = irods_metadata.difference(header_metadata)
     self.assertDictEqual(result, {'samples': {'name': set(['S1'])}})
コード例 #2
0
 def test_difference_when_no_diffs_i_vs_h(self):
     irods_metadata = IrodsSeqFileMetadata('/seq/123.bam',
                                           samples={'name': set(['S1']), 'accession_number': set(), 'internal_id': set()},
                                           libraries={}, studies={})
     header_metadata = SAMFileHeaderMetadata('/seq/123.bam',
                                             samples={'name': set(['S1']), 'accession_number' : set(), 'internal_id': set()},
                                             libraries={}, studies={})
     result = irods_metadata.difference(header_metadata)
     self.assertDictEqual(result, {})
コード例 #3
0
 def test_difference_when_diffs_i_vs_h(self):
     irods_metadata = IrodsSeqFileMetadata('/seq/123.bam',
                                           samples={'name': set(['S1']), 'accession_number': set(['EGA1']), 'internal_id': set(['1'])},
                                           libraries={'name': set(['123']), 'internal_id': set(['123'])},
                                           studies={'name': set(["Crohns disease"]), 'accession_number': set(['EGAS4']), 'internal_id': set(['4'])})
     header_metadata = SAMFileHeaderMetadata('/seq/123.bam',
                                             samples={'name': set(['S100']), 'accession_number' : set(), 'internal_id': set()},
                                             libraries={'internal_id': set(['123'])}, studies={})
     result = irods_metadata.difference(header_metadata)
     self.assertDictEqual(result, {'samples': {'name': set(['S1'])}})
コード例 #4
0
 def test_difference_when_no_diffs_i_vs_h(self):
     irods_metadata = IrodsSeqFileMetadata('/seq/123.bam',
                                           samples={
                                               'name': set(['S1']),
                                               'accession_number': set(),
                                               'internal_id': set()
                                           },
                                           libraries={},
                                           studies={})
     header_metadata = SAMFileHeaderMetadata('/seq/123.bam',
                                             samples={
                                                 'name': set(['S1']),
                                                 'accession_number': set(),
                                                 'internal_id': set()
                                             },
                                             libraries={},
                                             studies={})
     result = irods_metadata.difference(header_metadata)
     self.assertDictEqual(result, {})