/docker-osra

OSRA (Optical Structure Recognition Application) in Docker

Primary LanguageDockerfileMIT LicenseMIT

daverona/osra

pipeline status

This is a repository for Docker images of OSRA (Optical Structure Recognition Application).

Quick Start

To see the help:

docker container run --rm \
  daverona/osra

Usage

Assume you want to read /path/to/input/sample.png to produce an SMI file /path/to/output/sample.smi.

To achieve this:

docker container run \
  --rm \
  --volume /path/to/input:/input \
  --volume /path/to/output:/output \
  daverona/osra \
  osra \
    --write /output/sample.smi \
    /input/sample.png 

Assume you want to convert all compound pictures in /path/to/input/sample.pdf to SMILES strings in a single SMI file /path/to/output/sample.smi.

First convert PDF file sample.pdf to TIFF file sample.tiff:

docker container run \
  --rm \
  --volume /path/to/input:/input \
  --volume /path/to/output:/output \
  daverona/osra \
  gm convert \
    -density 300 \
    /input/sample.pdf \
    /output.sample.tiff

Then read sample.tiff with osra:

docker container run \
  --rm \
  --volume /path/to/input:/input \
  --volume /path/to/output:/output \
  daverona/osra \
    --page \
    --coordinates \
    --print \
    --output /output/sample. \
    --write /output/sample.smi \
    /input/sample.tiff

References