comparison sdf_to_tab.py @ 5:1cf3bab54ddd draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdkit commit 09b22cceacb34dd4c6c1b42890f93232df128208"
author bgruening
date Sat, 21 Mar 2020 14:04:00 -0400
parents 617d4555d8d3
children d68bf44e1f5c
comparison
equal deleted inserted replaced
4:414edd9ea77d 5:1cf3bab54ddd
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)