Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icfree, update to 2.9.0 #200

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 7 additions & 32 deletions tools/icfree/calibrator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,8 @@
</macros>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
cp '$initial_data_file' 'initial_data.csv' &&
cp '$sampling_file' 'sampling.csv' &&
cp '$extractor_file' 'extractor.csv' &&
cp '$ref_file' 'reference.csv' &&
python -m icfree.learner.extractor
--initial_data_file 'initial_data.csv'
--sampling_file 'sampling.csv'
--output_file 'extractor.csv'
#if str($adv.num_samples) != ''
--num_samples '$adv.num_samples'
#end if
#if str($adv.num_replicates) != ''
--num_replicates '$adv.num_replicates'
#end if
&&
python -m icfree.learner.calibrator
--output 'calibrated.csv'
--plot '$output_graph'
Expand All @@ -28,23 +16,16 @@
#if str($adv.num_control_points) != ''
--num_control_points '$adv.num_control_points'
#end if
#if str($adv.num_samples) != ''
--num '$adv.num_samples'
#end if
'extractor.csv' 'reference.csv' &&
mv 'calibrated.csv' '$output_calibrated' &&
mv 'calibrated_control_points.csv' '$output_control_points'
]]></command>
<inputs>
<param name="initial_data_file" type="data" format="csv" label="Initial file" help="Initial file"/>
<param name="sampling_file" type="data" format="csv" label="Sampling file" help="Sampling file"/>
<param name="extractor_file" type="data" format="csv" label="Extractor file" help="Extractor file"/>
<param name="ref_file" type="data" format="csv" label="Reference input file" help="Reference input file"/>
<param argument="jove_plus" type="integer" value="3" label="Line number for Jove+ (1-based index)" help="Line number for Jove+ (1-based index)" />
<param argument="jove_minus" type="integer" value="2" label="Line number for Jove- (1-based index)" help="Line number for Jove- (1-based index)" />
<section name="adv" title="Advanced Options" expanded="false">
<param argument="num_samples" type="integer" optional="true" label="Number of samples" help="Number of samples" />
<!-- Extractor -->
<param argument="num_replicates" type="integer" optional="true" label="Number of replicates" help="Number of replicates." />
<!-- Calibrator -->
<param argument="r2_limit" type="float" value="0.8" label="R-squared limit for the regression" help="R-squared limit for the regression" />
<param argument="num_control_points" type="integer" optional="true" label="Number of control points to select" help="Number of control points to select" />
Expand All @@ -57,10 +38,8 @@
</outputs>
<tests>
<test expect_num_outputs="3">
<!-- python -m icfree.learner.extractor -initial_data_file calibrator.input.initial_data.csv -sampling_file calibrator.input.sampling.csv -output_file calibrator.extractor_output.1.csv -->
<!-- python -m icfree.learner.calibrator -output calibrator.output.calibrated.1.csv -jove_plus 3 -jove_minus 2 -plot calibrator.output.1.png calibrator.output.extractor.1.csv calibrator.input.ref.csv -->
<param name="initial_data_file" value="calibrator.input.initial_data.csv" />
<param name="sampling_file" value="calibrator.input.sampling.csv" />
<!-- python -m icfree.learner.calibrator -output calibrator.output.calibrated.1.csv -jove_plus 3 -jove_minus 2 -plot calibrator.output.1.png extractor.output.1.csv calibrator.input.ref.csv -->
<param name="extractor_file" value="extractor.output.1.csv" />
<param name="ref_file" value="calibrator.input.ref.csv" />
<param name="jove_plus" value="3" />
<param name="jove_minus" value="2" />
Expand All @@ -81,13 +60,9 @@
</output>
</test>
<test expect_num_outputs="3">
<!-- python -m icfree.learner.extractor -initial_data_file calibrator.input.initial_data.csv -sampling_file calibrator.input.sampling.tsv -output_file calibrator.output.extractor.2.csv -num_samples 20 -num_replicates 3 -->
<!-- python -m icfree.learner.calibrator -plot calibrator.output.2.png -output calibrator.output.2.csv -jove_plus 4 -jove_minus 3 -r2_limit 0.9 -num 20 -num_control_points 4 calibrator.output.extractor.2.csv calibrator.input.ref.csv -->
<param name="initial_data_file" value="calibrator.input.initial_data.csv" />
<param name="sampling_file" value="calibrator.input.sampling.csv" />
<!-- python -m icfree.learner.calibrator -output calibrator.output.calibrated.2.csv -jove_plus 4 -jove_minus 3 -r2_limit 0.9 -num 20 -num_control_points 4 -plot calibrator.output.2.png extractor.output.2.csv calibrator.input.ref.csv -->
<param name="extractor_file" value="extractor.output.2.csv" />
<param name="ref_file" value="calibrator.input.ref.csv" />
<param name="num_samples" value="20" />
<param name="num_replicates" value="3" />
<param name="r2_limit" value="0.9" />
<param name="num_control_points" value="4" />
<param name="jove_plus" value="4" />
Expand All @@ -99,7 +74,7 @@
</output>
<output name="output_control_points" ftype="csv">
<assert_contents>
<has_n_lines n="21" />
<has_n_lines n="5" />
</assert_contents>
</output>
<output name="output_graph" ftype="png" >
Expand Down
66 changes: 66 additions & 0 deletions tools/icfree/extractor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<tool id="icfree_extractor" name="iCFree extractor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="MIT">
<description>Process fluorescence data</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
cp '$initial_data_file' 'initial_data.csv' &&
cp '$sampling_file' 'sampling.csv' &&
python -m icfree.learner.extractor
--initial_data_file 'initial_data.csv'
--sampling_file 'sampling.csv'
--output_file 'extractor.csv'
#if str($adv.num_samples) != ''
--num_samples '$adv.num_samples'
#end if
#if str($adv.num_replicates) != ''
--num_replicates '$adv.num_replicates'
#end if
&&
mv 'extractor.csv' '$output'
]]></command>
<inputs>
<param name="initial_data_file" type="data" format="csv" label="Initial file" help="Initial file"/>
<param name="sampling_file" type="data" format="csv" label="Sampling file" help="Sampling file"/>
<section name="adv" title="Advanced Options" expanded="false">
<param argument="num_samples" type="integer" optional="true" label="Number of samples" help="Number of samples" />
<param argument="num_replicates" type="integer" optional="true" label="Number of replicates" help="Number of replicates." />
</section>
</inputs>
<outputs>
<data name="output" format="csv" label="${tool.name}" />
</outputs>
<tests>
<test expect_num_outputs="1">
<!-- python -m icfree.learner.extractor -initial_data_file extractor.input.initial_data.csv -sampling_file extractor.input.sampling.csv -output_file extractor.output.1.csv -->
<param name="initial_data_file" value="extractor.input.initial_data.csv" />
<param name="sampling_file" value="extractor.input.sampling.csv" />
<output name="output" ftype="csv">
<assert_contents>
<has_n_lines n="58" />
</assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<!-- python -m icfree.learner.extractor -initial_data_file extractor.input.initial_data.csv -sampling_file extractor.input.sampling.csv -output_file extractor.output.2.csv -num_samples 20 -num_replicates 3 -->
<param name="initial_data_file" value="extractor.input.initial_data.csv" />
<param name="sampling_file" value="extractor.input.sampling.csv" />
<param name="num_samples" value="20" />
<param name="num_replicates" value="3" />
<output name="output" ftype="csv">
<assert_contents>
<has_n_lines n="21" />
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Extractor
==========
Process fluoresence data

]]></help>
<expand macro="creator"/>
<expand macro="citation"/>
</tool>
23 changes: 15 additions & 8 deletions tools/icfree/instructor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#if str($adv.split_components) != ''
--split_components '$adv.split_components'
#end if
#if str($adv.dispense_order) != ''
--dispense_order '$adv.dispense_order'
#end if
]]></command>
<inputs>
<param name="source_plate_file" type="data" format="csv" label="Source corresponding to plate/wells" help="Output from iCFree plates designer"/>
Expand All @@ -30,8 +33,8 @@
</param>
<param argument="max_transfer_volume" type="integer" optional="true" label="Maximum transfer volume" help="Maximum volume for a single transfer. If not specified, no splitting will be performed." />
<param argument="split_threshold" type="integer" optional="true" label="Split threshold" help="Volume threshold above which transfers need to be split. If not specified, no splitting will be performed." />
<param name="split_components" type="text" optional="true" label="Split components" help="Comma-separated list of component names to create separate files for." >
</param>
<param name="split_components" type="text" optional="true" label="Split components" help="Comma-separated list of component names to create separate files for." />
<param name="dispense_order" type="text" optional="true" label="Dispense order" help="Comma-separated list of component specifying dispensing order." />
</section>
</inputs>
<outputs>
Expand All @@ -41,17 +44,21 @@
</outputs>
<tests>
<test>
<!-- python -m icfree.instructor plates_designer.source_plate.test-2.csv plates_designer.destination_plate.test-2.csv 'instructor.test-1.csv' -source_plate_type 'default:384PP_AQ_GP3' -max_transfer_volume '500' -split_threshold '500' -->
<param name="source_plate_file" value="plates_designer.source_plate.test-2.csv" />
<param name="destination_plate_file" value="plates_designer.destination_plate.test-2.csv" />
<!-- python -m icfree.instructor ../plate_designer.source_plate.test-2.csv ../plate_designer.destination_plate.test-2.csv 'instructor.test-1.csv' -source_plate_type 'default:384PP_AQ_GP3' -max_transfer_volume '500' -split_threshold '500' -->
<param name="source_plate_file" value="plate_designer.source_plate.test-2.csv" />
<param name="destination_plate_file" value="plate_designer.destination_plate.test-2.csv" />
<param name="max_transfer_volume" value="500" />
<param name="split_threshold" value="500" />
<output_collection name="output_instructor" type="list" count="1">
<element name="instructions" file="instructor.test-1.csv" ftype="csv" compare="diff" />
</output_collection>
</test>
<test>
<!-- python -m icfree.instructor plates_designer.source_plate.test-2.csv plates_designer.destination_plate.test-2.csv 'instructor.csv' -source_plate_type 'Hela lysate:384PP_AQ_CP,Access prot 50X:384PP_AQ_GP3,Reaction mix:384PP_AQ_GP3,RNA 1ug/uL:384PP_AQ_GP3' -max_transfer_volume '500' -split_threshold '500' -split_components 'Hela lysate,Access prot 50X' -->
<param name="source_plate_file" value="plates_designer.source_plate.test-2.csv" />
<param name="destination_plate_file" value="plates_designer.destination_plate.test-2.csv" />
<!-- python -m icfree.instructor plate_designer.source_plate.test-2.csv plate_designer.destination_plate.test-2.csv 'instructor.csv' -source_plate_type 'Hela lysate:384PP_AQ_CP,Access prot 50X:384PP_AQ_GP3,Reaction mix:384PP_AQ_GP3,RNA 1ug/uL:384PP_AQ_GP3' -max_transfer_volume '500' -split_threshold '500' -split_components 'Hela lysate,Access prot 50X' -dispense_order 'Access prot 50X,Hela lysate' -->
<param name="source_plate_file" value="plate_designer.source_plate.test-2.csv" />
<param name="destination_plate_file" value="plate_designer.destination_plate.test-2.csv" />
<param name="max_transfer_volume" value="500" />
<param name="split_threshold" value="500" />
<param name="source_plate_type" value="Hela lysate:384PP_AQ_CP,Access prot 50%:384PP_AQ_GP3,Reaction mix:384PP_AQ_GP3,RNA 1ug/uL:384PP_AQ_GP3" />
<param name="split_components" value="Hela lysate,Access prot 50%" />
<output_collection name="output_instructor" type="list" count="3">
Expand Down
2 changes: 1 addition & 1 deletion tools/icfree/macros.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<macros>
<token name="@TOOL_VERSION@">2.7.1</token>
<token name="@TOOL_VERSION@">2.9.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<xml name="requirements">
<requirements>
Expand Down
Loading
Loading