Mercurial > repos > bgruening > vpt_segment
comparison vpt_segment.xml @ 3:0811613196a2 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/vpt commit 1180d1e85b63beb3d2e7fd6e9c73b054a9348e7f
| author | bgruening |
|---|---|
| date | Mon, 11 Aug 2025 08:53:09 +0000 |
| parents | a88a1e78702e |
| children |
comparison
equal
deleted
inserted
replaced
| 2:a88a1e78702e | 3:0811613196a2 |
|---|---|
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements" /> | 6 <expand macro="requirements" /> |
| 7 <expand macro="creator" /> | 7 <expand macro="creator" /> |
| 8 <required_files> | |
| 9 <include path="safetensors_convert_pytorch.py"/> | |
| 10 </required_files> | |
| 8 <command detect_errors="exit_code"><![CDATA[ | 11 <command detect_errors="exit_code"><![CDATA[ |
| 9 @CMD@ | 12 @CMD@ |
| 10 ln -s '$detected_transcripts' 'input/detected_transcripts.csv' && | 13 ln -s '$detected_transcripts' 'input/detected_transcripts.csv' && |
| 11 ln -s '$vpt_config_file' 'input/vpt_config_file.json' && | 14 ln -s '$vpt_config_file' 'input/vpt_config_file.json' && |
| 15 #for $i, $task in enumerate($vpt_config.segmentation_tasks.segmentation_task): | |
| 16 #if $task.segmentation_properties.custom_weights: | |
| 17 ln -s '$task.segmentation_properties.custom_weights' 'input/model/custom_weights_${i}.safetensors' && | |
| 18 python '$__tool_directory__/safetensors_convert_pytorch.py' --convert safe_pt -i 'input/model/custom_weights_${i}.safetensors' -o 'input/model/custom_weights_${i}.pth' && | |
| 19 #end if | |
| 20 #end for | |
| 12 ### segmentation | 21 ### segmentation |
| 13 vpt | 22 vpt |
| 14 @COMMON_ARGS@ | 23 @COMMON_ARGS@ |
| 15 run-segmentation | 24 run-segmentation |
| 16 --segmentation-algorithm 'input/vpt_config_file.json' | 25 --segmentation-algorithm 'input/vpt_config_file.json' |
| 103 #else: | 112 #else: |
| 104 "model": null, | 113 "model": null, |
| 105 #end if | 114 #end if |
| 106 "model_dimensions": "$task.segmentation_properties.model_dimensions", | 115 "model_dimensions": "$task.segmentation_properties.model_dimensions", |
| 107 #if $task.segmentation_properties.custom_weights: | 116 #if $task.segmentation_properties.custom_weights: |
| 108 "custom_weights": "$task.segmentation_properties.custom_weights", | 117 "custom_weights": "input/model/custom_weights_${i}.pth", |
| 109 #else: | 118 #else: |
| 110 "custom_weights": null, | 119 "custom_weights": null, |
| 111 #end if | 120 #end if |
| 112 "channel_map": { | 121 "channel_map": { |
| 113 #if $task.segmentation_properties.channel_map.channel_red_conditional.red != "None": | 122 #if $task.segmentation_properties.channel_map.channel_red_conditional.red != "None": |
| 349 </param> | 358 </param> |
| 350 <param argument="--model_dimensions" type="select" label="Model dimensions" help="2D applies the 2D Cellpose model to all z-planes specified in the z_layers list separately and the results are combined into a 3D output. 3D applies the native-3D Cellpose model to all z-planes specified in the z_layers list."> | 359 <param argument="--model_dimensions" type="select" label="Model dimensions" help="2D applies the 2D Cellpose model to all z-planes specified in the z_layers list separately and the results are combined into a 3D output. 3D applies the native-3D Cellpose model to all z-planes specified in the z_layers list."> |
| 351 <option value="2D">2D</option> | 360 <option value="2D">2D</option> |
| 352 <option value="3D">3D</option> | 361 <option value="3D">3D</option> |
| 353 </param> | 362 </param> |
| 354 <param argument="--custom_weights" type="data" format="data" optional="true" label="Custom Cellpose weights file"/> | 363 <param argument="--custom_weights" type="data" format="safetensors" optional="true" label="Custom Cellpose weights file"/> |
| 355 <section name="channel_map" title="Channel map" expanded="true" help="Specify the channel map for the segmentation task with the corresponding task input data"> | 364 <section name="channel_map" title="Channel map" expanded="true" help="Specify the channel map for the segmentation task with the corresponding task input data"> |
| 356 <conditional name="channel_red_conditional"> | 365 <conditional name="channel_red_conditional"> |
| 357 <param name="red" type="select" label="The stain that will be used for red channel"> | 366 <param name="red" type="select" label="The stain that will be used for red channel"> |
| 358 <expand macro="channel_options_none"/> | 367 <expand macro="channel_options_none"/> |
| 359 </param> | 368 </param> |
| 551 </element> | 560 </element> |
| 552 <element name="cell_metadata"> | 561 <element name="cell_metadata"> |
| 553 <assert_contents> | 562 <assert_contents> |
| 554 <has_text_matching expression="EntityID,fov,volume,center_x,center_y,min_x,min_y,max_x,max_y,anisotropy,transcript_count,perimeter_area_ratio,solidity"/> | 563 <has_text_matching expression="EntityID,fov,volume,center_x,center_y,min_x,min_y,max_x,max_y,anisotropy,transcript_count,perimeter_area_ratio,solidity"/> |
| 555 <has_text_matching expression=",752.854533232[0-9]+,315.600965641[0-9]+,5.50107977386[0-9]+,310.1669732237[0-9]+,"/> | 564 <has_text_matching expression=",752.854533232[0-9]+,315.600965641[0-9]+,5.50107977386[0-9]+,310.1669732237[0-9]+,"/> |
| 556 <has_text_matching expression=",416.540438981[0-9]+,68.7110642977[0-9]+,9.67291568732[0-9]+,64.4947481953[0-9]+,"/> | 565 <has_text_matching expression=",777.13824141[0-9]+,70.4487975801[0-9]+,1.976992703078[0-9]+,65.5065863409[0-9]+,"/> |
| 557 </assert_contents> | 566 </assert_contents> |
| 558 </element> | 567 </element> |
| 559 <element name="detected_transcripts"> | 568 <element name="detected_transcripts"> |
| 560 <assert_contents> | 569 <assert_contents> |
| 561 <has_text_matching expression=",barcode_id,global_x,global_y,global_z,x,y,fov,gene,transcript_id,cell_id"/> | 570 <has_text_matching expression=",barcode_id,global_x,global_y,global_z,x,y,fov,gene,transcript_id,cell_id"/> |
| 562 <has_text_matching expression="86,10,285.00012,10.13364,0.0,816.0,153.0,0,AKAP11,ENST00000025301.3"/> | 571 <has_text_matching expression="63,10,370.95007,5.520504,0.0,1611.833,110.285774,0,AKAP11,ENST00000025301.3"/> |
| 563 <has_text_matching expression="229,10,274.95612,35.72964,0.0,723.0,390.0,0,AKAP11,ENST00000025301.3"/> | 572 <has_text_matching expression="68,10,355.46716,6.4616404,0.0,1468.4725,119.0,0,AKAP11,ENST00000025301.3"/> |
| 564 </assert_contents> | 573 </assert_contents> |
| 565 </element> | 574 </element> |
| 566 <element name="metrics"> | 575 <element name="metrics"> |
| 567 <assert_contents> | 576 <assert_contents> |
| 568 <has_text_matching expression=",Cell count,Cell volume"/> | 577 <has_text_matching expression=",Cell count,Cell volume"/> |
| 569 <has_text_matching expression="All cells,814,1572.4,1533.3,735.8,654.0,92.1,108.0,96.4,68.2,0.0"/> | 578 <has_n_lines n="3"/> |
| 570 <has_text_matching expression="Cells after filtering,700,1694.1,1667.9,851.1,810.5,104.5,111.0,95.9,63.2,0.06"/> | |
| 571 </assert_contents> | 579 </assert_contents> |
| 572 </element> | 580 </element> |
| 573 <element name="sum_signals"> | 581 <element name="sum_signals"> |
| 574 <assert_contents> | 582 <assert_contents> |
| 575 <has_text_matching expression="Cellbound2_raw,Cellbound2_high_pass"/> | 583 <has_text_matching expression="Cellbound2_raw,Cellbound2_high_pass"/> |
| 760 </assert_contents> | 768 </assert_contents> |
| 761 </element> | 769 </element> |
| 762 <element name="metrics"> | 770 <element name="metrics"> |
| 763 <assert_contents> | 771 <assert_contents> |
| 764 <has_text_matching expression=",Cell count,Cell volume"/> | 772 <has_text_matching expression=",Cell count,Cell volume"/> |
| 765 <has_text_matching expression="All cells,811,1588.0,1549.9,740.5,669.0,92.2,109.0,96.7,68.6,0.0"/> | 773 <has_n_lines n="3"/> |
| 766 <has_text_matching expression="Cells after filtering,698,1711.6,1705.9,856.1,817.5,104.6,111.0,96.2,63.7,0.06"/> | |
| 767 </assert_contents> | 774 </assert_contents> |
| 768 </element> | 775 </element> |
| 769 <element name="sum_signals"> | 776 <element name="sum_signals"> |
| 770 <assert_contents> | 777 <assert_contents> |
| 771 <has_text_matching expression="Cellbound2_raw,Cellbound2_high_pass"/> | 778 <has_text_matching expression="Cellbound2_raw,Cellbound2_high_pass"/> |
| 832 <param name="entity_types_detected" value="cell"/> | 839 <param name="entity_types_detected" value="cell"/> |
| 833 <param name="z_layers" value="3"/> | 840 <param name="z_layers" value="3"/> |
| 834 <section name="segmentation_properties"> | 841 <section name="segmentation_properties"> |
| 835 <param name="model" value="null"/> | 842 <param name="model" value="null"/> |
| 836 <param name="model_dimensions" value="2D"/> | 843 <param name="model_dimensions" value="2D"/> |
| 837 <param name="custom_weights" location="https://zenodo.org/records/15319018/files/CP_20230830_093420"/> | 844 <param name="custom_weights" location="https://zenodo.org/records/16784480/files/CP_20230830_093420.safetensors"/> |
| 838 <section name="channel_map"> | 845 <section name="channel_map"> |
| 839 <conditional name="channel_red_conditional"> | 846 <conditional name="channel_red_conditional"> |
| 840 <param name="red" value="Cellbound1"/> | 847 <param name="red" value="Cellbound1"/> |
| 841 <conditional name="normalize_conditional"> | 848 <conditional name="normalize_conditional"> |
| 842 <param name="normalize_select" value="Yes"/> | 849 <param name="normalize_select" value="Yes"/> |
| 903 </section> | 910 </section> |
| 904 <output_collection name="vpt_results" type="list"> | 911 <output_collection name="vpt_results" type="list"> |
| 905 <element name="cell_by_gene"> | 912 <element name="cell_by_gene"> |
| 906 <assert_contents> | 913 <assert_contents> |
| 907 <has_text_matching expression="cell,AKAP11,CBX5,CCDC113"/> | 914 <has_text_matching expression="cell,AKAP11,CBX5,CCDC113"/> |
| 908 <has_text_matching expression="6,11,4,0,5,2,1,0,1,2,1,2"/> | 915 <has_text_matching expression="6,10,4,0,5,2,1,0,1,2"/> |
| 909 <has_text_matching expression="0,1,0,0,0,0,1,0,0,4"/> | 916 <has_text_matching expression="0,1,0,0,0,0,1,0,0,4,0"/> |
| 910 </assert_contents> | 917 </assert_contents> |
| 911 </element> | 918 </element> |
| 912 <element name="cell_metadata"> | 919 <element name="cell_metadata"> |
| 913 <assert_contents> | 920 <assert_contents> |
| 914 <has_text_matching expression="EntityID,fov,volume,center_x,center_y,min_x,min_y,max_x,max_y,anisotropy,transcript_count,perimeter_area_ratio,solidity"/> | 921 <has_text_matching expression="EntityID,fov,volume,center_x,center_y,min_x,min_y,max_x,max_y,anisotropy,transcript_count,perimeter_area_ratio,solidity"/> |
| 915 <has_text_matching expression="168.0683921161[0-9]+,246.3592447472[0-9]+,-1.507707574380[0-9]+,243.9322371166[0-9]+"/> | 922 <has_text_matching expression="167.0695914980[0-9]+,246.371389688[0-9]+,-1.502969079760[0-9]+,243.9322371166[0-9]+"/> |
| 916 <has_text_matching expression="1540.721726928[0-9]+,412.175889439[0-9]+,2.951632912099[0-9]+,404.3500198495[0-9]+"/> | 923 <has_text_matching expression="1540.721726928[0-9]+,412.175889439[0-9]+,2.951632912099[0-9]+,404.3500198495[0-9]+"/> |
| 917 </assert_contents> | 924 </assert_contents> |
| 918 </element> | 925 </element> |
| 919 <element name="detected_transcripts"> | 926 <element name="detected_transcripts"> |
| 920 <assert_contents> | 927 <assert_contents> |
| 924 </assert_contents> | 931 </assert_contents> |
| 925 </element> | 932 </element> |
| 926 <element name="metrics"> | 933 <element name="metrics"> |
| 927 <assert_contents> | 934 <assert_contents> |
| 928 <has_text_matching expression=",Cell count,Cell volume"/> | 935 <has_text_matching expression=",Cell count,Cell volume"/> |
| 929 <has_text_matching expression="All cells,93[0-9]+,121\d*(\.\d+)?,118\d*(\.\d+)?,60\d*(\.\d+)?,49\d*(\.\d+)?,7\d*(\.\d+)?,10\d*(\.\d+)?,9\d*(\.\d+)?,6\d*(\.\d+)?,0.0"/> | 936 <has_n_lines n="3"/> |
| 930 <has_text_matching expression="Cells after filtering,659,1532.9,1553.5,850.2,837.0,104.8,112.0,90.2,53.8,0.15"/> | |
| 931 </assert_contents> | 937 </assert_contents> |
| 932 </element> | 938 </element> |
| 933 <element name="sum_signals"> | 939 <element name="sum_signals"> |
| 934 <assert_contents> | 940 <assert_contents> |
| 935 <has_text_matching expression="Cellbound2_raw,Cellbound2_high_pass"/> | 941 <has_text_matching expression="Cellbound2_raw,Cellbound2_high_pass"/> |
| 936 <has_text_matching expression="73446567.0,1605103.666715[0-9]+"/> | 942 <has_text_matching expression="72859278.0,1502895.008866[0-9]+"/> |
| 937 <has_text_matching expression="1642190888.0,16154095.44810[0-9]+"/> | 943 <has_text_matching expression="1642190888.0,16154095.44810[0-9]+"/> |
| 938 </assert_contents> | 944 </assert_contents> |
| 939 </element> | 945 </element> |
| 940 </output_collection> | 946 </output_collection> |
| 941 <output_collection name="vpt_boundaries" type="list"> | 947 <output_collection name="vpt_boundaries" type="list"> |
| 970 <has_text_matching expression="0,1,2,3,4,5,6"/> | 976 <has_text_matching expression="0,1,2,3,4,5,6"/> |
| 971 <has_text_matching expression="Cellpose2"/> | 977 <has_text_matching expression="Cellpose2"/> |
| 972 <has_text_matching expression="null"/> | 978 <has_text_matching expression="null"/> |
| 973 <has_text_matching expression="CLAHE"/> | 979 <has_text_matching expression="CLAHE"/> |
| 974 <has_text_matching expression="harmonize"/> | 980 <has_text_matching expression="harmonize"/> |
| 981 <has_text_matching expression="input/model/custom_weights_0.pth"/> | |
| 975 </assert_contents> | 982 </assert_contents> |
| 976 </element> | 983 </element> |
| 977 </output_collection> | 984 </output_collection> |
| 978 <output name="vpt_log"> | 985 <output name="vpt_log"> |
| 979 <assert_contents> | 986 <assert_contents> |
