Skip to main content

Interconvert various file formats supported by biopython. Supports querying records with JMESPath.

Project description

https://zenodo.org/badge/195302632.svg

BioPython-Convert

Interconvert various file formats supported by BioPython.

Supports querying records with JMESPath.

Installation

pip install biopython-convert

or:

conda install biopython-convert

or:

git clone https://github.com/brinkmanlab/BioPython-Convert.git
cd BioPython-Convert
./setup.py install

Use

biopython.convert [-s] [-v] [-i] [-q JMESPath] input_file input_type output_file output_type
    -s Split records into seperate files
    -q JMESPath to select records. Must return list of SeqIO records or mappings. Root is list of input SeqIO records.
    -i Print out details of records during conversion
    -v Print version and exit
Supported formats

abi, abi-trim, ace, cif-atom, cif-seqres, clustal, embl, fasta, fasta-2line, fastq-sanger, fastq, fastq-solexa, fastq-illumina, genbank, gb, ig, imgt, nexus, pdb-seqres, pdb-atom, phd, phylip, pir, seqxml, sff, sff-trim, stockholm, swiss, tab, qual, uniprot-xml, gff3

JMESPath

The root node for a query is a list of SeqRecord objects. The query can return a list with a subset of these or a mapping, keying to the constructor parameters of a SeqRecord object.

Examples:

Append a new record:

[@, [{`seq`: `AAAA`, `name`: `my_new_record`}]] | []

Filter out any plasmids:

[?!(features[?type==`source`].qualifiers.plasmid)]

Keep only the first record:

[0]

See CONTRIBUTING.rst for information on contributing to this repo.

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

biopython.convert-1.0.4.tar.gz (3.7 MB view details)

Uploaded Source

File details

Details for the file biopython.convert-1.0.4.tar.gz.

File metadata

  • Download URL: biopython.convert-1.0.4.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for biopython.convert-1.0.4.tar.gz
Algorithm Hash digest
SHA256 cfa0a3302865eec5332df98868b606087d6c7112c8d4640549b94d061b4c7dc0
MD5 694b739e7da239c51e2503a792618a68
BLAKE2b-256 dea4d5f24d9bb345a2761395f48c0d2e7e0f50ea2fbfe2e52df3ee9145f777ff

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