update July 26, 2020
NAME

blblastout.py - Convert BLAST ASN.1 output into other formats, and open those  files using the appropriate application, or write output to a file.

SYNOPSIS
  blblastout.py --archive infile [--delete] --outfmt format --destination dest [--outfile outfile]
  blblastout.py --rid infile [--delete] --outfmt format --destination dest [--outfile outfile]


DESCRIPTION
blblastout.py is a helper application for BioLegato. When BLAST searches are run from bldna or blprotein, output is originally sent to an ASN.1 file. BioLegato calls blbblastout.py to either launch a viewer or save the output to a file. In order to do this, blblastout.py calls blast_formatter to convert the ASN.1 file into the appropriate format. blblastout.py then opens the application specified by --destination to view the output, or saves the output to outfile.

When running BLAST at NCBI using the -remote option, open the output using blastout.py --rid infile. When running BLAST on locally-installed databases, call blastout.py --archive infile.

OPTIONS
infile is output from a BLAST search, in ASN.1 format (eg. blastn -outfmt 11)
--archive infile - Use this option if infile was generated by a BLAST search of a local database

--rid infile - If the BLAST search was done at NCBI using the blast -remote option, read the RID number from infile. This will be used by blast_formatter when converting to the format specified by --outfmt.

      Note:  --archive and --rid are mutually exclusive

--delete - Delete infile when finished. This is mainly intended for running  from BioLegato, where infile is  temporary file.
      
--outfmt format - format is any output format supported by blast_formatter. It must be specified on the blblastout.py command line as a comma-separated list.
Examples
To generate tabular output: --outfmt 7,sacc,slen,evalue
To generate XML output: --outfmt 5

--destination dest - dest is one of the following:
For BLAST viewable Report:
textedit - open output files in text editor specified by the $BL_TextEditor environment variable browser - open in web browser specified by $BL_Browser
textfile - write text output to a text file, using the basename specified by destination.
htmlfile - write to an HTML file
For BLAST tsv Report:
blnfetch - Open in blnfetch, BioLegato interface for retrieving DNA/RNA entries using ACCESSION numbers
blpfetch - Open in blpfetch, BioLegato interface for retrieving protein entries using ACCESSION numbers
tsvfile - write to a tsvfile.
For XML output:
xmlfile - write to an xmlfile.
blastviewer - open XML output in blastviewer

--outfile outfile - base filename for saving an output file. Do NOT include a file extension. blblastout.py will automatically add a file extension based on --destination. For example, if destination was a textfile, a ".txt" file extension would be added.

EXAMPLES

1. To write BLAST output to a text file:

blblastout.py --archive mousecat.blastn.asn1 --outfmt 0 --destination textfile --outfile mousecat.blastn.txt


2. To view BLAST output in a web browser:

blblastout.py --archive mousecat.blastn.asn1 --outfmt 0 --destination browser


3. To view BLAST output in blnfetch:

blblastout.py --archive mousecat.blastn.asn1 --outfmt 7,sacc,slen,evalue --destination blnfetch

4. Given an ASN.1 file produced by blastn -outfmt 11, convert the output to XML and open the XML output in blastviewer.

blblastout.py --archive mousecat.blastn.asn1 --outfmt 5 --destination blastviewer


ENVIRONMENT
BL_TextEdit (required) -  text editor to launch for viewing text output.

BL_Browser (required) -  web browser to launch for viewing HTML output.

REFERENCES

AUTHOR
Dr. Brian Fristensky
Department of Plant Science
University of Manitoba
Winnipeg, MB  Canada R3T 2N2
frist@cc.umanitoba.ca
http://home.cc.umanitoba.ca/~frist