Package: onglai-classify-homologues
An Algorithm to Classify Homologous SeriesIntroductionHomologous series are groups of chemical compounds sharing the same core structure(s) and different numbers of repeating units (RU) connected end-to-end.This is an open-source algorithm to classify homologous series within compound datasets provided as SMILES, implemented using the RDKit.For example, these series were classified inCOCONUTand theNORMAN Suspect List Exchange, datasets containing natural products and environmental chemicals respectively.CH2 Repeating Unit:CF2 Repeating Unit:RequirementsThe algorithm requires RDKit to beinstalledviaconda-forge.$condacreate-cconda-forge-nmy-rdkit-envrdkit
$condaactivatemy-rdkit-envInstallation$gitclonehttps://github.com/adelenelai/onglai-classify-homologues
$cdclassify_homologues
$pipinstall-e.Note that pip installing the package is not enough; in addition, the repo must be cloned from GitHub because the algorithm runs as a script (see below).Alternatively:#from PyPI$pipinstallonglai-classify-homologuesUsageRun:$pythonnextgen_classify_homols.py[-in<arg>][-s<arg>][-n<arg>][-ru<arg>][-min<arg>][-max<arg>]2>logFlagDescription-in --input_csvpath to input CSV containing SMILES and Name columns-s --smilesname of column containing SMILES. Default is SMILES.-n --namesname of column containing Names. Default is Name.-ru --repeatingunitschemical RU as SMARTS, enclosed within speech marks. Default is CH2 i.e., '[#6&H2]'.-min --min_RU_inminimum length of RU chain, default is 3-max --max__RU_inmaximum length of RU chain, default is 30-f --frag_stepsno. times to fragment molecules to obtain cores, the default is 2Try:$pythonnextgen_classify_homols.py-in../../tests/test1_23.csv-sSMILES-nName-ru'[#6&H2]'-min3-max30-f22>logSuccessful classification will generate anoutputdirectory containing the following files:A TXT file containing the summary of classification results and explanation of outputs (series_no codes)A CSV file containing 8 columns:series_no,cpd_name,CanoSmiles_FinalCores,SMILES,InChI,InChIKey,molecular_formulaandmonoisotopic_mass. The first columnseries_nocontains the results of the homologous series classification.CanoSmiles_FinalCoresindicates the common core shared by all members within a given series. The remaining columns contain information calculated based on theSMILES.A TXT file of unparseable SMILES that were removed (if all SMILES were parsed OK, then empty)Reproducing Classification described in Lai et al.Classification using default settings as described above. Code below runs for sample datasets provided ininput/, full datasets have been archived onZenodo(amend-inaccordingly to classify full datasets).#activate your rdkit environment

#NORMAN-SLE
$ python nextgen_classify_homols.py -in ../../input/pubchem_norman_sle_tree_parentcid_98116_2022-03-21_from115115_trial.csv -s isosmiles -n cmpdname 2>log

#PubChemLite
$ python nextgen_classify_homols.py -in ../../input/PubChemLite_exposomics_20220225_trial.csv -n CompoundName 2>log

#COCONUT
$ python nextgen_classify_homols.py -in ../../input/COCONUT_DB_2021-11_trial.txt 2>logReferences and LinksLai, A., Schaub, J., Steinbeck, C., Schymanski, E. L. An Algorithm to Classify Homologous Series in Compound Datasets.PreprintPosterpresented at the 17th German Cheminformatics Conference, Garmisch-Partenkirchen, Germany (May 8-10, 2022)LicenseThis project is licensed under Apache 2.0  - seeLICENSEfor details.Our Research GroupsEnvironmental Cheminformatics Groupat the