# HG changeset patch # User computational-metabolomics # Date 1643994826 0 # Node ID 96b07722120178490ef3b643297e040a29151377 # Parent 57c4e74210854ce5158b99e5cd110522033fa67c "planemo upload for repository https://github.com/computational-metabolomics/sirius_csifingerid_galaxy commit a1dfcf9fe850298b80f3738611835a3ef53e820a" diff -r 57c4e7421085 -r 96b077221201 sirius_csifingerid.py --- a/sirius_csifingerid.py Fri Feb 04 10:15:28 2022 +0000 +++ b/sirius_csifingerid.py Fri Feb 04 17:13:46 2022 +0000 @@ -42,7 +42,7 @@ exit() if args.temp_dir: - wd = os.path.join(args.temp_dir, 'temp') + wd = os.path.join(args.temp_dir, 'temp_'+str(uuid.uuid4())) os.mkdir(wd) if not os.path.exists(wd): @@ -396,33 +396,27 @@ # If rank_filter is zero then skip continue - if ('ConfidenceScore' in line - and 0 < float(confidence_filter) - and float(line['ConfidenceScore']) < - float(confidence_filter)): - # filter out those annotations that are less than - # the confidence filter value - continue + if 'ConfidenceScore' in line: + if isinstance(line['ConfidenceScore'], str): + # Value is NA or N/A + continue + + if (0 < float(confidence_filter) + and float(line['ConfidenceScore']) + < float(confidence_filter)): + # filter out those annotations that are less than + # the confidence filter value + continue line.update(ad) dwriter.writerow(line) - if backwards_compatible: - # Headers required in this format for tools that used - # v4.9.3 of SIRIUS-CSI:FingerID - s1 = "sed 's/InChIkey2D/inchikey2d/g' {r} > {r}".format(r=result_pth) - os.system(s1) - s2 = "sed 's/CSI:FingerIDScore/Score/' {r} > {r}".format(r=result_pth) - os.system(s2) - concat_output('compound_identifications.tsv', args.annotations_result_pth, args.rank_filter, - args.confidence_filter, - args.backwards_compatible) + args.confidence_filter) concat_output('canopus_summary.tsv', args.canopus_result_pth, 0, - 0, - False) + 0) diff -r 57c4e7421085 -r 96b077221201 sirius_csifingerid.xml --- a/sirius_csifingerid.xml Fri Feb 04 10:15:28 2022 +0000 +++ b/sirius_csifingerid.xml Fri Feb 04 17:13:46 2022 +0000 @@ -1,5 +1,5 @@ + version="4.9.8+galaxy2" profile="19.05"> is used to identify metabolites using single and tandem mass spectrometry @@ -16,14 +16,14 @@ --candidates $candidates --ppm_max $ppm_max --polarity $polarity - --out_dir . + --out_dir $__new_file_path__ --canopus_result_pth canopus_all_summary.tsv --annotations_result_pth annotations_all_summary.tsv --cores_top_level 1 --meta_select_col $meta_select_col --min_MSMS_peaks $min_MSMS_peaks --schema $schema - --temp_dir . + --temp_dir $__new_file_path__ #if $adducts_cond.adducts_selector == 'select': #for $a in $adducts_cond.adducts @@ -51,9 +51,6 @@ --confidence_filter $confidence_filter - #if $backwards_compatible - --backwards_compatible - #end if ]]> @@ -147,9 +144,6 @@ label="Only show annotations greater than or or equal to this value (default to show all annotations)"/> - - - - - - - - - diff -r 57c4e7421085 -r 96b077221201 test-data/bc_annotation_CCMSLIB00000578155_result.tsv --- a/test-data/bc_annotation_CCMSLIB00000578155_result.tsv Fri Feb 04 10:15:28 2022 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -name adduct rank formulaRank #adducts #predictedFPs ConfidenceScore CSI:FingerIDScore ZodiacScore SiriusScore molecularFormula adduct InChIkey2D InChI name smiles xlogp pubchemids links dbflags ionMass retentionTimeInSeconds id -D-GLUCOSE-6-PHOSPHATE [M-H]- 1 1 1 1 0.2777991179997831 -40.17179067053119 N/A 17.8469785346642 C6H13O9P [M-H]- NBSCHQHZLSJFNQ InChI=1S/C6H13O9P/c7-3-2(1-14-16(11,12)13)15-6(10)5(9)4(3)8/h2-10H,1H2,(H2,11,12,13) D-GLUCOSE-6-PHOSPHATE C(C1C(C(C(C(O1)O)O)O)O)OP(=O)(O)O -4.19999981 208;5958;65127;439198;439284;439404;439427;440100;447096;449526;4178491;4459709;9817215;9859975;10848963;12314997;11536233;10038266;12598269;11651816;11651817;11701643;10332946;10422797;10422798;11499884;16219407;21604864;21604865;23421197;23421199;23421200;25200774;25244236;24802166;42609823;44589902;44629605;46936284;51351673;51351674;59660207;59660208;66804219;72200063;71048769;70828590;90657928;90087729;92043642;89530481;89533633;92144442;92331698;92331699;92450038;102072969;101251820;100983220;124302956;124303605;129703999;129800866;133556303;134813555;135054589;135070792 HMDB:(1078 1401 3498);SuperNatural:(SN00005991 SN00006877 SN00368182 SN00005992);ZINC bio:(ZINC01529564 ZINC01532857 ZINC03869395 ZINC03869396 ZINC03869397 ZINC03869398 ZINC03875374 ZINC03875375 ZINC04096188 ZINC08551508 ZINC13540027);additional;MeSH:(65127 25244236);Plantcyc:(CPD-15711 GLC-6-P CPD-15712 CPD-1241 D-HEXOSE-6-PHOSPHATE MANNOSE-6P ALPHA-GLC-6-P);PubMed;NORMAN:(NS00015226);COCONUT:(CNP0093800 CNP0209092);KNApSAcK:(7307);Natural Products:(UNPD119019 UNPD208877);PubChem:(208 5958 65127 439198 439284 439404 439427 440100 447096 449526 4178491 4459709 9817215 9859975 10848963 12314997 11536233 10038266 12598269 11651816 11651817 11701643 10332946 10422797 10422798 11499884 16219407 21604864 21604865 23421197 23421199 23421200 25200774 25244236 24802166 42609823 44589902 44629605 46936284 51351673 51351674 59660207 59660208 66804219 72200063 71048769 70828590 90657928 90087729 92043642 89530481 89533633 92144442 92331698 92331699 92450038 102072969 101251820 100983220 124302956 124303605 129703999 129800866 133556303 134813555 135054589 135070792);CHEBI:(49728 91004 61548 58735 58247 134068 4170 4141 136602 58225 47944 43896 17719 48066 17665 61567 60332 61667 41076);PubChem class - bio and metabolites;KEGG:(C00275 C01172 C02965 C03735 C00668 C01113 C00092 C02962);YMDB:(2311 311 947 966 242);Training Set;Biocyc:(CPD-15711 GLC-6-P CPD-15712 CPD-1241 D-HEXOSE-6-PHOSPHATE MANNOSE-6P CPD1A0-6282 ALPHA-GLC-6-P SMA-0000014 SMA-0000409) 20965758 259.022 NaN 0_unknown_ diff -r 57c4e7421085 -r 96b077221201 test-data/bc_canopus_CCMSLIB00000578155_result.tsv --- a/test-data/bc_canopus_CCMSLIB00000578155_result.tsv Fri Feb 04 10:15:28 2022 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -name adduct name molecularFormula adduct most specific class level 5 subclass class superclass all classifications -D-GLUCOSE-6-PHOSPHATE [M-H]- D-GLUCOSE-6-PHOSPHATE C6H13O9P [M-H]- Hexose phosphates Monosaccharides Carbohydrates and carbohydrate conjugates Organooxygen compounds Organic oxygen compounds Organic compounds; Organoheterocyclic compounds; Carbohydrates and carbohydrate conjugates; Alcohols and polyols; Ethers; Organic acids and derivatives; Organooxygen compounds; Organic phosphoric acids and derivatives; Phosphate esters; Hemiacetals; Hexoses; Monosaccharides; Monosaccharide phosphates; Secondary alcohols; Oxanes; Hexose phosphates; Polyols; Alkyl phosphates; Monoalkyl phosphates; Organic oxides; Oxacyclic compounds; Hydrocarbon derivatives; Organic oxygen compounds; Chemical entities