diff --git a/README.md b/README.md index 0bff4aedd6e72b195ccdead7f1fac9ae0b2fc9a7..4e1dd31a57715845612390b45bdff7b73bedf7f0 100644 --- a/README.md +++ b/README.md @@ -73,11 +73,83 @@ Replace `<YOUR USER ID>` with your own ID, e.g. after checking it with the `id` ## Run the translation app -<!-- -- Docker command -- volumes -- output (cif files and score files) - --> +If you just run the Docker container, it prints a little usage description: + +```terminal +$ docker run registry.scicore.unibas.ch/schwede/ma-wilkins-import/converter:latest + ModelCIF file formatting tool. +------------------------------------------ +Provided by SWISS-MODEL / Schwede group +(swissmodel.expasy.org / schwedelab.org) + +This container takes a directory of +ColabFold models and turns them into +ModelCIF files. + +usage: translate2modelcif [-h] [--rank RANK] [--out_dir <OUTPUT DIR>] + [--compress] + <MODEL DIR> + +Translate models from Tara/ Xabi from PDB + extra data into ModelCIF. + +positional arguments: + <MODEL DIR> Directory with model(s) to be translated. Must be of + form '<UniProtKB AC>-<UniProtKB AC>' + +optional arguments: + -h, --help show this help message and exit + --rank RANK Only process the model with this rank. + --out_dir <OUTPUT DIR> + Path to separate path to store results (<MODEL DIR> + used, if none given). + --compress Compress ModelCIF file with gzip (note that QA file is + zipped either way). +``` + +To actually run the conversion, we assume the ColabFold projects are separated into individual directories. Project directories have to look like this: + +```terminal +<UniProtKB AC>-<UniProtKB AC>/ +├── <UniProtKB AC>-<UniProtKB AC>_unrelaxed_rank_1_model_1.pdb +├── <UniProtKB AC>-<UniProtKB AC>_rank_1_model_1_scores.json +├── config.json +└── ... +``` + +There can be more models for the same combination of the two UniProtKB ACs in a directory, the above example just shows the minimum required files. + +Since the Docker container does not see the file system of the computer it is running on, the top level directory of the projects needs to be mounted when running. This happens with the `-v` option and gets absolute paths to the project directory and the mount point inside the Docker container, e.g. `-v /path/to/projects:/data` makes the directory `/path/to/projects` on your computer, available as `/data` to the Docker container. + +Running the converter app to write the ModelCIF file back into the project directory for model of rank 1 looks like this: + +```terminal +$ docker run -v /<PROJECTS PARENT DIR>:/data registry.scicore.unibas.ch/schwede/ma-wilkins-import/converter:latest translate2modelcif --rank 1 /data/<UniProtKB AC>-<UniProtKB AC> +Let's go to the CIF site of life! +Working on <UniProtKB AC>-<UniProtKB AC>... + translating <UniProtKB AC>-<UniProtKB AC>_unrelaxed_rank_1_model_1.pdb... + preparing data... (0.77s) + generating ModelCIF objects... (0.00s) + processing QA scores... (11.68s) + write to disk... (42.85s) + ... done with /data/<UniProtKB AC>-<UniProtKB AC>/<UniProtKB AC>-<UniProtKB AC>_unrelaxed_rank_1_model_1.pdb (55.61s). +... done with /data/<UniProtKB AC>-<UniProtKB AC>. +$ +``` + +After this, you see two new files in the project's directory, the ModelCIF file (ending with `.cif`) and an archive with the pairwise alignment errors (ending with `.zip`): + +```terminal +<UniProtKB AC>-<UniProtKB AC>/ +├── <UniProtKB AC>-<UniProtKB AC>_unrelaxed_rank_1_model_1.cif +├── <UniProtKB AC>-<UniProtKB AC>_unrelaxed_rank_1_model_1.pdb +├── <UniProtKB AC>-<UniProtKB AC>_rank_1_model_1_scores.json +├── <UniProtKB AC>-<UniProtKB AC>_unrelaxed_rank_1_model_1.zip +├── config.json +└── ... +``` + +If `--rank` is omitted, all models in the project's directory are converted. + ## Troubleshooting @@ -87,5 +159,7 @@ Replace `<YOUR USER ID>` with your own ID, e.g. after checking it with the `id` --> <!-- LocalWords: ColabFold OpenStructure TOC schwede ccf cbfcc sha ceadc aaf - LocalWords: ae ddfc wilkins cd BUILDKIT arg DEV uid + LocalWords: ae ddfc wilkins cd BUILDKIT arg DEV uid schwedelab modelcif +<!-- LocalWords: dir Xabi gzip unrelaxed pdb json config ACs CIF cif + --> -->