Command line interface¶
usage: kripodb [-h] [--version]
{fingerprints,fragments,similarities,dive,serve,pharmacophores}
...
Positional Arguments¶
subcommand | Possible choices: fingerprints, fragments, similarities, dive, serve, pharmacophores |
Named Arguments¶
--version | show program’s version number and exit |
Sub-commands:¶
fingerprints¶
Fingerprints
kripodb fingerprints [-h]
{import,export,meanbitdensity,similar,similarities,merge}
...
Sub-commands:¶
import¶
Add Makebits file to fingerprints db
kripodb fingerprints import [-h] infile [infile ...] outfile
Positional Arguments¶
infile | Name of makebits formatted fingerprint file (.tar.gz or not packed or - for stdin) |
outfile | Name of fingerprints db file Default: “fingerprints.db” |
export¶
Dump bitsets in fingerprints db to makebits file
kripodb fingerprints export [-h] infile outfile
Positional Arguments¶
infile | Name of fingerprints db file Default: “fingerprints.db” |
outfile | Name of makebits formatted fingerprint file (or - for stdout) |
meanbitdensity¶
Compute mean bit density of fingerprints
kripodb fingerprints meanbitdensity [-h] [--out OUT] fingerprintsdb
Positional Arguments¶
fingerprintsdb | Name of fingerprints db file (default: “fingerprints.db”) Default: “fingerprints.db” |
Named Arguments¶
--out | Output file, default is stdout (default: -) Default: - |
similar¶
Find the fragments closests to query based on fingerprints
kripodb fingerprints similar [-h] [--mean_onbit_density MEAN_ONBIT_DENSITY]
[--cutoff CUTOFF] [--memory]
fingerprintsdb query out
Positional Arguments¶
fingerprintsdb | Name of fingerprints db file Default: “fingerprints.db” |
query | Query identifier or beginning of it |
out | Output file tabdelimited (query, hit, score) |
Named Arguments¶
--mean_onbit_density | |
Mean on bit density (default: 0.01) Default: 0.01 | |
--cutoff | Set Tanimoto cutoff (default: 0.55) Default: 0.55 |
--memory | Store bitsets in memory (default: False) Default: False |
similarities¶
Output formats: * tsv, tab separated id1,id2, similarity * hdf5, hdf5 file constructed with pytables with a, b and score, but but a and b have been replaced
by numbers and similarity has been converted to scaled intWhen input has been split into chunks, use –ignore_upper_triangle flag for computing similarities between same chunk. This prevents storing pair a->b also as b->a.
kripodb fingerprints similarities [-h] [--out_format {tsv,hdf5}]
[--fragmentsdbfn FRAGMENTSDBFN]
[--mean_onbit_density MEAN_ONBIT_DENSITY]
[--cutoff CUTOFF] [--nomemory]
[--ignore_upper_triangle]
fingerprintsfn1 fingerprintsfn2 out_file
Positional Arguments¶
fingerprintsfn1 | |
Name of reference fingerprints db file | |
fingerprintsfn2 | |
Name of query fingerprints db file | |
out_file | Name of output file (use - for stdout) |
Named Arguments¶
--out_format | Possible choices: tsv, hdf5 Format of output (default: “hdf5”) Default: “hdf5” |
--fragmentsdbfn | |
Name of fragments db file (only required for hdf5 format) | |
--mean_onbit_density | |
Mean on bit density (default: 0.01) Default: 0.01 | |
--cutoff | Set Tanimoto cutoff (default: 0.45) Default: 0.45 |
--nomemory | Do not store query fingerprints in memory (default: False) Default: False |
--ignore_upper_triangle | |
Ignore upper triangle (default: False) Default: False |
fragments¶
Fragments
kripodb fragments [-h] {shelve,sdf,pdb,filter,merge,export_sd} ...
Sub-commands:¶
shelve¶
Add fragments from shelve to sqlite
kripodb fragments shelve [-h] [--skipdups] shelvefn fragmentsdb
Positional Arguments¶
shelvefn | |
fragmentsdb | Name of fragments db file (default: “fragments.db”) Default: “fragments.db” |
Named Arguments¶
--skipdups | Skip duplicates, instead of dieing one first duplicate Default: False |
sdf¶
Add fragments sdf to sqlite
kripodb fragments sdf [-h] sdffns [sdffns ...] fragmentsdb
Positional Arguments¶
sdffns | SDF filename |
fragmentsdb | Name of fragments db file (default: “fragments.db”) Default: “fragments.db” |
pdb¶
Add pdb metadata from RCSB PDB website to fragment sqlite db
kripodb fragments pdb [-h] fragmentsdb
Positional Arguments¶
fragmentsdb | Name of fragments db file (default: “fragments.db”) Default: “fragments.db” |
filter¶
Filter fragments database
kripodb fragments filter [-h] [--pdbs PDBS] [--matrix MATRIX] input output
Positional Arguments¶
input | Name of fragments db input file |
output | Name of fragments db output file, will overwrite file if it exists |
Named Arguments¶
--pdbs | Keep fragments from any of the supplied pdb codes, one pdb code per line, use - for stdin |
--matrix | Keep fragments which are in similarity matrix file |
similarities¶
Similarity matrix
kripodb similarities [-h]
{similar,merge,export,import,filter,freeze,thaw,fpneigh2tsv,histogram}
...
Sub-commands:¶
similar¶
Find the fragments closets to query based on similarity matrix
kripodb similarities similar [-h] [--out OUT] [--cutoff CUTOFF]
pairsdbfn query
Positional Arguments¶
pairsdbfn | hdf5 similarity matrix file or base url of kripodb webservice |
query | Query fragment identifier |
Named Arguments¶
--out | Output file tab delimited (query, hit, similarity score) Default: - |
--cutoff | Similarity cutoff (default: 0.55) Default: 0.55 |
merge¶
Combine pairs files into a new file
kripodb similarities merge [-h] ins [ins ...] out
Positional Arguments¶
ins | Input pair file in hdf5_compact format |
out | Output pair file in hdf5_compact format |
export¶
Export similarity matrix to tab delimited file
kripodb similarities export [-h] [--no_header] [--frag1] [--pdb PDB]
simmatrixfn outputfile
Positional Arguments¶
simmatrixfn | Compact hdf5 similarity matrix filename |
outputfile | Tab delimited output file, use - for stdout |
import¶
- When input has been split into chunks,
- use –ignore_upper_triangle flag for similarities between same chunk. This prevents storing pair a->b also as b->a.
kripodb similarities import [-h] [--inputformat {tsv,fpneigh}]
[--nrrows NRROWS] [--ignore_upper_triangle]
inputfile fragmentsdb simmatrixfn
Positional Arguments¶
inputfile | Input file, use - for stdin |
fragmentsdb | Name of fragments db file (default: “fragments.db”) Default: “fragments.db” |
simmatrixfn | Compact hdf5 similarity matrix file, will overwrite file if it exists |
Named Arguments¶
--inputformat | Possible choices: tsv, fpneigh tab delimited (tsv) or fpneigh formatted input (default: “fpneigh”) Default: “fpneigh” |
--nrrows | Number of rows in inputfile (default: 65536) Default: 65536 |
--ignore_upper_triangle | |
Ignore upper triangle (default: False) Default: False |
filter¶
Filter similarity matrix
kripodb similarities filter [-h] [--fragmentsdb FRAGMENTSDB | --skip SKIP]
input output
Positional Arguments¶
input | Input hdf5 similarity matrix file |
output | Output hdf5 similarity matrix file, will overwrite file if it exists |
Named Arguments¶
--fragmentsdb | Name of fragments db file, fragments in it will be kept as well as their pair counter parts. |
--skip | File with fragment identifiers on each line to skip |
freeze¶
Optimize similarity matrix for reading
kripodb similarities freeze [-h] [-f FRAME_SIZE] [-m MEMORY] [-l LIMIT] [-s]
in_fn out_fn
Positional Arguments¶
in_fn | Input pairs file |
out_fn | Output array file, file is overwritten |
Named Arguments¶
-f, --frame_size | |
Size of frame (default: 100000000) Default: 100000000 | |
-m, --memory | Memory cache in Gigabytes (default: 1) Default: 1 |
-l, --limit | Number of pairs to copy, None for no limit (default: None) |
-s, --single_sided | |
Store half matrix (default: False) Default: False |
thaw¶
Optimize similarity matrix for writing
kripodb similarities thaw [-h] [--nonzero_fraction NONZERO_FRACTION]
in_fn out_fn
Positional Arguments¶
in_fn | Input packed frozen matrix file |
out_fn | Output pairs file, file is overwritten |
Named Arguments¶
--nonzero_fraction | |
Fraction of pairs which have score above threshold (default: 0.012) Default: 0.012 |
fpneigh2tsv¶
Convert fpneigh formatted file to tab delimited file
kripodb similarities fpneigh2tsv [-h] inputfile outputfile
Positional Arguments¶
inputfile | Input file, use - for stdin |
outputfile | Tab delimited output file, use - for stdout |
histogram¶
Distribution of similarity scores
kripodb similarities histogram [-h] [-f FRAME_SIZE] [-r] [-l]
inputfile outputfile
Positional Arguments¶
inputfile | Filename of similarity matrix hdf5 file |
outputfile | Tab delimited output file, use - for stdout |
Named Arguments¶
-f, --frame_size | |
Size of frame (default: 100000000) Default: 100000000 | |
-r, --raw_score | |
Return raw score (16 bit integer) instead of fraction score Default: False | |
-l, --lower_triangle | |
Return scores from lower triangle else return scores from upper triangle Default: False |
dive¶
DiVE visualization utils
kripodb dive [-h] {fragments,dump,export} ...
Sub-commands:¶
fragments¶
Export fragments as DiVE formatted sphere
kripodb dive fragments [-h] [--onlyfrag1] inputfile outputfile
Positional Arguments¶
inputfile | Name of fragments db input file |
outputfile | Name of fragments dive output file, use - for stdout |
dump¶
Dump dense matrix with zeros
kripodb dive dump [-h] [--frag1only] inputfile outputfile
Positional Arguments¶
inputfile | Name of dense similarity matrix |
outputfile | Name of output file, use - for stdout |
export¶
Writes props for DiVE visualization
kripodb dive export [-h] [--propnames PROPNAMES] [--props PROPS]
[--pdbtags PDBTAGS]
fragmentsdb uniprot_annot
Positional Arguments¶
fragmentsdb | Name of fragments db input file |
uniprot_annot |
|
Named Arguments¶
--propnames | Name of prop names file Default: kripo.propnames.txt |
--props | Name of props file Default: kripo.props.txt |
--pdbtags | Tag pdb in file by filename |
serve¶
Serve similarity matrix, fragments db and pharmacophores db as webservice
kripodb serve [-h] [--internal_port INTERNAL_PORT]
[--external_url EXTERNAL_URL]
similarities fragments pharmacophores
Positional Arguments¶
similarities | Filename of similarity matrix hdf5 file |
fragments | Filename of fragments sqlite database file |
pharmacophores | Filename of pharmacophores hdf5 file |
Named Arguments¶
--internal_port | |
TCP port on which to listen (default: 8084) Default: 8084 | |
--external_url | URL which should be used in Swagger spec (default: “http://localhost:8084/kripo”) Default: “http://localhost:8084/kripo” |
pharmacophores¶
Pharmacophores
kripodb pharmacophores [-h] {add,get,filter,merge,import,sd2phar} ...
Sub-commands:¶
add¶
Add pharmacophores from directory to database
kripodb pharmacophores add [-h] [--nrrows NRROWS] startdir pharmacophoresdb
Positional Arguments¶
startdir | Directory to start finding *.pphores.sd.gz and *.pphores.txt files in |
pharmacophoresdb | |
Name of pharmacophore db file |
Named Arguments¶
--nrrows |
Default: 65536 |
get¶
Retrieve pharmacophore of a fragment
kripodb pharmacophores get [-h] [--query QUERY] [--output OUTPUT]
pharmacophoresdb
Positional Arguments¶
pharmacophoresdb | |
Name of pharmacophore db file |
Named Arguments¶
--query | Query fragment identifier |
--output | Phar formatted text file Default: - |
filter¶
Filter pharmacophores
kripodb pharmacophores filter [-h] [--fragmentsdb FRAGMENTSDB]
inputfn outputfn
Positional Arguments¶
inputfn | Name of input pharmacophore db file |
outputfn | Name of output pharmacophore db file |
Named Arguments¶
--fragmentsdb | Name of fragments db file, fragments present in db are passed (default: “fragments.db”) Default: “fragments.db” |
merge¶
Merge pharmacophore database files into new one
kripodb pharmacophores merge [-h] ins [ins ...] out
Positional Arguments¶
ins | Input pharmacophore database files |
out | Output pharmacophore database file |
import¶
Convert phar formatted file to pharmacophore database file
kripodb pharmacophores import [-h] [--nrrows NRROWS] infile outfile
Positional Arguments¶
infile | Input phar formatted file |
outfile | Output pharmacophore database file |
Named Arguments¶
--nrrows |
Default: 65536 |