Skip to main content

Merge multiple GenBank records using a defined spacer sequence

A small script to turn a multiple GenBank records (either in multiple files or a single multi-record file) into a single record.

Sequences are merged by concatenating them in order, and putting a spacer sequence between them. Spacer sequence length can be given in kbp. It is possible to pick an all-N spacer, or using a spacer consisting of all-frame stop codons.

Installation

pip install merge-gbk-records

Alternatively, clone this repository from GitHub, then run (in a python virtual environment)

pip install .

If this fails on older versions of Python, try updating your pip tool first:

pip install --upgrade pip

and then rerun the merge-gbk-records install.

merge-gbk-records is only developed and tested on Python releases still under active support by the Python project. At the moment, this means versions 2.7, 3.3, 3.4, 3.5 and 3.6. Specifically, no attempt at testing under Python versions older than 2.7 or 3.3 is being made.

If your system is stuck on an older version of Python, consider using a tool like Homebrew or Linuxbrew to obtain a more up-to-date version.

Usage

By default, merge-gbk-records will add a 20 kbp spacer of all Ns and output the merged record on the terminal.

merge-gbk-records first.gbk second.gbk > merged.gbk

You can set different lengths using -l or --length. To use a 5 kbp spacer, use:

merge-gbk-records --length 5 first.gbk second.gbk > merged.gbk

You can select an all-frame stop codon spacer instead using -s stop or --spacer stop:

merge-gbk-records --spacer stop first.gbk second.gbk > merged.gbk

Instead of writing to stdout, you can also write to a file using -o or --outfile:

merge-gbk-records --outfile merged.gbk first.gbk second.gbk

To print help about the command, just run it with -h or --help:

merge-gbk-records --help

License

All code is available under the Apache License version 2, see the LICENSE file for details.

Metadata

Release files for merge-gbk-records 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for merge-gbk-records 0.2.0
File Size Uploaded
merge-gbk-records-0.2.0.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for merge-gbk-records 0.2.0
File Interpreter ABI Platform
merge_gbk_records-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / merge-gbk-records-0.2.0.tar.gz

Download URL merge-gbk-records-0.2.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e204552a87787e1fbe3eba629c0e05dbe0cd6bddc81c256cc813066d67b8be4
BLAKE2b-256 checksum
How to use checksums
384a2c7b21e37ebf2811403e895671a69af179eafdb31d302ddc705b8941c0a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / merge_gbk_records-0.2.0-py3-none-any.whl

Download URL merge_gbk_records-0.2.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c257e1f4613a4bc37adb3528bf816300e6b7d8db7bf020e3cb2539d3d4adb34d
BLAKE2b-256 checksum
How to use checksums
cfbfd16fc36cb01e0e29fb5af39cae233b8cde2f54fc6a495217256bccb29951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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