def blast_records_to_object(blast_records):
<EOL>blast_objects_list = []<EOL>for blast_record in blast_records:<EOL><INDENT>br = BlastRecord(**{'<STR_LIT>': blast_record.query,<EOL>'<STR_LIT:version>': blast_record.version,<EOL>'<STR_LIT>': blast_record.expect,<EOL>'<STR_LIT>': blast_record.application,<EOL>'<STR_LIT>': blast_record.reference})<EOL>for alignment in blast_record.alignments:<EOL><INDENT>al = Alignment(**{<EOL>'<STR_LIT>': alignment.hit_def,<EOL>'<STR_LIT:title>': alignment.title,<EOL>'<STR_LIT>': alignment.length,<EOL>})<EOL>for hsp in alignment.hsps:<EOL><INDENT>h = Hsp(**{<EOL>'<STR_LIT>': hsp.align_length,<EOL>'<STR_LIT>': hsp.bits,<EOL>'<STR_LIT>': hsp.expect,<EOL>'<STR_LIT>': hsp.frame,<EOL>'<STR_LIT>': hsp.gaps,<EOL>'<STR_LIT>': hsp.identities,<EOL>'<STR_LIT>': hsp.match,<EOL>'<STR_LIT>': hsp.num_alignments,<EOL>'<STR_LIT>': hsp.positives,<EOL>'<STR_LIT>': hsp.query,<EOL>'<STR_LIT>': hsp.query_end,<EOL>'<STR_LIT>': hsp.query_start,<EOL>'<STR_LIT>': hsp.sbjct,<EOL>'<STR_LIT>': hsp.sbjct_end,<EOL>'<STR_LIT>': hsp.sbjct_start,<EOL>'<STR_LIT>': hsp.score,<EOL>'<STR_LIT>': hsp.strand,<EOL>'<STR_LIT:str>': str(hsp),<EOL>})<EOL>al.hsp_list.append(h)<EOL><DEDENT>br.alignments.append(al)<EOL><DEDENT>blast_objects_list.append(br)<EOL><DEDENT>return blast_objects_list<EOL>
Transforms biopython's blast record into blast object defined in django-blastplus app.