diff sdf_to_tab.py @ 4:bbbf5fb356dd draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdkit commit 4d0bfcf37bfbedafc7ff0672dfe452766ca8a606"
author bgruening
date Wed, 17 Feb 2021 12:59:24 +0000
parents 2a868592ebcb
children 67ee76f0e497
line wrap: on
line diff
--- a/sdf_to_tab.py	Tue Jul 28 08:42:43 2020 -0400
+++ b/sdf_to_tab.py	Wed Feb 17 12:59:24 2021 +0000
@@ -1,8 +1,10 @@
 #!/usr/bin/env python3
 import argparse
+
 import pandas as pd
 from rdkit import Chem
 
+
 def sdf_to_tab(vars):
     mols = Chem.SDMolSupplier(vars.inp, sanitize=False)
     df = pd.DataFrame()  # for output
@@ -29,6 +31,7 @@
     sorted_cols = sorted(df.columns.values.tolist())
     df.to_csv(vars.out, sep='\t', header=vars.header, columns=sorted_cols)
 
+
 def main():
     parser = argparse.ArgumentParser(description="Convert SDF to tabular")
     parser.add_argument('--inp', '-i', help="The input file", required=True)
@@ -41,7 +44,7 @@
     parser.add_argument('--name', '-n', action='store_true',
                         help="Include molecule name in output.")
     sdf_to_tab(parser.parse_args())
-    
+
 
 if __name__ == "__main__":
     main()