comparison fsd.py @ 48:e51fe3083b16 draft

planemo upload for repository https://github.com/monikaheinzl/duplexanalysis_galaxy/tree/master/tools/fsd commit 9bae9043a53f1e07b502acd1082450adcb6d9e31-dirty
author mheinzl
date Wed, 16 Oct 2019 10:06:13 -0400
parents 1ed4a127c41a
children
comparison
equal deleted inserted replaced
47:1ed4a127c41a 48:e51fe3083b16
733 output_file.write( 733 output_file.write(
734 "{}nr. of tags{}rel. freq of tags{}rel.freq of PE reads{}nr. of tags{}rel. freq of tags{}nr. of PE reads{}rel. freq of PE reads{}total nr. of tags{}total nr. of PE reads\n".format( 734 "{}nr. of tags{}rel. freq of tags{}rel.freq of PE reads{}nr. of tags{}rel. freq of tags{}nr. of PE reads{}rel. freq of PE reads{}total nr. of tags{}total nr. of PE reads\n".format(
735 sep, sep, sep, sep, sep, sep, sep, sep, sep)) 735 sep, sep, sep, sep, sep, sep, sep, sep, sep))
736 output_file.write("{}{}{}{}{:.3f}{}{:.3f}{}{}{}{:.3f}{}{}{}{:.3f}{}{}{}{}\n\n".format( 736 output_file.write("{}{}{}{}{:.3f}{}{:.3f}{}{}{}{:.3f}{}{}{}{:.3f}{}{}{}{}\n\n".format(
737 name_file, sep, singl, sep, float(singl) / len(data), sep, float(singl) / sum(data_o), sep, 737 name_file, sep, singl, sep, float(singl) / len(data), sep, float(singl) / sum(data_o), sep,
738 last, sep, float(last) / len(data), sep, sum(data_o[data_o > 20]), sep, 738 last, sep, float(last) / len(data), sep, sum(data_o[data_o > 20]), sep, float(sum(data_o[data_o > 20])) / sum(data_o), sep, len(data),
739 float(sum(data_o[data_o > 20])) / sum(data_o), sep, len(data),
740 sep, sum(data_o))) 739 sep, sum(data_o)))
741 740
742 # information for FS >= 1 741 # information for FS >= 1
743 output_file.write( 742 output_file.write(
744 "The unique frequencies were calculated from the dataset where the tags occured only once (=ab without DCS, ba without DCS)\n" 743 "The unique frequencies were calculated from the dataset where the tags occured only once (=ab without DCS, ba without DCS)\n"
749 sep)) 748 sep))
750 output_file.write("{}{}{}unique:{}total{}unique{}total:\n".format(sep, sep, sep, sep, sep, sep)) 749 output_file.write("{}{}{}unique:{}total{}unique{}total:\n".format(sep, sep, sep, sep, sep, sep))
751 output_file.write("SSCS ab{}{}{}{}{}{:.3f}{}{:.3f}{}{:.3f}{}{:.3f}\n".format( 750 output_file.write("SSCS ab{}{}{}{}{}{:.3f}{}{:.3f}{}{:.3f}{}{:.3f}\n".format(
752 sep, len(dataAB), sep, sum(dataAB_o), sep, 751 sep, len(dataAB), sep, sum(dataAB_o), sep,
753 float(len(dataAB)) / (len(dataAB) + len(dataBA) + len(duplTags)), 752 float(len(dataAB)) / (len(dataAB) + len(dataBA) + len(duplTags)),
754 sep, float(sum(dataAB_o)) / (sum(dataAB_o) + sum(dataBA_o) + sum(duplTags_o)), sep, 753 sep, float(len(dataAB)) / (len(ab) + len(ba)), sep, float(sum(dataAB_o)) / (sum(dataAB_o) + sum(dataBA_o) + sum(duplTags_o)),
755 float(len(dataAB)) / (len(ab) + len(ba)), sep, float(sum(dataAB_o)) / (sum(ab_o) + sum(ba_o)))) 754 sep, float(sum(dataAB_o)) / (sum(ab_o) + sum(ba_o))))
756 output_file.write("SSCS ba{}{}{}{}{}{:.3f}{}{:.3f}{}{:.3f}{}{:.3f}\n".format( 755 output_file.write("SSCS ba{}{}{}{}{}{:.3f}{}{:.3f}{}{:.3f}{}{:.3f}\n".format(
757 sep, len(dataBA), sep, sum(dataBA_o), sep, 756 sep, len(dataBA), sep, sum(dataBA_o), sep,
758 float(len(dataBA)) / (len(dataBA) + len(dataBA) + len(duplTags)), 757 float(len(dataBA)) / (len(dataAB) + len(dataBA) + len(duplTags)),
759 sep, float(sum(dataBA_o)) / (sum(dataBA_o) + sum(dataBA_o) + sum(duplTags_o)), sep, 758 sep, float(len(dataBA)) / (len(ab) + len(ba)), sep,
760 float(len(dataBA)) / (len(ba) + len(ba)), 759 float(sum(dataBA_o)) / (sum(dataAB_o) + sum(dataBA_o) + sum(duplTags_o)),
761 sep, float(sum(dataBA_o)) / (sum(ba_o) + sum(ba_o)))) 760 sep, float(sum(dataBA_o)) / (sum(ab_o) + sum(ba_o))))
762 output_file.write( 761 output_file.write(
763 "DCS (total){}{} ({}){}{} ({}){}{:.3f}{}{:.3f} ({:.3f}){}{:.3f}{}{:.3f} ({:.3f})\n".format( 762 "DCS (total){}{} ({}){}{} ({}){}{:.3f}{}{:.3f} ({:.3f}){}{:.3f}{}{:.3f} ({:.3f})\n".format(
764 sep, len(duplTags), len(duplTags_double), sep, sum(duplTags_o), sum(duplTags_double_o), sep, 763 sep, len(duplTags), len(duplTags_double), sep, sum(duplTags_o), sum(duplTags_double_o), sep,
765 float(len(duplTags)) / (len(dataAB) + len(dataBA) + len(duplTags)), sep, 764 float(len(duplTags)) / (len(dataAB) + len(dataBA) + len(duplTags)), sep,
766 float(len(duplTags)) / (len(ab) + len(ba)), float(len(duplTags_double)) / (len(ab) + len(ba)), sep, 765 float(len(duplTags)) / (len(ab) + len(ba)), float(len(duplTags_double)) / (len(ab) + len(ba)), sep,