Repository 'flowai'
hg clone https://toolshed.g2.bx.psu.edu/repos/immport-devteam/flowai

Changeset 2:fab7c5deeb65 (2023-09-26)
Previous changeset 1:34397a84faf1 (2020-06-23) Next changeset 3:dd00eee6cd06 (2023-09-29)
Commit message:
planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
modified:
FCSflowAI.R
FCSflowAI.xml
b
diff -r 34397a84faf1 -r fab7c5deeb65 FCSflowAI.R
--- a/FCSflowAI.R Tue Jun 23 18:34:02 2020 -0400
+++ b/FCSflowAI.R Tue Sep 26 23:19:04 2023 +0000
[
@@ -7,7 +7,7 @@
 #            Gianni Monaco, Hao Chen, Michael Poidinger, Jinmiao Chen,
 #            Joao Pedro de Magalhaes and Anis Larbi
 #            Bioinformatics (2016)
-#            doi: 10.1093/bioinformatics/btw191
+#            doi 10.1093/bioinformatics/btw191
 #
 
 library(flowAI)
@@ -17,22 +17,22 @@
 
 args <- commandArgs(trailingOnly = TRUE)
 
-remFS <- if(args[4]) c("FSC", "SSC") else NULL
+rem_fs <- if (args[4]) c("FSC", "SSC") else NULL
 
 flow_auto_qc(
-    fcsfiles = args[1],
-    remove_from = args[2],
-    alphaFR = as.numeric(args[3]),
-    ChRemoveFS = remFS,
-    outlierFS = args[5],
-    pen_valueFS = as.numeric(args[6]),
-    sideFM = args[7],
-    fcs_QC = ifelse(args[9] == "None", FALSE, "_QC"),
-    fcs_highQ = ifelse(args[10] == "None", FALSE, "_highQ"),
-    fcs_lowQ = ifelse(args[11] == "None", FALSE, "_lowQ"),
-    folder_results = FALSE)
+             fcsfiles = args[1],
+             remove_from = args[2],
+             alphaFR = as.numeric(args[3]),
+             ChRemoveFS = rem_fs,
+             outlierFS = args[5],
+             pen_valueFS = as.numeric(args[6]),
+             sideFM = args[7],
+             fcs_QC = ifelse(args[9] == "None", FALSE, "_QC"),
+             fcs_highQ = ifelse(args[10] == "None", FALSE, "_highQ"),
+             fcs_lowQ = ifelse(args[11] == "None", FALSE, "_lowQ"),
+             folder_results = FALSE)
 
-try(file.rename(dir(".", pattern = ".*_QC.html"), args[8]), silent =TRUE)
-try(file.rename(dir(".", pattern = ".*_QC.fcs"), args[9]), silent =TRUE)
-try(file.rename(dir(".", pattern = ".*_highQ.fcs"), args[10]), silent =TRUE)
-try(file.rename(dir(".", pattern = ".*_lowQ.fcs"), args[11]), silent =TRUE)
+try(file.rename(dir(".", pattern = ".*_QC.html"), args[8]), silent = TRUE)
+try(file.rename(dir(".", pattern = ".*_QC.fcs"), args[9]), silent = TRUE)
+try(file.rename(dir(".", pattern = ".*_highQ.fcs"), args[10]), silent = TRUE)
+try(file.rename(dir(".", pattern = ".*_lowQ.fcs"), args[11]), silent = TRUE)
b
diff -r 34397a84faf1 -r fab7c5deeb65 FCSflowAI.xml
--- a/FCSflowAI.xml Tue Jun 23 18:34:02 2020 -0400
+++ b/FCSflowAI.xml Tue Sep 26 23:19:04 2023 +0000
[
@@ -1,14 +1,24 @@
-<tool id="flowAI" name="flowAI" version="1.0+galaxy0">
+<tool id="flowAI" name="flowAI" version="1.0+galaxy1">
   <description> automatic quality control</description>
   <requirements>
     <requirement type="package" version="1.42.0">bioconductor-flowcore</requirement>
     <requirement type="package" version="1.2.9">bioconductor-flowai</requirement>
   </requirements>
   <stdio>
-    <exit_code range="2:" level="fatal" description="See stderr for more details." />
+    <exit_code range="1:" level="fatal" description="See stderr for more details."/>
   </stdio>
   <command><![CDATA[
-      Rscript $__tool_directory__/FCSflowAI.R '${input}' '${remove}' $alphaFR $chremFS $outFS $penFS '${sideFM}' '${full_rep}' $highfcs $lowfcs $qcfcs
+      Rscript $__tool_directory__/FCSflowAI.R '${input}' '${remove}' $alphaFR $chremFS $outFS $penFS '${sideFM}' report.html high.fcs low.fcs qc.fcs &&
+      cp report.html $full_rep
+      #if $highQ_FCS:
+        && cp high.fcs $highfcs
+      #end if
+      #if $lowQ_FCS:
+        && cp low.fcs $lowfcs
+      #end if
+      #if $QC_FCS:
+        && cp qc.fcs $qcfcs
+      #end if
   ]]>
   </command>
   <inputs>
@@ -49,7 +59,7 @@
     </data>
   </outputs>
   <tests>
-    <test>
+    <test expect_num_outputs="2">
       <param name="input" value="input.fcs"/>
       <param name="remove" value="all"/>
       <param name="alphaFR" value="0.01"/>
@@ -60,10 +70,18 @@
       <param name="highQ_FCS" value="TRUE"/>
       <param name="lowQ_FCS" value="FALSE"/>
       <param name="QC_FCS" value="FALSE"/>
-      <output name="full_rep" file="std/QCreport.html" compare="sim_size"/>
+      <output name="full_rep">
+        <assert_contents>
+          <has_n_lines min="100" max="500"/>
+          <has_text text="data:image/png;base64"/>
+          <has_text text="Dynamic range check"/>
+          <has_text text="total_UNIQUE"/>
+          <has_size value="267939" delta="30000"/>
+        </assert_contents>
+      </output>
       <output name="highfcs" file="std/hqdata.fcs" compare="sim_size"/>
     </test>
-    <test>
+    <test expect_num_outputs="4">
       <param name="input" value="input.fcs"/>
       <param name="remove" value="all"/>
       <param name="alphaFR" value="0.01"/>
@@ -74,12 +92,20 @@
       <param name="highQ_FCS" value="TRUE"/>
       <param name="lowQ_FCS" value="TRUE"/>
       <param name="QC_FCS" value="TRUE"/>
-      <output name="full_rep" file="std/QCreport.html" compare="sim_size"/>
+      <output name="full_rep">
+        <assert_contents>
+          <has_n_lines min="100" max="500"/>
+          <has_text text="data:image/png;base64"/>
+          <has_text text="Dynamic range check"/>
+          <has_text text="total_UNIQUE"/>
+          <has_size value="267939" delta="30000"/>
+        </assert_contents>
+      </output>
       <output name="highfcs" file="std/hqdata.fcs" compare="sim_size"/>
       <output name="lowfcs" file="std/lqdata.fcs" compare="sim_size"/>
       <output name="qcfcs" file="std/alldata.fcs" compare="sim_size"/>
     </test>
-    <test>
+    <test expect_num_outputs="2">
       <param name="input" value="input.fcs"/>
       <param name="remove" value="all"/>
       <param name="alphaFR" value="0.01"/>
@@ -90,10 +116,17 @@
       <param name="highQ_FCS" value="TRUE"/>
       <param name="lowQ_FCS" value="FALSE"/>
       <param name="QC_FCS" value="FALSE"/>
-      <output name="full_rep" file="nooutliers/QCreport_nooutliers.html" compare="sim_size"/>
+      <output name="full_rep">
+        <assert_contents>
+          <has_n_lines min="100" max="500"/>
+          <has_text text="data:image/png;base64"/>
+          <has_text text="Dynamic range check"/>
+          <has_size value="268106" delta="30000"/>
+        </assert_contents>
+      </output>
       <output name="highfcs" file="nooutliers/hqdata_nooutliers.fcs" compare="sim_size"/>
     </test>
-    <test>
+    <test expect_num_outputs="2">
       <param name="input" value="input.fcs"/>
       <param name="remove" value="all"/>
       <param name="alphaFR" value="0.01"/>
@@ -104,7 +137,15 @@
       <param name="highQ_FCS" value="TRUE"/>
       <param name="lowQ_FCS" value="FALSE"/>
       <param name="QC_FCS" value="FALSE"/>
-      <output name="full_rep" file="withsfsc/QCreport_sfsc.html" compare="sim_size"/>
+      <output name="full_rep">
+        <assert_contents>
+          <has_n_lines min="100" max="500"/>
+          <has_text text="data:image/png;base64"/>
+          <has_text text="Dynamic range check"/>
+          <has_text text="total_UNIQUE"/>
+          <has_size value="267894" delta="30000"/>
+        </assert_contents>
+      </output>
       <output name="highfcs" file="withsfsc/hqdata_sfsc.fcs" compare="sim_size"/>
     </test>
   </tests>