Commit f17c3c0d authored by Yi Sun's avatar Yi Sun

first commit, actively developing cellprofiler

parents
.venv/*
.venv/
categories: []
description: galaxy tools
name: galaxy_tools
owner: yisun
<tool id="cp318" name="Cellprofiler" version="3.1.8">
<description>Run pipeline</description>
<requirements>
<!--
<requirement type="package" version="2.7.13">python</requirement>
-->
<requirement type="package" version="3.1.8">cellprofiler</requirement>
</requirements>
<command>
mkdir subdir1;
cellprofiler -c -r -i $inputdir -p $pipeline -o subdir1
</command>
<inputs>
<param name="pipeline" type="data" label="Pipeline file"/>
<param name="inputdir" type="text" label="Image Directory"/>
<!-- <param name="outputdir" type="text" label="Output directory" /> -->
</inputs>
<outputs>
<data format="txt" name="report">
<discover_datasets pattern="__designation_and_ext__" directory="subdir1" visible="true" />
<discover_datasets pattern="CUSTOM_(?P&lt;designation&gt;.+)\.(?P&lt;ext&gt;.+)" directory="subdir1" visible="true" />
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.report\.csv" ext="tabular" visible="true" />
</data>
<!-- <data name="cp_output" format="txt">
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.csv" directory="tables" format="tabular" visible="true"/>
</data> -->
</outputs>
<stdio>
<exit_code range="1:" level="fatal" description="Error occured"/>
</stdio>
<tests>
<!--
<test>
<param name="input" value="fa_gc_content_input.fa"/>
<output name="out_file1" file="fa_gc_content_output.txt"/>
</test>
-->
</tests>
<help>
This tool runs a cellprofiler pipeline.
</help>
</tool>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Channel_DNA,Channel_PH3,Channel_cellbody,Count_Cells,Count_Cytoplasm,Count_Nuclei,Count_PH3,ExecutionTime_01Images,ExecutionTime_02Metadata,ExecutionTime_03NamesAndTypes,ExecutionTime_04Groups,ExecutionTime_05IdentifyPrimaryObjects,ExecutionTime_06IdentifyPrimaryObjects,ExecutionTime_07RelateObjects,ExecutionTime_08IdentifySecondaryObjects,ExecutionTime_09IdentifyTertiaryObjects,ExecutionTime_10MeasureObjectIntensity,ExecutionTime_11MeasureObjectSizeShape,ExecutionTime_12OverlayOutlines,ExecutionTime_13SaveImages,FileName_DNA,FileName_OrigOverlay,FileName_PH3,FileName_cellbody,Frame_DNA,Frame_PH3,Frame_cellbody,Group_Index,Group_Number,Height_DNA,Height_PH3,Height_cellbody,ImageNumber,ImageSet_ImageSet,MD5Digest_DNA,MD5Digest_PH3,MD5Digest_cellbody,Metadata_Frame,Metadata_Series,ModuleError_01Images,ModuleError_02Metadata,ModuleError_03NamesAndTypes,ModuleError_04Groups,ModuleError_05IdentifyPrimaryObjects,ModuleError_06IdentifyPrimaryObjects,ModuleError_07RelateObjects,ModuleError_08IdentifySecondaryObjects,ModuleError_09IdentifyTertiaryObjects,ModuleError_10MeasureObjectIntensity,ModuleError_11MeasureObjectSizeShape,ModuleError_12OverlayOutlines,ModuleError_13SaveImages,PathName_DNA,PathName_OrigOverlay,PathName_PH3,PathName_cellbody,Scaling_DNA,Scaling_PH3,Scaling_cellbody,Series_DNA,Series_PH3,Series_cellbody,Threshold_FinalThreshold_Cells,Threshold_FinalThreshold_Nuclei,Threshold_FinalThreshold_PH3,Threshold_OrigThreshold_Cells,Threshold_OrigThreshold_Nuclei,Threshold_OrigThreshold_PH3,Threshold_SumOfEntropies_Cells,Threshold_SumOfEntropies_Nuclei,Threshold_SumOfEntropies_PH3,Threshold_WeightedVariance_Cells,Threshold_WeightedVariance_Nuclei,Threshold_WeightedVariance_PH3,URL_DNA,URL_OrigOverlay,URL_PH3,URL_cellbody,Width_DNA,Width_PH3,Width_cellbody
-1,-1,-1,289.0,289.0,289.0,20.0,0,0,0.6300000000000001,0,0.5699999999999998,0.4099999999999997,0.019999999999999574,0.4200000000000008,0.05999999999999961,0.9799999999999995,2.9700000000000015,0.03999999999999915,0.15000000000000036,AS_09125_050116030001_D03f00d0.tif,AS_09125_050116030001_D03f00d0_Overlay.png,AS_09125_050116030001_D03f00d1.tif,AS_09125_050116030001_D03f00d2.tif,0,0,0,1,1,512,512,512,1,eLvhcZhes7GvyM1RKEstAsUqUCUwPSik5iXnp2TmpdsqhYa46Voo2dvZABOFAlBhXrGtUkZJSYGVvn45OMGk5uVmJhflFyfnF1Tq5Rel6wcnZ6TmJhaDUpG+kYGhma6BmRJyYLkMt+RkQP30BExNJAQRSPngDiJDqgcRPH+QEE6oeWrQBpYRlQILlAPtAKEuKdY=,64629027592a2563a9210dc5378d7a28,6a086228f7284477af022cecfbf1d656,93ddd5a59249ff6bd5727857f15b4a2c,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,/tmp/input,/srv/galaxy/server/tools/cellprofiler/outputs,/tmp/input,/tmp/input,255,255,255,0,0,0,0.05882353027888416,0.09860165,0.10582796,0.05882353027888416,0.09860165,0.10582796,-11.90597083351695,-12.601545359506474,-12.301226291164163,0.34447473000943774,0.13034214553567836,0.0190787024583301,file:/tmp/input/AS_09125_050116030001_D03f00d0.tif,file:/srv/galaxy/server/tools/cellprofiler/outputs/AS_09125_050116030001_D03f00d0_Overlay.png,file:/tmp/input/AS_09125_050116030001_D03f00d1.tif,file:/tmp/input/AS_09125_050116030001_D03f00d2.tif,512,512,512
This source diff could not be displayed because it is too large. You can view the blob instead.
ImageNumber,ObjectNumber,Location_Center_X,Location_Center_Y,Location_Center_Z,Number_Object_Number,Parent_Nuclei
1,1,475.32758620689657,18.25862068965517,0,1,7
1,2,456.35,36.43333333333333,0,2,17
1,3,130.16346153846155,52.05769230769231,0,3,25
1,4,130.62295081967213,85.88524590163935,0,4,41
1,5,124.66666666666667,88.16666666666667,0,5,41
1,6,213.2156862745098,115.08823529411765,0,6,51
1,7,462.5,254.76923076923077,0,7,86
1,8,384.1,268.675,0,8,93
1,9,186.66666666666666,321.6014492753623,0,9,134
1,10,435.56470588235294,362.52941176470586,0,10,172
1,11,405.48333333333335,363.175,0,11,171
1,12,62.0,379.29323308270676,0,12,188
1,13,440.4117647058824,406.8235294117647,0,13,211
1,14,500.3703703703704,408.5777777777778,0,14,216
1,15,444.20652173913044,420.3804347826087,0,15,230
1,16,460.6931818181818,452.67045454545456,0,16,254
1,17,35.35537190082645,463.8099173553719,0,17,262
1,18,24.54736842105263,467.82105263157894,0,18,265
1,19,415.4076923076923,478.7692307692308,0,19,272
1,20,116.50943396226415,490.2830188679245,0,20,276
<tool id="inputs_as_json_with_paths" name="inputs_as_json_with_paths" version="1.0.0" profile="18.09">
<command detect_errors="exit_code">
python '$check_inputs' '$inputs' $test_case
</command>
<configfiles>
<inputs name="inputs" data_style="paths" />
<!-- Can specify with fixed path in working directory instead:
<inputs name="inputs" filename="input.json" />
-->
<configfile name="check_inputs"><![CDATA[
import json
import sys
input_json_path = sys.argv[1]
test_case = sys.argv[2]
as_dict = json.load(open(input_json_path, "r"))
def assert_equals(x, y):
assert x == y, "%s != %s" % (x, y)
if test_case == "1":
assert_equals(as_dict["test_case"], 1)
assert_equals(as_dict["text_test"], "foo")
assert_equals(as_dict["booltest"], True)
assert_equals(as_dict["booltest2"], True)
assert_equals(as_dict["inttest"], 12456)
assert_equals(as_dict["floattest"], 6.789)
assert_equals(as_dict["radio_select"], "a_radio")
assert_equals(as_dict["repeat"][0]["r"], "000000")
assert_equals(as_dict["repeat"][1]["r"], "FFFFFF")
assert_equals(as_dict["cond"]["more_text"], "fdefault")
assert_equals(as_dict["section_example"]["section_text"], "section_default")
assert_equals(as_dict["data_input"], None)
elif test_case == "2":
assert_equals(as_dict["test_case"], 2)
assert_equals(as_dict["text_test"], "bar")
assert_equals(as_dict["booltest"], False)
assert_equals(as_dict["booltest2"], False)
assert_equals(as_dict["inttest"], None)
assert_equals(as_dict["floattest"], 1.0)
assert_equals(as_dict["radio_select"], "a_radio")
assert_equals(as_dict["repeat"][0]["r"], "000000")
assert_equals(as_dict["cond"]["cond_test"], "second")
assert_equals(as_dict["cond"]["more_text"], "sdefault")
assert_equals(as_dict["section_example"]["section_text"], "section_default")
data_input = as_dict["data_input"]
assert data_input is not None
with open("output", "w") as f:
f.write("okay\n")
]]></configfile>
</configfiles>
<inputs>
<param name="test_case" type="integer" value="0" />
<param name="text_test" type="text" />
<param name="booltest" truevalue="booltrue" falsevalue="boolfalse" checked="false" type="boolean" />
<param name="booltest2" truevalue="booltrue" falsevalue="boolfalse" checked="false" type="boolean" />
<param name="inttest" type="integer" optional="true" />
<param name="floattest" value="1.0" type="float" />
<param name="radio_select" type="select" display="radio">
<option value="a_radio" selected="true">A Radio</option>
<option value="b_radio">B Radio</option>
<option value="c_radio">C Radio</option>
</param>
<param name="data_input" type="data" optional="true" />
<repeat name="repeat" title="Repeat" min="1">
<param name="r" type="color" />
</repeat>
<conditional name="cond">
<param name="cond_test" type="select">
<option value="first" selected="true">First</option>
<option value="second">Second</option>
</param>
<when value="first">
<param name="more_text" type="text" value="fdefault" />
</when>
<when value="second">
<param name="more_text" type="text" value="sdefault" />
</when>
</conditional>
<section name="section_example" title="Section Example">
<param name="section_text" type="text" value="section_default" />
</section>
</inputs>
<outputs>
<data name="out_file1" from_work_dir="output" format="txt" />
</outputs>
<tests>
<test>
<param name="test_case" value="1" />
<param name="text_test" value="foo" />
<param name="booltest" value="true" />
<param name="booltest2" value="booltrue" />
<param name="inttest" value="12456" />
<param name="floattest" value="6.789" />
<repeat name="repeat">
<param name="r" value="000000"/>
</repeat>
<repeat name="repeat">
<param name="r" value="FFFFFF"/>
</repeat>
<conditional name="cond">
<param name="cond_test" value="first" />
</conditional>
<output name="out_file1">
<assert_contents>
<has_line line="okay" />
</assert_contents>
</output>
</test>
<test>
<param name="test_case" value="2" />
<param name="text_test" value="bar" />
<param name="booltest" value="false" />
<param name="booltest2" value="boolfalse" />
<param name="data_input" value="simple_line.txt" />
<!-- Testing null integers -->
<!-- <param name="inttest" value="12456" /> -->
<param name="r" value="000000" />
<conditional name="cond">
<param name="cond_test" value="second" />
</conditional>
<output name="out_file1">
<assert_contents>
<has_line line="okay" />
</assert_contents>
</output>
</test>
</tests>
<help>
Test tool demonstrating the special inputs config file.
</help>
</tool>
#!/usr/bin/perl -w
# usage : perl toolExample.pl <FASTA file> <output file>
open (IN, "<$ARGV[0]");
open (OUT, ">$ARGV[1]");
while (<IN>) {
chop;
if (m/^>/) {
s/^>//;
if ($. > 1) {
print OUT sprintf("%.3f", $gc/$length) . "\n";
}
$gc = 0;
$length = 0;
} else {
++$gc while m/[gc]/ig;
$length += length $_;
}
}
print OUT sprintf("%.3f", $gc/$length) . "\n";
close( IN );
close( OUT );
<tool id="fa_gc_content_1" name="Compute GC content" version="0.1.0">
<description>for each sequence in a file</description>
<command interpreter="perl">toolExample.pl $input $output</command>
<inputs>
<param format="fasta" name="input" type="data" label="Source file"/>
</inputs>
<outputs>
<data format="tabular" name="output" />
</outputs>
<tests>
<test>
<param name="input" value="fa_gc_content_input.fa"/>
<output name="out_file1" file="fa_gc_content_output.txt"/>
</test>
</tests>
<help>
This tool computes GC content from a FASTA file.
</help>
</tool>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment