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.
Release files for biopython.convert 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| biopython.convert-1.0.2.tar.gz | 3.7 MB | Details |
Release files / biopython.convert-1.0.2.tar.gz
| Download URL | biopython.convert-1.0.2.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a0ae982592775728ac720314ba5f848689b0111c362082ac7dc019980a4b4ec
|
|
BLAKE2b-256 checksum How to use checksums |
94078ac66ee2c9bf6b54bb5db31ba92f07dd67869a3ebb5f23fc10e506c5f6d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|