Mercurial > repos > yating-l > jbrowse_hub
diff blastxmlToGff3.py @ 31:d8049deb0c97 draft
planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit faeedda55e23f1197bc454d3db2d52af29d786e8-dirty
author | yating-l |
---|---|
date | Fri, 17 Mar 2017 12:28:32 -0400 |
parents | e4f3f2ed4fa5 |
children | 15b4a74722d1 |
line wrap: on
line diff
--- a/blastxmlToGff3.py Wed Mar 15 11:46:38 2017 -0400 +++ b/blastxmlToGff3.py Fri Mar 17 12:28:32 2017 -0400 @@ -7,14 +7,14 @@ def align2cigar(hsp_query, hsp_reference): - ''' + """ Build CIGAR representation from an hsp_query input: hsp_query hsp_sbjct output: CIGAR string - ''' + """ query = hsp_query ref = hsp_reference # preType, curType: @@ -98,6 +98,8 @@ attribute['ID'] = field['seqid'] + '_' + str(field['start']) + '_' + str(field['end']) + '_' + query_name + '_' + str(target_start) + '_' + str(target_end) attribute['Target'] = query_name + " " + str(target_start) + " " + str(target_end) attribute['Gap'] = align2cigar(query, ref) + #store the query sequence in the file in order to display alignment with BlastAlignment plugin + attribute['query'] = hsp.query # show reading frame attribute only if the frame is not (0, 0) if hsp.frame[0] != 0 or hsp.frame[1] != 0: attribute['reading_frame'] = str(hsp.frame[0]) + ", " + str(hsp.frame[1])