all_ercc_counts ) + ", is not sufficient for a reliable correlation to be calculated." data_to_display = False elif (dr[8] < 3): msg_to_user = "******" + str( dr[8] ) + ", is not sufficient for a reliable correlation to be calculated." data_to_display = False if data_to_display: transcript_names_js, transcript_images_js, transcript_counts_js, transcript_sizes_js, series_params, ercc_points = chart_series_params( counts, transcript_sizes, transcript_names, mean_mapqs, ercc_conc) color_legend = generate_color_legend() # GDM: changed to pass filepath name for summary file SUMMARY_FILE = OUTPUT_DIR + PLUGIN_NAME + '_block.html' msg_to_user, rsquared = create_summary_block(SUMMARY_FILE, dr, MINIMUM_RSQUARED) template = open(SRC + '/ercc_template.html') page_we_are_making = Template(template.read()) if MINIMUM_COUNTS > 1: counts_msg = "All transcripts with fewer than " + str( MINIMUM_COUNTS ) + " counts are shown in the above figure (below the dotted line), but not used in calculating R-squared." else: counts_msg = "All transcripts, even those with only 1 count, were used in calculating R-squared." if BARCODE_ENTERED != 'none found' and BARCODE_ENTERED != '': barcode = '(' + BARCODE_ENTERED + ')' else: barcode = '' print page_we_are_making.substitute( dose_response_image=report_components['dose_response_image'], results_divs=report_components['results_divs'],
report_components = generate_reports(coverage, dr, counts) except ValueError: msg_to_user = "******" data_to_display = False if (all_ercc_counts < 250): msg_to_user = "******"+str(all_ercc_counts)+", is not sufficient for a reliable correlation to be calculated." data_to_display = False elif (dr[8]<3): msg_to_user = "******"+str(dr[8])+", is not sufficient for a reliable correlation to be calculated." data_to_display = False if data_to_display: transcript_names_js, transcript_images_js, transcript_counts_js, transcript_sizes_js, series_params, ercc_points = chart_series_params(counts,transcript_sizes,transcript_names, mean_mapqs,ercc_conc) color_legend = generate_color_legend() msg_to_user, rsquared = create_summary_block(OUTPUT_DIR,dr,MINIMUM_RSQUARED) template = open(SRC + '/ercc_template.html') page_we_are_making = Template(template.read()) print page_we_are_making.substitute(dose_response_image = report_components['dose_response_image'], results_divs = report_components['results_divs'], ercc_points = ercc_points, percent_total_counts_non_ercc = percent_total_counts_non_ercc, percent_total_counts_ercc = percent_total_counts_ercc, all_ercc_counts = all_ercc_counts, rsquared = rsquared, slope = '%.2f' % (dr[2]), yintercept = '%.2f' % (dr[3]), N = str(dr[8]), trendline_points = trendline_points, color_legend = color_legend, counts_file = COUNTS_URL,
data_to_display = False if data_to_display: if (all_ercc_counts < 250): msg_to_user = "******"+str(all_ercc_counts)+", is not sufficient for a reliable correlation to be calculated." data_to_display = False elif (dr[8]<3): msg_to_user = "******"+str(dr[8])+", is not sufficient for a reliable correlation to be calculated." data_to_display = False if data_to_display: transcript_names_js, transcript_images_js, transcript_counts_js, transcript_sizes_js, series_params, ercc_points = chart_series_params(counts,transcript_sizes,transcript_names, mean_mapqs,ercc_conc) color_legend = generate_color_legend() # GDM: changed to pass filepath name for summary file SUMMARY_FILE = OUTPUT_DIR+PLUGIN_NAME+'_block.html' msg_to_user, rsquared = create_summary_block(SUMMARY_FILE,dr,MINIMUM_RSQUARED) template = open(SRC + '/ercc_template.html') page_we_are_making = Template(template.read()) if MINIMUM_COUNTS > 1: counts_msg = "All transcripts with fewer than "+str(MINIMUM_COUNTS)+" counts are shown in the above figure (below the dotted line), but not used in calculating R-squared." else: counts_msg = "All transcripts, even those with only 1 count, were used in calculating R-squared." if BARCODE_ENTERED != 'none found' and BARCODE_ENTERED != '': barcode = '('+BARCODE_ENTERED+')' else: barcode = '' print page_we_are_making.substitute(dose_response_image = report_components['dose_response_image'], results_divs = report_components['results_divs'], ercc_points = ercc_points, percent_total_counts_non_ercc = percent_total_counts_non_ercc, percent_total_counts_ercc = percent_total_counts_ercc,
except ValueError: msg_to_user = "******" data_to_display = False if data_to_display: if (all_ercc_counts < 250): msg_to_user = "******"+str(all_ercc_counts)+", is not sufficient for a reliable correlation to be calculated." data_to_display = False elif (dr[8]<3): msg_to_user = "******"+str(dr[8])+", is not sufficient for a reliable correlation to be calculated." data_to_display = False if data_to_display: transcript_names_js, transcript_images_js, transcript_counts_js, transcript_sizes_js, series_params, ercc_points = chart_series_params(counts,transcript_sizes,transcript_names, mean_mapqs,ercc_conc) color_legend = generate_color_legend() msg_to_user, rsquared = create_summary_block(OUTPUT_DIR,dr,MINIMUM_RSQUARED) template = open(SRC + '/ercc_template.html') page_we_are_making = Template(template.read()) if MINIMUM_COUNTS > 1: counts_msg = "All transcripts with fewer than "+str(MINIMUM_COUNTS)+" counts are shown in the above figure (below the dotted line), but not used in calculating R-squared." else: counts_msg = "All transcripts, even those with only 1 count, were used in calculating R-squared." if BARCODE_ENTERED != 'none found' and BARCODE_ENTERED != '': barcode = '('+BARCODE_ENTERED+')' else: barcode = '' print page_we_are_making.substitute(dose_response_image = report_components['dose_response_image'], results_divs = report_components['results_divs'], ercc_points = ercc_points, percent_total_counts_non_ercc = percent_total_counts_non_ercc, percent_total_counts_ercc = percent_total_counts_ercc,