Skip to main content

Inputing a VCF file, it returns the genomic sequence at the specified length (31 by default).

Project description

vcf2seq

Aim

Similar to seqtailor [PMID:31045209] : reads a VCF file, outputs a genomic sequence (default length: 31)

Unlike seqtailor, all sequences will have the same length. Moreover, it is possible to have an absence character (by default the dot . ) for indels.

  • When a insertion is larger than --size parameter, only first --size nucleotides are outputed.
  • Sequence headers are formated as "_".

VCF format specifications: https://github.com/samtools/hts-specs/blob/master/VCFv4.4.pdf

Installation

pip install vcf2seq

usage

usage: vcf2seq.py [-h] -g genome [-s SIZE] [-t {alt,ref,both}] [-b BLANK] [-a ADD_COLUMNS [ADD_COLUMNS ...]] [-o OUTPUT] [-v] vcf


positional arguments:
  vcf                   vcf file (mandatory)

options:
  -h, --help            show this help message and exit
  -g, --genome genome   genome as fasta file (mandatory)
  -s, --size SIZE       size of the output sequence (default: 31)
  -t, --type {alt,ref,both}
                        alt, ref, or both output? (default: alt)
  -b, --blank BLANK     Nucleotide absence character, default is dot (.)
  -a, --add-columns ADD_COLUMNS [ADD_COLUMNS ...]
                        Add one or more columns to header (ex: '-a 3 AA' will 
                        add columns 3 and 27). The first column is '1' (or 'A')
  -d, --delimiter DELIMITER
                        with -a/--add-columns and a fasta format output, 
                        specifies a delimiter (default: '|')
  -o, --output OUTPUT   Output file (default: <input_file>-vcf2seq.fa/tsv)
  -f, --output-format {fa,tsv}
                        Output file format (default: fa)
  -v, --version         show program's version number and exit

Project details


Download files

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

Source Distribution

vcf2seq-0.9.7.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

vcf2seq-0.9.7-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file vcf2seq-0.9.7.tar.gz.

File metadata

  • Download URL: vcf2seq-0.9.7.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for vcf2seq-0.9.7.tar.gz
Algorithm Hash digest
SHA256 9e5d2a5290b02ebfe7cd669c8768febb3f0fae161629410a6d1f42b89c7a0463
MD5 d9940c82305e9d2fd80ca579fdd33a3c
BLAKE2b-256 d7dc3fd85fe6184efad841b36c105a9cd9d859d07f5dd09768f629a4b06d7990

See more details on using hashes here.

File details

Details for the file vcf2seq-0.9.7-py3-none-any.whl.

File metadata

  • Download URL: vcf2seq-0.9.7-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for vcf2seq-0.9.7-py3-none-any.whl
Algorithm Hash digest
SHA256 650fd1d36d112b9931f42a13d9c4ef709153c9eec2c34cea52cc9d3e27c800d4
MD5 415a65770d4575366cc842db21594f87
BLAKE2b-256 8a8caa19b9189e3aa9f1f7b72bd0c616a51eebf94fbfd838645c1d59317aff78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page