Mercurial > repos > bgruening > openbabel_filter
diff ob_filter.py @ 12:2213bfc4567a draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/openbabel commit cda909c5e0b88fa3d12abe43fc72b8dd0729417a"
| author | bgruening |
|---|---|
| date | Thu, 09 Apr 2020 13:55:49 +0000 |
| parents | 9cc9947c84a1 |
| children | 1c0e4c2ac9ce |
line wrap: on
line diff
--- a/ob_filter.py Wed Mar 25 20:39:01 2020 +0000 +++ b/ob_filter.py Thu Apr 09 13:55:49 2020 +0000 @@ -40,7 +40,7 @@ for mol in pybel.readfile('sdf', args.input): for key, elem in filters.items(): # map the short description to the larger metadata names stored in the sdf file - property = cheminfolib.ColumnNames[key] + property = cheminfolib.ColumnNames.get(key, key) min = elem[0] max = elem[1] if float(mol.data[property]) >= float(min) and float(mol.data[property]) <= float(max): @@ -113,7 +113,7 @@ # Check if the sdf file contains all of the required metadata to invoke the precalculation filtering mol = next(pybel.readfile('sdf', args.input)) for key, elem in filters.items(): - property = cheminfolib.ColumnNames[key] + property = cheminfolib.ColumnNames.get(key, key) if not property in mol.data: break else:
