コード例 #1
0
 def test_featureMatch(self):
     goodcsi = self.goodcsi.view(CSIDirFmt)
     tablefp = collate_fingerprint(goodcsi)
     features = load_table(self.featureTable)
     allfeatrs = set(features.ids(axis='observation'))
     fpfeatrs = set(tablefp.index)
     self.assertEqual(fpfeatrs <= allfeatrs, True)
コード例 #2
0
 def setUp(self):
     THIS_DIR = os.path.dirname(os.path.abspath(__file__))
     tablefp = Table({}, [], [])
     self.emptyfeatures = tablefp
     goodtable = os.path.join(THIS_DIR, 'data/features_formated.biom')
     self.features = load_table(goodtable)
     goodtable = os.path.join(THIS_DIR, 'data/features2_formated.biom')
     self.features2 = load_table(goodtable)
     self.goodcsi = qiime2.Artifact.load(
         os.path.join(THIS_DIR, 'data/csiFolder.qza'))
     goodcsi = self.goodcsi.view(CSIDirFmt)
     self.collated = collate_fingerprint(goodcsi)
     self.goodcsi2 = qiime2.Artifact.load(
         os.path.join(THIS_DIR, 'data/csiFolder2.qza'))
     goodcsi = self.goodcsi2.view(CSIDirFmt)
     self.collated2 = collate_fingerprint(goodcsi)
コード例 #3
0
 def setUp(self):
     THIS_DIR = os.path.dirname(os.path.abspath(__file__))
     table = pd.DataFrame()
     self.emptyfps = table
     table = pd.DataFrame(index=['a', 'b', 'c'], data=['a', 'b', 'c'])
     self.wrongtips = table
     goodtable = os.path.join(THIS_DIR, 'data/features_formated.biom')
     self.features = load_table(goodtable)
     goodcsi = os.path.join(THIS_DIR, 'data/goodcsi')
     self.tablefp = collate_fingerprint(goodcsi)
コード例 #4
0
 def test_pubchemFalse(self):
     goodcsi = self.goodcsi.view(CSIDirFmt)
     tablefp = collate_fingerprint(goodcsi, qc_properties=False)
     indx = self.properties.index
     self.assertEqual(set(tablefp.columns) == set(indx), True)
コード例 #5
0
 def test_pubchemTrue(self):
     goodcsi = self.goodcsi.view(CSIDirFmt)
     tablefp = collate_fingerprint(goodcsi, qc_properties=True)
     indx = self.properties.loc[self.properties.type == 'PUBCHEM'].index
     self.assertEqual(set(tablefp.columns) == set(indx), True)
コード例 #6
0
 def test_fingerprintOut(self):
     msg = "Fingerprint file is empty!"
     with self.assertRaisesRegex(ValueError, msg):
         collate_fingerprint(self.emptycsi)