cthreepo
A python script to interconvert seq-ids in gff3, gtf, bed and other files.
Quick start for the impatient
- Install using conda
conda install -c bioconda cthreepo
- Execute as follows:
## convert seq-ids in <input.gff3> from refseq format (NC_000001.11)
## to UCSC format (chr1) using the Human GRCh38 mapping dictionary
cthreepo -i <input.gff3> -if rs -it uc -f gff3 -m h38 -o <output.gff3>
Introduction
NCBI RefSeq, UCSC and Ensembl use different identifiers for chromosomes in annotation and other files such as GFF3, GTF, etc. Users interested in using a mix of files downloaded from different sources and use them in a single pipeline may end up with seq-id mismatch related errors. This script converts seq-ids from one style to the other in order to make the files compatible with each other.
Installation and Usage
Python3 is required for this script to work. With that requirement satisfied, you can install as shown below:
Install using conda
conda install -c bioconda cthreepo
Install using pip
pip install cthreepo
Install from this repository
First, download/clone the repository. Then run:
python3 setup.py install
Usage
## help
cthreepo --help
## usage
## convert seq-ids in <input.gff3> from refseq format (NC_000001.11)
## to UCSC format (chr1) using the Human GRCh38 mapping dictionary
cthreepo \
--infile <input.gff3> \
--id_from rs \
--id_to uc \
--format gff3 \
--mapfile h38 \
--outfile <output.gff3>
File formats supported
- GFF3 (default)
- GTF
- BedGraph
- BED
- SAM
- VCF
- WIG
- TSV
Mapping files
cthreepo needs a mapfile that it uses to figure out how seq-ids map from one style to the other.
- Use the built-in shortcuts --
h38,h37,m38andm37for GRCh38/hg38, GRCh37/hg19, MGSCv37/mm9 and GRCm38/mm10 respectively. I try to keep these files up-to-date but if they don't work as expected, I suggest using the latest file by following one of the two options described below. - Provide NCBI assembly accession using the
-aparameter. A complete, legal accession.version such as GCF_000001405.39 should be provided. - Provide an NCBI assembly report file. For a given assembly it can be downloaded from the NCBI Assembly website. If the 'Download' button is used, this file is called 'Assembly structure report'. On the NCBI Genomes FTP site, these files have the suffix
assembly_report.txt.
Metadata
Release files for cthreepo 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cthreepo-0.1.3.tar.gz | 36.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cthreepo-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.7 kB
Release files / cthreepo-0.1.3.tar.gz
| Download URL | cthreepo-0.1.3.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43f20134517455948170bbc3de4a1b72cdc2d3c4a60555f62143679a06ef0cfa
|
|
BLAKE2b-256 checksum How to use checksums |
6cb880a03eb5d9ae0e43313ad9689f2f017f76c17fdf333aa0810ece62771b64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / cthreepo-0.1.3-py3-none-any.whl
| Download URL | cthreepo-0.1.3-py3-none-any.whl |
|---|---|
| Size | 38.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2637608343aa052bb063b7c8931c62f01f24521d86b7b314ffdad18328579c63
|
|
BLAKE2b-256 checksum How to use checksums |
4deeb05eab7d84ba45a51cc94fee1377b3511939db70cf8c822bdcaad0b735b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for cthreepo 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.