bio table: convert to table

Converts input to tabular formats. Suppose you get the following data:

bio fetch NC_045512 MN996532 > genomes.gb

To turn the GenBank into a table run:

cat genomes.gb | bio table | head

by default it prints the id, size associated with each sequence:

MN996532.2   29855
NC_045512.2  29903

a number of additional fields may be specified, for example:

cat genomes.gb | bio table --fields id,type,size,gene | head

connects protein ids to genes:

MN996532.2   source  29855
NC_045512.2  source  29903

Additional fields

For a simple enumeration of of the sequence ids and their sizes:

cat genomes.gb | bio table --fields id,size

or to extract additional metadata:

cat genomes.gb | bio table --type CDS --fields id,gene,isolate,country,date | head

prints:

QHR63299.2  orf1ab  RaTG13  China  24-Jul-2013
QHR63300.2  S       RaTG13  China  24-Jul-2013
QHR63301.1  NS3     RaTG13  China  24-Jul-2013
QHR63302.1  E       RaTG13  China  24-Jul-2013
QHR63303.1  M       RaTG13  China  24-Jul-2013