I got a blast xml file after a DNA sequence search. The XML file is not very readable. What is the way to make it more understandable? This blast contains about twenty matches. Here is the xml file
$\begingroup$ You can do this using the Bio Entrez parser in Biopython. Its quite easy to use, but its not clear whether your happy using Python. $\endgroup$– M__ ♦Jul 5, 2020 at 21:26
The most human-readable blast output formats are 0-4, e.g.
-outfmt 0 - which if I am not mistaken is the format used by web blast. However, these formats are a pain to automatically parse.
As Cowboy_Patrick pointed out, XML is more of a machine-readable format. The tabular output format (
-outfmt 6) is very commonly used, because it is easily parsed by unix command-line tools, and its structure also allows a somewhat easy human reading and understanding.
$\begingroup$ Many thanks, how to set the output format as -outfmt 6 in a line of python code as result = NCBIWWW.qblast('blastn','nt',ADN.format('fasta') ) ? $\endgroup$ Jul 7, 2020 at 11:41
$\begingroup$ @serpipanton I am unfamiliar with BioPython, but a cursory look at the documentation suggests -outfmt 6 is unavailable for NCBIWWW.qblast. However, there is a module NCBIXML, which will allow you to easily parse the xml output. $\endgroup$– h.monJul 7, 2020 at 14:46
Is this what you are looking for: https://codebeautify.org/xmlviewer ? XML is a format designed to be readable firstly by machines, not humans.
With xslt you can convert XML to various more readable formats see this blog for something that fits your XML: http://plindenbaum.blogspot.com/2008/05/ncbi-blast-xslt-xhtml-svg.html?m=1