def test_fragmentation_trees_exception(self): ions = self.ions.view(MGFDirFmt) with self.assertRaises(ValueError): compute_fragmentation_trees(sirius_path=self.goodsirpath, features=ions, ppm_max=15, profile='orbitrap', ionization_mode='n3gativ3')
def test_fragmentation_trees(self): ions = self.ions.view(MGFDirFmt) result = compute_fragmentation_trees(sirius_path=self.goodsirpath, features=ions, ppm_max=15, profile='orbitrap') contents = os.listdir(result.get_path()) self.assertTrue(('version.txt' in contents))
def test_fragmentation_trees(self): ions = self.ions.view(MGFDirFmt) result = compute_fragmentation_trees(sirius_path=self.goodsirpath, features=ions, ppm_max=15, profile='orbitrap', ions_considered=['[M+H]+']) contents = os.listdir(result.get_path()) self.assertTrue(('formula_identifications.tsv' in contents)) contents = os.listdir(result.path) self.assertTrue(('stderr.txt' in contents)) self.assertTrue(('stdout.txt' in contents))
def test_fragmentation_trees_negative_ionization(self): ions = self.ions.view(MGFDirFmt) result = compute_fragmentation_trees(sirius_path=self.goodsirpath, features=ions, ppm_max=15, profile='orbitrap', ions_considered=['[M-H]-']) _path = os.path.join(result.get_path(), 'formula_identifications.tsv') identifications = pd.read_csv(_path, sep='\t') self.assertTrue(len(identifications) < 2) contents = os.listdir(result.path) self.assertTrue(('stderr.txt' in contents)) self.assertTrue(('stdout.txt' in contents))