changeset 91:3141d9f20025 draft

Uploaded
author stef
date Tue, 28 Jul 2015 05:07:26 -0400
parents 07c810e4061c
children c5b9f2a093d4
files falco-filter-report.sh falco-filter-report.xml
diffstat 2 files changed, 30 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/falco-filter-report.sh	Fri Jul 17 06:53:45 2015 -0400
+++ b/falco-filter-report.sh	Tue Jul 28 05:07:26 2015 -0400
@@ -107,16 +107,29 @@
 ## creating galaxy history outputs
 ## ----------
 #cp 'index.html' $html_out # this is the overview of samples html
-cp $sample_html_file $out_path # this is the sample html
-#cp $vcf_base'.html' $html_out # this is the sample html
+#cp $sample_html_file $out_path # this is the sample html
+cp $vcf_base'.html' $html_out # this is the sample html
 
 ## ----------
 ## copy files to keep to output path
 ## ----------
 #cp -r ./$bam_base/*png $out_path/$bam_base/
 cp -r ./* $out_path
+#cp -r ./$bam_base $out_path
 #cp *.vcf $out_path; cp *.txt $out_path; cp *_std* $out_path
 
+## ------------------------
+## create final zip and quit with status 0 to tell galaxy all was fine
+## ------------------------
+
+if [[ $zip_to_history == 'true' ]]
+then 
+	echo "[INFO] zipping output"
+	zip -r tmp.zip *.html *.xls *.tsv $vcf_base/*.png 
+	cp tmp.zip $zip_out
+fi
+
+
 ## ----------
 echo "END falco sh"
 exit 0
--- a/falco-filter-report.xml	Fri Jul 17 06:53:45 2015 -0400
+++ b/falco-filter-report.xml	Tue Jul 28 05:07:26 2015 -0400
@@ -32,6 +32,14 @@
     <param format="tabular" name="qc_ann_qual" optional="false" type="data" label="qc_ann_qual file" help="This file is output of the FALCO variant caller falco-call"/>
     <param format="tabular" name="qc2_ann_txt" optional="false" type="data" label="qc2_ann_txt file" help="This file is output of the FALCO variant caller fal-call"/>
     <param format="tabular" name="qc_targets_txt" optional="false" type="data" label="qc_targets_txt file" help="Tabular text file with information about the amplicon regions. This file is output of the FALCO variant caller falco-call"/>
+
+    <!-- ==================== -->
+    <!-- Optional hisotry output: ZIP file with all files -->
+    <!-- ==================== -->
+    <param name="zip2history" type="select" label="Also output a ZIP file" help="The zip will contain all output files for easy download">
+      <option value="false">no</option>
+      <option value="true">yes</option>
+    </param>
   
   </inputs>
   
@@ -48,10 +56,12 @@
       qc2_ann_txt_file=$qc2_ann_txt
       qc_targets_txt_file=$qc_targets_txt
 
-      vcf_name=$vcf.name
-      html_out=$html_output
+      vcf_name="${vcf.name}"
+      html_out=${html_output}
       out_path=${html_output.files_path}
       job_name=$jobName
+      zip_out=${zip_output}
+      zip_to_history=$zip2history
       
     </configfile>
   </configfiles>
@@ -61,6 +71,9 @@
   <!-- ==================== -->
   <outputs>
     <data format="html" name="html_output" label="FALCO-reporting (${jobName})" />
+    <data format="zip" name="zip_output" label="FALCO-reporting (${jobName}) zip">
+      <filter>(zip2history == 'true')</filter>
+    </data>
     <!-- <data format="vcf" name="vcf_output" label="FALCO-calling (${jobName}): VCF" /> -->
   </outputs>