ExtendedConnectivityFingerprints.pl - Generate extended connectivity fingerprints for SD files
ExtendedConnectivityFingerprints.pl SDFile(s)...
ExtendedConnectivityFingerprints.pl [--AromaticityModel AromaticityModelType] [-a, --AtomIdentifierType AtomicInvariantsAtomTypes] [--AtomicInvariantsToUse "AtomicInvariant,AtomicInvariant..."] [--FunctionalClassesToUse "FunctionalClass1,FunctionalClass2..."] [--BitsOrder Ascending | Descending] [-b, --BitStringFormat BinaryString | HexadecimalString] [--CompoundID DataFieldName or LabelPrefixString] [--CompoundIDLabel text] [--CompoundIDMode] [--DataFields "FieldLabel1,FieldLabel2,..."] [-d, --DataFieldsMode All | Common | Specify | CompoundID] [-f, --Filter Yes | No] [--FingerprintsLabel text] [-h, --help] [-k, --KeepLargestComponent Yes | No] [-m, --mode ExtendedConnectivity | ExtendedConnecticityCount | ExtendedConnecticityBits] [-n, --NeighborhoodRadius number] [--OutDelim comma | tab | semicolon] [--output SD | FP | text | all] [-o, --overwrite] [-q, --quote Yes | No] [-r, --root RootName] [-s, --size number] [--UsePerlCoreRandom Yes | No] [-v, --VectorStringFormat IDsAndValuesString | IDsAndValuesPairsString | ValuesAndIDsString | ValuesAndIDsPairsString] [-w, --WorkingDir dirname] SDFile(s)...
Generate extended connectivity fingerprints [ Ref 48, Ref 52 ] for SDFile(s) and create appropriate SD, FP or CSV/TSV text file(s) containing fingerprints vector strings corresponding to molecular fingerprints.
Multiple SDFile names are separated by spaces. The valid file extensions are .sdf and .sd. All other file names are ignored. All the SD files in a current directory can be specified either by *.sdf or the current directory name.
The current release of MayaChemTools supports generation of extended connectivity fingerprints corresponding to following -a, --AtomIdentifierTypes:
Based on values specified for -a, --AtomIdentifierType, --AtomicInvariantsToUse and --FunctionalClassesToUse, initial atom types are assigned to all non-hydrogen atoms in a molecule and these atom types strings are converted into initial atom identifier integers using TextUtil::HashCode function. The duplicate atom identifiers are removed.
For -n, --NeighborhoodRadius value of 0, the initial set of unique atom identifiers comprises the molecule fingerprints. Otherwise, atom neighborhoods are generated for each non-hydrogen atom up to specified -n, --NeighborhoodRadius value. For each non-hydrogen central atom at a specific radius, its neighbors at next radius level along with their bond orders and previously calculated atom identifiers are collected which in turn are used to generate a new integer atom identifier; the bond orders and atom identifier pairs list is first sorted by bond order followed by atom identifiers to make these values graph invariant.
After integer atom identifiers have been generated for all non-hydrogen atoms at all specified neighborhood radii, the duplicate integer atom identifiers corresponding to same hash code value generated using TextUtil::HashCode are tracked by keeping the atom identifiers at lower radius. Additionally, all structurally duplicate integer atom identifiers at each specified radius are also tracked by identifying equivalent atoms and bonds corresponding to substructures used for generating atom identifier and keeping integer atom identifier with lowest value.
For ExtendedConnnectivity value of fingerprints -m, --mode, the duplicate identifiers are removed from the list and the unique atom identifiers constitute the extended connectivity fingerprints of a molecule.
For ExtendedConnnectivityCount value of fingerprints -m, --mode, the occurrence of each unique atom identifiers appears is counted and the unique atom identifiers along with their count constitute the extended connectivity fingerprints of a molecule.
For ExtendedConnectivityBits value of fingerprints -m, --mode, the unique atom identifiers are used as a random number seed to generate a random integer value between 0 and --Size which in turn is used to set corresponding bits in the fingerprint bit-vector string.
Example of SD file containing extended connectivity fingerprints string data:
Example of FP file containing extended connectivity fingerprints string data:
Example of CSV Text file containing extended connectivity fingerprints string data:
The current release of MayaChemTools generates the following types of extended connectivity fingerprints vector strings:
Specify aromaticity model to use during detection of aromaticity. Possible values in the current release are: MDLAromaticityModel, TriposAromaticityModel, MMFFAromaticityModel, ChemAxonBasicAromaticityModel, ChemAxonGeneralAromaticityModel, DaylightAromaticityModel or MayaChemToolsAromaticityModel. Default value: MayaChemToolsAromaticityModel.
The supported aromaticity model names along with model specific control parameters are defined in AromaticityModelsData.csv, which is distributed with the current release and is available under lib/data directory. Molecule.pm module retrieves data from this file during class instantiation and makes it available to method DetectAromaticity for detecting aromaticity corresponding to a specific model.
Specify atom identifier type to use for assignment of initial atom identifier to non-hydrogen atoms during calculation of extended connectivity fingerprints [ Ref 48, Ref 52]. Possible values in the current release are: AtomicInvariantsAtomTypes, FunctionalClassAtomTypes, DREIDINGAtomTypes, EStateAtomTypes, MMFF94AtomTypes, SLogPAtomTypes, SYBYLAtomTypes, TPSAAtomTypes, UFFAtomTypes. Default value: AtomicInvariantsAtomTypes.
This value is used during AtomicInvariantsAtomTypes value of a, --AtomIdentifierType option. It's a list of comma separated valid atomic invariant atom types.
Possible values for atomic invarians are: AS, X, BO, LBO, SB, DB, TB, H, Ar, RA, FC, MN, SM. Default value [ Ref 24 ]: AS,X,BO,H,FC,MN.
The atomic invariants abbreviations correspond to:
Atom type generated by AtomTypes::AtomicInvariantsAtomTypes class corresponds to:
Except for AS which is a required atomic invariant in atom types, all other atomic invariants are optional. Atom type specification doesn't include atomic invariants with zero or undefined values.
In addition to usage of abbreviations for specifying atomic invariants, the following descriptive words are also allowed:
AtomTypes::AtomicInvariantsAtomTypes module is used to assign atomic invariant atom types.
Bits order to use during generation of fingerprints bit-vector string for ExtendedConnectivityBits value of -m, --mode option. Possible values: Ascending, Descending. Default: Ascending.
Ascending bit order which corresponds to first bit in each byte as the lowest bit as opposed to the highest bit.
Internally, bits are stored in Ascending order using Perl vec function. Regardless of machine order, big-endian or little-endian, vec function always considers first string byte as the lowest byte and first bit within each byte as the lowest bit.
Format of fingerprints bit-vector string data in output SD, FP or CSV/TSV text file(s) specified by --output used during ExtendedConnectivityBits value of -m, --mode option. Possible values: BinaryString, HexadecimalString. Default value: BinaryString.
BinaryString corresponds to an ASCII string containing 1s and 0s. HexadecimalString contains bit values in ASCII hexadecimal format.
Examples:
This value is used during FunctionalClassAtomTypes value of a, --AtomIdentifierType option. It's a list of comma separated valid functional classes.
Possible values for atom functional classes are: Ar, CA, H, HBA, HBD, Hal, NI, PI, RA. Default value [ Ref 24 ]: HBD,HBA,PI,NI,Ar,Hal.
The functional class abbreviations correspond to:
AtomTypes::FunctionalClassAtomTypes module is used to assign functional class atom types. It uses following definitions [ Ref 60-61, Ref 65-66 ]:
This value is --CompoundIDMode specific and indicates how compound ID is generated.
For DataField value of --CompoundIDMode option, it corresponds to datafield label name whose value is used as compound ID; otherwise, it's a prefix string used for generating compound IDs like LabelPrefixString<Number>. Default value, Cmpd, generates compound IDs which look like Cmpd<Number>.
Examples for DataField value of --CompoundIDMode:
Examples for LabelPrefix or MolNameOrLabelPrefix value of --CompoundIDMode:
The value specified above generates compound IDs which correspond to Compound<Number> instead of default value of Cmpd<Number>.
Specify compound ID column label for FP or CSV/TSV text file(s) used during CompoundID value of --DataFieldsMode option. Default: CompoundID.
Specify how to generate compound IDs and write to FP or CSV/TSV text file(s) along with generated fingerprints for FP | text | all values of --output option: use a SDFile(s) datafield value; use molname line from SDFile(s); generate a sequential ID with specific prefix; use combination of both MolName and LabelPrefix with usage of LabelPrefix values for empty molname lines.
Possible values: DataField | MolName | LabelPrefix | MolNameOrLabelPrefix. Default: LabelPrefix.
For MolNameAndLabelPrefix value of --CompoundIDMode, molname line in SDFile(s) takes precedence over sequential compound IDs generated using LabelPrefix and only empty molname values are replaced with sequential compound IDs.
This is only used for CompoundID value of --DataFieldsMode option.
Comma delimited list of SDFiles(s) data fields to extract and write to CSV/TSV text file(s) along with generated fingerprints for text | all values of --output option.
This is only used for Specify value of --DataFieldsMode option.
Examples:
Specify how data fields in SDFile(s) are transferred to output CSV/TSV text file(s) along with generated fingerprints for text | all values of --output option: transfer all SD data field; transfer SD data files common to all compounds; extract specified data fields; generate a compound ID using molname line, a compound prefix, or a combination of both. Possible values: All | Common | specify | CompoundID. Default value: CompoundID.
Specify whether to check and filter compound data in SDFile(s). Possible values: Yes or No. Default value: Yes.
By default, compound data is checked before calculating fingerprints and compounds containing atom data corresponding to non-element symbols or no atom data are ignored.
SD data label or text file column label to use for fingerprints string in output SD or CSV/TSV text file(s) specified by --output. Default value: ExtendedConnectivityFingerprints.
Print this help message.
Generate fingerprints for only the largest component in molecule. Possible values: Yes or No. Default value: Yes.
For molecules containing multiple connected components, fingerprints can be generated in two different ways: use all connected components or just the largest connected component. By default, all atoms except for the largest connected component are deleted before generation of fingerprints.
Specify type of extended connectivity fingerprints to generate for molecules in SDFile(s). Possible values: ExtendedConnectivity, ExtendedConnecticityCount or ExtendedConnectivityBits. Default value: ExtendedConnectivity.
For ExtendedConnnectivity value of fingerprints -m, --mode, a fingerprint vector containing unique atom identifiers constitute the extended connectivity fingerprints of a molecule.
For ExtendedConnnectivityCount value of fingerprints -m, --mode, a fingerprint vector containing unique atom identifiers along with their count constitute the extended connectivity fingerprints of a molecule.
For ExtendedConnnectivityBits value of fingerprints -m, --mode, a fingerprint bit vector indicating presence/absence of structurally unique atom identifiers constitute the extended connectivity fingerprints of a molecule.
Atomic neighborhood radius for generating extended connectivity neighborhoods. Default value: 2. Valid values: >= 0. Neighborhood radius of zero correspond to just the list of non-hydrogen atoms.
Default value of 2 for atomic neighborhood radius generates extended connectivity fingerprints corresponding to path length or diameter value of 4 [ Ref 52b ].
Delimiter for output CSV/TSV text file(s). Possible values: comma, tab, or semicolon Default value: comma.
Type of output files to generate. Possible values: SD, FP, text, or all. Default value: text.
Overwrite existing files.
Put quote around column values in output CSV/TSV text file(s). Possible values: Yes or No. Default value: Yes.
New file name is generated using the root: <Root>.<Ext>. Default for new file names: <SDFileName><ExtendedConnectivityFP>.<Ext>. The file type determines <Ext> value. The sdf, fpf, csv, and tsv <Ext> values are used for SD, FP, comma/semicolon, and tab delimited text files, respectively.This option is ignored for multiple input files.
Size of bit-vector to use during generation of fingerprints bit-vector string for ExtendedConnectivityBits value of -m, --mode. Default value: 1024. Valid values correspond to any positive integer which satisfies the following criteria: power of 2, >= 32 and <= 2 ** 32.
Examples:
Specify whether to use Perl CORE::rand or MayaChemTools MathUtil::random function during random number generation for setting bits in fingerprints bit-vector strings. Possible values: Yes or No. Default value: Yes.
No value option for --UsePerlCoreRandom allows the generation of fingerprints bit-vector strings which are same across different platforms.
The random number generator implemented in MayaChemTools is a variant of linear congruential generator (LCG) as described by Miller et al. [ Ref 120 ]. It is also referred to as Lehmer random number generator or Park-Miller random number generator.
Unlike Perl's core random number generator function rand, the random number generator implemented in MayaChemTools, MathUtil::random, generates consistent random values across different platforms for a specific random seed and leads to generation of portable fingerprints bit-vector strings.
Format of fingerprints vector string data in output SD, FP or CSV/TSV text file(s) specified by --output used during <ExtendedConnectivityCount> value of -m, --mode option. Possible values: ValuesString, IDsAndValuesString | IDsAndValuesPairsString | ValuesAndIDsString | ValuesAndIDsPairsString.
Default value during <ExtendedConnectivityCount> value of -m, --mode option: IDsAndValuesString.
Default value during <ExtendedConnectivity> value of -m, --mode option: ValuesString.
Examples:
Location of working directory. Default: current directory.
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity count fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity bits fingerprints as hexadecimal bit-string corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity bits fingerprints as binary bit-string corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create SampleECAIFP.sdf, SampleECAIFP.fpf and SampleECAIFP.csv files containing sequential compound IDs in CSV file along with fingerprints vector strings data, type:
To generate extended connectivity count fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create SampleECAIFP.sdf, SampleECAIFP.fpf and SampleECAIFP.csv files containing sequential compound IDs in CSV file along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using functional class atom types in vector string format and create a SampleECFCFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using DREIDING atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using E-state atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using MMFF94 atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using SLogP atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using SYBYL atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using TPSA atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using UFF atom types in vector string format and create a SampleECFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 3 using atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 3 using functional class atom types in vector string format and create a SampleECFCFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using only AS,X atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using only HBD,HBA functional class atom types in vector string format and create a SampleECFCFP.csv file containing sequential compound IDs along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.csv file containing compound ID from molecule name line along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using functional class atom types in vector string format and create a SampleECFCFP.csv file containing compound IDs using specified data field along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.tsv file containing compound ID using combination of molecule name line and an explicit compound prefix along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using functional class atom types in vector string format and create a SampleECFCFP.csv file containing specific data fields columns along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using atomic invariants atom types in vector string format and create a SampleECAIFP.tsv file containing common data fields columns along with fingerprints vector strings data, type:
To generate extended connectivity fingerprints corresponding to neighborhood radius up to 2 using functional class atom types in vector string format and create SampleECFCFP.sdf, SampleECFCFP.fpf and SampleECFCFP.csv files containing all data fields columns in CSV file along with fingerprints vector strings data, type:
InfoFingerprintsFiles.pl, SimilarityMatricesFingerprints.pl, AtomNeighborhoodsFingerprints.pl, MACCSKeysFingerprints.pl, PathLengthFingerprints.pl, TopologicalAtomPairsFingerprints.pl, TopologicalAtomTorsionsFingerprints.pl, TopologicalPharmacophoreAtomPairsFingerprints.pl, TopologicalPharmacophoreAtomTripletsFingerprints.pl
Copyright (C) 2024 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.