| 876 | } |
| 877 | |
| 878 | void XQuestResultXMLHandler::writeTo(std::ostream& os) |
| 879 | { |
| 880 | ProteinIdentification::SearchParameters search_params; |
| 881 | search_params = (*this->cpro_id_)[0].getSearchParameters(); |
| 882 | |
| 883 | String input_filename; |
| 884 | if (search_params.metaValueExists("input_mzML")) |
| 885 | { |
| 886 | input_filename = search_params.getMetaValue("input_mzML"); |
| 887 | } |
| 888 | String spec_xml_name = search_params.getMetaValue("out_xquest_specxml"); |
| 889 | |
| 890 | os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; |
| 891 | os << "<?xml-stylesheet type=\"text/xsl\" href=\"\"?>\n"; |
| 892 | |
| 893 | DateTime time= DateTime::now(); |
| 894 | String timestring = time.getDate() + " " + time.getTime(); |
| 895 | |
| 896 | String mono_masses = search_params.getMetaValue("cross_link:mass_monolink"); |
| 897 | mono_masses = mono_masses.substr(1).chop(1); |
| 898 | |
| 899 | String precursor_mass_tolerance_unit = search_params.precursor_mass_tolerance_ppm ? "ppm" : "Da"; |
| 900 | double precursor_mass_tolerance = search_params.precursor_mass_tolerance; |
| 901 | String fragment_mass_tolerance_unit = search_params.fragment_mass_tolerance_ppm ? "ppm" : "Da"; |
| 902 | double fragment_mass_tolerance = search_params.fragment_mass_tolerance; |
| 903 | double fragment_mass_tolerance_xlinks = search_params.getMetaValue("fragment:mass_tolerance_xlinks"); |
| 904 | |
| 905 | String cross_link_name = search_params.getMetaValue("cross_link:name"); |
| 906 | double cross_link_mass_light = search_params.getMetaValue("cross_link:mass"); |
| 907 | double cross_link_mass_iso_shift = 0; |
| 908 | if (search_params.metaValueExists("cross_link:mass_isoshift")) |
| 909 | { |
| 910 | cross_link_mass_iso_shift = search_params.getMetaValue("cross_link:mass_isoshift"); |
| 911 | } |
| 912 | String aarequired1, aarequired2; |
| 913 | aarequired1 = search_params.getMetaValue("cross_link:residue1"); |
| 914 | aarequired1 = aarequired1.substr(1).chop(1); |
| 915 | aarequired2 = search_params.getMetaValue("cross_link:residue2"); |
| 916 | aarequired2 = aarequired2.substr(1).chop(1); |
| 917 | bool ntermxlinkable = aarequired1.hasSubstring("N-term") || aarequired2.hasSubstring("N-term"); |
| 918 | |
| 919 | String in_fasta = search_params.db; |
| 920 | String in_decoy_fasta = search_params.getMetaValue("input_decoys"); |
| 921 | String enzyme_name = search_params.digestion_enzyme.getName(); |
| 922 | int missed_cleavages = search_params.missed_cleavages; |
| 923 | |
| 924 | StringList variable_mod_list = search_params.variable_modifications; |
| 925 | String variable_mods; |
| 926 | for (Size i = 0; i < variable_mod_list.size(); ++i) |
| 927 | { |
| 928 | variable_mods += variable_mod_list[i] + ","; |
| 929 | } |
| 930 | variable_mods = variable_mods.chop(1); |
| 931 | |
| 932 | StringList fixed_mod_list = search_params.fixed_modifications; |
| 933 | String fixed_mods; |
| 934 | for (Size i = 0; i < fixed_mod_list.size(); ++i) |
| 935 | { |
nothing calls this directly
no test coverage detected