changeset 6:d68bf44e1f5c draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdkit commit a03b1b7b283901a1510562f1e6eba41f70afaac4"
author bgruening
date Mon, 23 Mar 2020 15:58:09 -0400
parents 1cf3bab54ddd
children cf725c82c865
files sdf_to_tab.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sdf_to_tab.py	Sat Mar 21 14:04:00 2020 -0400
+++ b/sdf_to_tab.py	Mon Mar 23 15:58:09 2020 -0400
@@ -26,7 +26,8 @@
             print("Molecule could not be read - skipped.")
 
     df = df.astype({'Index': int}).set_index('Index')
-    df.to_csv(vars.out, sep='\t', header=vars.header)
+    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")