Skip to content

Commit

Permalink
v2.0.0b11
Browse files Browse the repository at this point in the history
fix primers with no amplicons
  • Loading branch information
Zhu Tao committed Apr 12, 2020
1 parent 21d5ea4 commit 5cca4d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions primerserver2/core/analysis_blast.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def filter_Tm(amplicons, query_primer_seq, hits_seqs, Tm_diff=20, max_amplicons=
for primer_id in amplicons.keys():
amplicons_filter[primer_id] = {}
for primer_rank in amplicons[primer_id]:
if primer_rank not in amplicons_filter[primer_id]:
amplicons_filter[primer_id][primer_rank] = []
for amplicon in amplicons[primer_id][primer_rank]:
# hit seqs (template)
region_plus = amplicon['plus']['sseqid']+':'+str(amplicon['plus']['sstart'])+'-'+str(amplicon['plus']['send'])
Expand Down Expand Up @@ -172,13 +174,10 @@ def filter_Tm(amplicons, query_primer_seq, hits_seqs, Tm_diff=20, max_amplicons=
+'-'+str(amplicon['minus']['send'])
amplicon['product_size'] = amplicon['minus']['send']-amplicon['plus']['sstart']+1
amplicon['product_seq'] = ''
if primer_rank not in amplicons_filter[primer_id]:
amplicons_filter[primer_id][primer_rank] = []
amplicons_filter[primer_id][primer_rank].append(amplicon)

if len(amplicons_filter[primer_id][primer_rank])==max_amplicons:
break

return amplicons_filter

def add_amplicon_seq(amplicons, template_file):
Expand Down
2 changes: 1 addition & 1 deletion primerserver2/core/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get():
return '2.0.0b10'
return '2.0.0b11'
2 changes: 1 addition & 1 deletion primerserver2/web/static/js/generate_html_result.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function generate_html_result(selected_dbs, db_name_change, data, visualize_mode
// $('#primers-result-template-primer .amplicons_table').addClass('hidden');
continue;
}
db_desc = db_name_change[db]
db_desc = db in db_name_change ? db_name_change[db] : db
if (db_rank==0) {
$('#primers-result-template-primer .database-list').append('<th>Database: '
+db_desc+' <span class="glyphicon glyphicon-star"></span></th>')
Expand Down

0 comments on commit 5cca4d8

Please sign in to comment.