Sign inSign up

ultimagenomics/trimmer

By ultimagenomics

•Updated 4 days ago

Image
0

10K+

ultimagenomics/trimmer repository overview

⁠Trimmer

Trimmer is a tool for parsing and processing reads in SAM format according to a description in JSON format. That description directs how to divide each read into different segments and what actions to perform on each segment, including pass-through, trimming, and barcode and adapter matching. Information about each segment can be written to configurable SAM tags.

⁠Get Trimmer Docker Image

⁠Get the Image

The docker image for trimmer can be downloaded with

$ docker pull ultimagenomics/trimmer

and given a shorter name with

$ docker tag ultimagenomics/trimmer trimmer

This shorter name is used in the following section.

⁠Run the Container

The trimmer executable is in the PATH of the docker image, so the simplest invocation of trimmer would be

$ docker run --rm trimmer trimmer --version
trimmer: 5.2.0 2f06933+ 2024-02-07 14:39:18+0000

The --rm argument causes the container to be removed after trimmer exits.

The complete README.md file can be found at README.md in the working directory of the container and can be viewed with a command-line markdown viewer such as mdless.

$ docker run --rm trimmer cat README.md | mdless

Refer to the README to create a json file with the trimming formats (for ex. look at the Example Formats section).

To use the formats file from outside the container, a volume containing the file must be mounted and the -i flag passed to the docker client.
This command mounts the local directory formats at /mnt/formats in the container.

$ docker run --rm -v ./formats:/mnt/formats -i trimmer trimmer --desc /mnt/formats/formats.json --format "no trimming" < input.sam > out.sam

To mount a data local directory and operate on input and output files located in it as the current user

$ docker run --rm -v ./formats:/mnt/formats -v ./data:/data --user $(id -u):$(id -g) trimmer trimmer --desc /mnt/formats/formats.json --format "no trimming" --input /data/input.sam --output /data/out.sam

To work inside the container with mounted directories

$ docker run -it --rm -v ./formats:/mnt/formats -v ./data:/data --user $(id -u):$(id -g) trimmer bash

# trimmer --version
trimmer: 5.2.0 2f06933+ 2024-02-07 14:39:18+0000

# trimmer --desc /trimmer/formats/formats.json --format "no trimming" --input /data/input.sam --output /data/out.sam

All of the examples in this document show running a trimmer executable directly from the command line and not using the docker image. The commands must be modified as described above to work with the docker image.

Tag summary

Content type

Image

Digest

sha256:dcebb9f38…

Size

99.7 MB

Last updated

4 days ago

docker pull ultimagenomics/trimmer:2.5