comparison sdf_to_tab.py @ 2:40ff81f67f5e 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:27 -0400
parents 06828e0cc8a7
children 71bc02c59d3a
comparison
equal deleted inserted replaced
1:193389d3a5f0 2:40ff81f67f5e
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)