A script to convert a sequence file to another format.
perl seq_format-converter.pl -i seq_file.gbk -f gbk -o embl
This script converts a (multi-)sequence file of a specific format to a differently formatted output file. The most common sequence formats are: embl, fasta, and gbk (genbank).
Since sequence formats change from time to time, BioPerl is not always up to date. For all available BioPerl sequence formats see: http://www.bioperl.org/wiki/HOWTO:SeqIO#Formats. Warning: The bioperl-ext package and the io_lib library from the Staden package (http://staden.sourceforge.net/) need to be installed in order to read the scf, abi, alf, pln, exp, ctf, ztr formats.
perl seq_format-converter.pl -i seq_file -f in_format -o out_format
for i in *.[embl|gbk]; do perl seq_format-converter.pl -i $i -f [embl|gbk] -o [embl|fasta|gbk]; done
- -i, -input
Input sequence file
- -f, -format
Input sequence format (e.g. 'embl' or 'gbk)
- -o, -out_format
Output sequence format (e.g. 'embl', 'fasta' or 'gbk)
- -h, -help
Print usage
- -v, -version
Print version number
- seq_file.[embl|fasta|gbk]
Output sequence file in the specified format
The Perl script runs under Windows and UNIX flavors.
- BioPerl (tested with version 1.006901)
Andreas Leimbach (aleimba[at]gmx[dot]de; Microbial Genome Plasticity, Institute of Hygiene, University of Muenster)
- v0.2 (03.02.2014)
- allow short 'gbk' format instead of 'genbank'
- also short 'gbk' file-extension for output file
- included 'use autodie'
- usage as HERE document
- options with Getopt::Long
- version switch
- v0.1 (10.11.2011)