diff mordred_descriptors.py @ 1:e2f40a02f31a draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/mordred commit 7c47e7409a8cb19e20b4424329f5d0d9470f3b00
author bgruening
date Tue, 04 Jun 2019 10:29:10 -0400
parents ea68b86303e2
children d074b0c2b54f
line wrap: on
line diff
--- a/mordred_descriptors.py	Thu May 23 18:31:43 2019 -0400
+++ b/mordred_descriptors.py	Tue Jun 04 10:29:10 2019 -0400
@@ -30,9 +30,9 @@
     with open(filename) as f: 
         mols = f.read().split('\n') 
     if ext == 'smi':
-        return [Chem.MolFromSmiles(mol, sanitize=True) for mol in mols]
+        return [Chem.MolFromSmiles(mol, sanitize=True) for mol in mols if mol != '']
     if ext == 'inchi':
-        return [Chem.inchi.MolFromInchi(mol, sanitize=True) for mol in mols]
+        return [Chem.inchi.MolFromInchi(mol, sanitize=True) for mol in mols if mol != '']
 
 
 def mordred_descriptors(mols, output, header, use_3d):
@@ -68,4 +68,4 @@
     args = parser.parse_args()
 
     mols = mol_supplier(args.infile, args.iformat)
-    mordred_descriptors(mols, args.outfile, args.header, args.use_3d)
\ No newline at end of file
+    mordred_descriptors(mols, args.outfile, args.header, args.use_3d)