Mercurial > repos > bgruening > enumerate_charges
comparison sdf_to_tab.py @ 1:3d96dc99698f draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdkit commit 09b22cceacb34dd4c6c1b42890f93232df128208"
author | bgruening |
---|---|
date | Sat, 21 Mar 2020 14:03:09 -0400 |
parents | 0f3e5c69251e |
children | 2a868592ebcb |
comparison
equal
deleted
inserted
replaced
0:0f3e5c69251e | 1:3d96dc99698f |
---|---|
14 if vars.props.strip() == '': # none specified, return all | 14 if vars.props.strip() == '': # none specified, return all |
15 d = {prop: val for (prop, val) in d.items() if not any(x in str(val) for x in ['\n', '\t'])} # remove items containing newlines or tabs | 15 d = {prop: val for (prop, val) in d.items() if not any(x in str(val) for x in ['\n', '\t'])} # remove items containing newlines or tabs |
16 else: | 16 else: |
17 d = {prop: val for (prop, val) in d.items() if prop in vars.props.replace(' ', '').split(',')} # remove items not requested via CLI | 17 d = {prop: val for (prop, val) in d.items() if prop in vars.props.replace(' ', '').split(',')} # remove items not requested via CLI |
18 if vars.name: | 18 if vars.name: |
19 d['Name'] = mols[n].GetProp('_Name') | 19 d['SDFMoleculeName'] = mols[n].GetProp('_Name') |
20 if vars.smiles: | 20 if vars.smiles: |
21 d['SMILES'] = Chem.MolToSmiles(mols[n], isomericSmiles=False) | 21 d['SMILES'] = Chem.MolToSmiles(mols[n], isomericSmiles=False) |
22 d['Index'] = int(n) | 22 d['Index'] = int(n) |
23 | 23 |
24 df = df.append(d, ignore_index=True) | 24 df = df.append(d, ignore_index=True) |