Skip to main content

Snakemake utils

Project description

A set of utility function for use in snakemake. Currently, for line-based transformations.


  • map_chars(cmap) - will translate characters using the given dictionary cmap.
  • del_char_idx(idx) - will delete the char at the given index.
  • del_char(char) - will delete all characters matching char param.
  • del_line(regex) - will delete line if it matches the given regex.
  • apply(trans, encoding, in_files, out_files) - will apply all transformations given in trans list to all lines in the in_files list producing output files from the out_files list.


rule fixchars:
        "Fixing/deleting chars/lines..."

        from snakemakeutils import del_char_val, del_char_idx, apply
        trans = [del_char_val('\x00'), del_char_idx(0)]
        apply(trans, "latin1", input, output)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for snakemakeutils, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size snakemakeutils-0.1.2.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page