Mercurial > repos > bgruening > ctb_rdkit_descriptors
comparison sdf_to_tab.py @ 6:287e8e0d1e3d draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/rdkit commit a03b1b7b283901a1510562f1e6eba41f70afaac4"
| author | bgruening |
|---|---|
| date | Mon, 23 Mar 2020 19:56:31 +0000 |
| parents | 5f35d8bd62a0 |
| children | 2d051db1f561 |
comparison
equal
deleted
inserted
replaced
| 5:5f35d8bd62a0 | 6:287e8e0d1e3d |
|---|---|
| 24 df = df.append(d, ignore_index=True) | 24 df = df.append(d, ignore_index=True) |
| 25 else: | 25 else: |
| 26 print("Molecule could not be read - skipped.") | 26 print("Molecule could not be read - skipped.") |
| 27 | 27 |
| 28 df = df.astype({'Index': int}).set_index('Index') | 28 df = df.astype({'Index': int}).set_index('Index') |
| 29 df.to_csv(vars.out, sep='\t', header=vars.header) | 29 sorted_cols = sorted(df.columns.values.tolist()) |
| 30 df.to_csv(vars.out, sep='\t', header=vars.header, columns=sorted_cols) | |
| 30 | 31 |
| 31 def main(): | 32 def main(): |
| 32 parser = argparse.ArgumentParser(description="Convert SDF to tabular") | 33 parser = argparse.ArgumentParser(description="Convert SDF to tabular") |
| 33 parser.add_argument('--inp', '-i', help="The input file", required=True) | 34 parser.add_argument('--inp', '-i', help="The input file", required=True) |
| 34 parser.add_argument('--out', '-o', help="The output file", required=True) | 35 parser.add_argument('--out', '-o', help="The output file", required=True) |
