Skip to main content

STRNaming

STRNaming is an algorithm for generating simple, informative names for Short Tandem Repeat (STR) sequences, such as those used in the field of forensic genetics, in a standardised and automated manner.

Requirements

STRNaming requires Python version 3.8 or later.

Installation

The recommended way to install STRNaming is by using the pip package installer. If you have pip installed, you can easily install STRNaming by running the following command:

pip install strnaming

Usage

This version of STRNaming comes with a command-line interface which allows generating allele names for sequence data with ranges specified in the BED file format. A user-friendly web version of STRNaming can be found at the website (https://fdstools.nl/strnaming). STRNaming can also be accessed using FDSTools through the fdstools seqconvert tool, which also allows to convert allele names back to sequences. Please refer to https://fdstools.nl for more information.

Command-line interface

The command-line help can be accessed by running strnaming --help. In short, an STRNaming command looks like this:

strnaming name-sequences --ranges ranges.bed inputfile.txt outputfile.txt

The reported sequence ranges must be provided as a tab-separated, BED4+ formatted file, specifying coordinates on the GRCh38 human genome reference. Note that BED files use zero-based coordinates with exclusive end positions.

The input file should have a marker name and a sequence on each line, separated by whitespace (i.e., tabs or spaces). Output is always tab-separated.

If no output file is given, the output is written to stdout, which normally shows up in your command line window. If no input file is given either, STRNaming will read input from stdin, allowing you to type the input one line at a time.

Programming interface

It is not recommended to import and use parts of this version of STRNaming directly from other Python code, because the internal API is not stable yet. Instead, use the subprocess module if you want to use STRNaming in your Python project at this time. As an added benefit, it will run in a concurrent process, meaning your code does not (necessarily) have to wait for STRNaming to finish.

To use STRNaming in other software projects, regardless of the programming language, it can be run as a separate subprocess. Write a marker name, a whitespace character, the DNA sequence, and a newline character (\n) to its standard input stream (stdin), and STRNaming will write the same marker name, a tab character, the allele name and a newline character to its standard output stream (stdout). Any errors are reported on the standard error stream (stderr) and will cause the STRNaming process to terminate. By specifying the --unbuffered command-line switch, STRNaming will immediately flush its output stream after every line of output.

A more capable command-line interface to better support programmatic access to STRNaming will be introduced in a future release.

Offline use

STRNaming will automatically download and cache portions of reference sequence from the Ensembl REST API (https://rest.ensembl.org). If you are running STRNaming on a system without internet access, and you need a piece of reference sequence that was not bundled with the STRNaming package, a message will be displayed to manually store the reference sequence in a specific location. To this end, run the following command (on a system with internet access) to download the sequence:

strnaming refseq-cache chr2:1489653..1489689

Upon success, the location of the downloaded cache files will be displayed. These are the files to be copied to the offline system for STRNaming to work.

Alternatively, you can configure STRNaming to use a local copy of the complete GRCh38 reference genome in fasta format using the following command:

strnaming refseq-cache --use-fasta /path/to/grch38.fasta

Please refer to the command-line --help option for more information.

Release Notes

Version 1.2.1 (10 August 2026)

  • Added DYS449, DYS518, DXS10148, DXS10101 and DXS10134 to hardcoded reference length adjustment table.
  • When STRNaming inserts bases from the GRCh38 reference sequence to complete the first and/or last repeat in an allele name, those bases can now be written in lowercase. This is enabled by default when using the name-sequences CLI.
  • The -r/--ranges argument on the name-sequences CLI now takes a BED file specifying the reported ranges. The built-in 'uas-frr' ranges are no longer relevant and have been removed.
  • STRNaming can now use a fasta file as source for the GRCh38 reference, which can be configured through the strnaming refseq-cache command or using the STRNAMING_FASTA_REFERENCE environment variable.

Version 1.2.0 (11 January 2024)

Naming of some loci has been updated as a result of bug fixes and improvements to the algorithm. Most notably, reference sequence analysis has been redesigned in such a way that it is no longer affected by the range of reference sequence analysed at once.

  • Updated CE allele numbering of D6S474 (-1 unit).
  • Maximum resource usage can now be controlled by setting environment variables STRNAMING_MAX_SECONDS (float, default 30.0), STRNAMING_MAX_SECONDS_REFSEQ (float, default 300.0) and STRNAMING_MAX_SCAFFOLDS (int, default 5000000).

Version 1.1.4 (7 February 2023)

  • Repeat stretches that fall completely in the prefix or suffix are now ignored.
  • Sequences that follow the same repeat pattern as the reference sequence are now named much more quickly while consistently using the same structure.
  • Added capability to load reference structures from many locations on one chromosome in a single pass.

Version 1.1.3 (18 August 2022)

  • Fixed an issue that caused STRNaming to sometimes favour a longer name with the same score.

Version 1.1.2 (10 May 2022)

  • Updated CE allele numbering of DYS612 (+6 units).
  • Added reference structure for SE33.
  • Updated hardcoded reference length adjustment table to suppress second structure 5' of DYS522.
  • Added double-click-to-toggle-text-alignment feature to HTML output.
  • Fixed mtDNA reference sequence download URL.

Version 1.1.1 (19 July 2021)

  • Fixed an issue with CE allele numbering that occurred for reporting ranges that started or ended halfway into a structure with a hardcoded reference length adjustment.
  • Updated table of hardcoded reference length adjustments to include more loci.

Version 1.1.0 (15 July 2021)

Naming of some loci has been updated as a result of bug fixes and improvements to the algorithm. Scoring criteria have been updated to minimize unintended side-effects of these changes.

  • Fixed a major issue with HPRTB allele numbering: previously, the CE allele number calculated for a given sequence was one higher than it should be.
  • Allele names are now permitted to contain repeats of a unit that exceeds the dominant unit length of a locus. This change greatly improves naming of some complex Y-STRs.
  • Short repeat stretches that only partially overlap with a significant repeat of a longer unit are no longer discarded. This change may introduce short repeats adjacent to longer repeats of a longer unit, which were previously 'missed' by STRNaming.
  • Fixed bug that disallowed making interruptions which could be filled exactly with an 'orphan' repeat, thereby forcing the use of a compatible 'anchor'.
  • Reference sequence analysis now guarantees that all repeat units in the final result are actually repeated.
  • Reference repeat units only found outside the reported range are now included in the list of preferred units when generating allele names. This change improves naming stability when a significant part of the reference STR structure lies outside the reported range.
  • STRNaming will no longer consider names that include an interruption of which the sequence is equal to an adjacent repeat unit (e.g., CCTA[2]CCTA[1]TCTA[2]).

New features:

  • The built-in reference sequence cache was introduced, along with the new mandatory ACTION command-line argument.
  • Colored output in HTML format is now available by using the --html command-line argument.
  • Reference sequence analysis results of almost the entire human genome have been embedded into the package.

Version 1.0.0 (21 December 2020)

Initial release of STRNaming.

Download files

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

Source Distribution

strnaming-1.2.1.tar.gz (10.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strnaming-1.2.1-py3-none-any.whl (10.3 MB view details)

Uploaded Python 3

File details

Details for the file strnaming-1.2.1.tar.gz.

File metadata

  • Download URL: strnaming-1.2.1.tar.gz
  • Upload date:
  • Size: 10.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for strnaming-1.2.1.tar.gz
Algorithm Hash digest
SHA256 1ce8eb301c6ccf0be794d3e1ebe7c4d8de185e8babd1b2b8e62884a146baabfd
MD5 5a56b044f07f7f3cf0ce24d499fbab4b
BLAKE2b-256 9f862ba52cfdde27165685253e0bb67549623b66a3ca1b097cf0cf513e6da610

See more details on using hashes here.

File details

Details for the file strnaming-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: strnaming-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for strnaming-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b031630bdc54fb6273d9a45808451600b504417d5c7e639c8142420ef7ab4744
MD5 9459296acf80067c05ac9ad360b035bb
BLAKE2b-256 2a0197c8daa30642e67686416ab4c0659f95c233cae9692f9d4e5ebc022ab322

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 files

1.2.0

2 files

1.1.4

2 files

1.1.3

1 file

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page