comparison Marea/marea.py @ 56:68375ead0ee4 draft

Uploaded
author bimib
date Sun, 15 Mar 2020 11:28:47 -0400
parents 7b57a93ac594
children 69dfed656e0b
comparison
equal deleted inserted replaced
55:39238e5840ae 56:68375ead0ee4
707 tmp_csv = tmp_csv.reset_index() 707 tmp_csv = tmp_csv.reset_index()
708 header = ['ids', 'P_Value', 'Log2(fold change)'] 708 header = ['ids', 'P_Value', 'Log2(fold change)']
709 tmp_csv.to_csv(tab, sep = '\t', index = False, header = header) 709 tmp_csv.to_csv(tab, sep = '\t', index = False, header = header)
710 710
711 if create_svg or create_pdf: 711 if create_svg or create_pdf:
712 if args.rules_selector == 'HMRcore' or (args.rules_selector == 'Custom' 712 if args.custom_rules == 'false' or (args.custom_rules == 'true'
713 and args.yes_no == 'yes'): 713 and args.custom_map != ''):
714 fix_map(tmp, core_map, threshold_P_V, threshold_F_C, max_F_C) 714 fix_map(tmp, core_map, threshold_P_V, threshold_F_C, max_F_C)
715 file_svg = 'result/' + single_cluster + '_vs_ rest (SVG Map).svg' 715 file_svg = 'result/' + single_cluster + '_vs_ rest (SVG Map).svg'
716 with open(file_svg, 'wb') as new_map: 716 with open(file_svg, 'wb') as new_map:
717 new_map.write(ET.tostring(core_map)) 717 new_map.write(ET.tostring(core_map))
718 718
746 tmp_csv = tmp_csv.reset_index() 746 tmp_csv = tmp_csv.reset_index()
747 header = ['ids', 'P_Value', 'Log2(fold change)'] 747 header = ['ids', 'P_Value', 'Log2(fold change)']
748 tmp_csv.to_csv(tab, sep = '\t', index = False, header = header) 748 tmp_csv.to_csv(tab, sep = '\t', index = False, header = header)
749 749
750 if create_svg or create_pdf: 750 if create_svg or create_pdf:
751 if args.rules_selector == 'HMRcore' or (args.rules_selector == 'Custom' 751 if args.custom_rules == 'false' or (args.custom_rules == 'true'
752 and args.yes_no == 'yes'): 752 and args.custom_map != ''):
753 fix_map(tmp, core_map, threshold_P_V, threshold_F_C, max_F_C) 753 fix_map(tmp, core_map, threshold_P_V, threshold_F_C, max_F_C)
754 file_svg = 'result/' + i + '_vs_' + j + ' (SVG Map).svg' 754 file_svg = 'result/' + i + '_vs_' + j + ' (SVG Map).svg'
755 with open(file_svg, 'wb') as new_map: 755 with open(file_svg, 'wb') as new_map:
756 new_map.write(ET.tostring(core_map)) 756 new_map.write(ET.tostring(core_map))
757 757