changeset 0:bf16e5399eb8 draft

Uploaded
author elixir-it
date Fri, 09 Nov 2018 06:02:52 -0500
parents
children c6eea29aa0ab
files bed_macros.xml covacs_macros.xml covacs_mpileup.xml tool-data/covacs_bed.loc.sample tool-data/covacs_gatk_indexes.loc.sample tool_data_table_conf.xml.sample
diffstat 6 files changed, 185 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bed_macros.xml	Fri Nov 09 06:02:52 2018 -0500
@@ -0,0 +1,22 @@
+<macros>
+  <macro name="bed_loc">
+      <conditional name="bed_source">
+            <param name="bed_source_selector" type="select" label="Will you select a bed file from your history or use a built-in bed?">
+                <option value="cached">Use a built-in bed</option>
+                <option value="history">Use a bed from history as reference</option>
+            </param>
+            <when value="cached">
+                <param name="bed_cached" type="select" label="Using reference bed" help="Select bed from the list">
+                    <options from_data_table="covacs_bed">
+                        <filter type="sort_by" column="2" />
+                        <validator type="no_options" message="No bed are available" />
+                    </options>
+                    <validator type="no_options" message="A built-in bed file is not available"/>
+                </param>
+            </when>
+            <when value="history">
+                <param name="bed_history" type="data" format="bed" label="Use the following dataset as reference bed " help="You can upload a bed file to the history and use it" optional="true" />
+            </when> 
+      </conditional>
+  </macro>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/covacs_macros.xml	Fri Nov 09 06:02:52 2018 -0500
@@ -0,0 +1,22 @@
+<macros>
+  <macro name="reference_loc">
+      <conditional name="reference_source">
+            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
+                <option value="cached">Use a built-in genome index</option>
+                <option value="history">Use a genome from history and build index</option>
+            </param>
+            <when value="cached">
+                <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list">
+                    <options from_data_table="covacs_gatk_indexes">
+                        <filter type="sort_by" column="2" />
+                        <validator type="no_options" message="No indexes are available" />
+                    </options>
+                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
+                </param>
+            </when>
+            <when value="history">
+                <param name="ref_file_h" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" />
+            </when> 
+      </conditional>
+  </macro>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/covacs_mpileup.xml	Fri Nov 09 06:02:52 2018 -0500
@@ -0,0 +1,76 @@
+ <tool id="covacs_mpileup" name="covacs_mpileup" version="1.9">
+  <description>samtools mpileup wrapper for covacs</description>
+  <macros>
+	<import>bed_macros.xml</import>
+	<import>covacs_macros.xml</import>
+  </macros>
+  <requirements>
+  	<requirement type="package" version="1.9" >samtools</requirement>
+  </requirements>
+  <command>
+    <![CDATA[
+
+
+       samtools mpileup 
+	 -C $adjust 
+	#if $bed_source.bed_source_selector == "history" and $bed_source.bed_history
+	  -l $bed_source.bed_history
+	  #end if
+  	  #if $bed_source.bed_source_selector == "cached"
+   	  -l $bed_source.bed_cached.fields.path
+    	 #end if
+
+	-d $depth
+	-q $MappingQuality
+	-Q $BaseQuality
+	#if $reference_source.reference_source_selector == "cached"
+                -f $reference_source.ref_file.fields.path
+        #end if
+	
+	#if $reference_source.reference_source_selector == "history"
+	
+         -f $reference_source.ref_file_h
+	
+	#end if
+
+	$input1 -A -o $output 2>$log
+
+	
+
+
+
+	]]>
+  </command>
+  <inputs>
+    <param format="bam" name="input1" label="bam-input" type="data" optional="true" />
+    <param name="adjust" type="integer" optional="true" value="50" help="adjust mapping quality"/>
+    <expand macro="bed_loc"/>
+    <param name="depth" type="integer" optional="true" value="100000" help="max per-file depth" />
+    <param name="MappingQuality" type="integer" optional="true" value="0" help="skip alignments with mapQ smaller than INT" />
+    <param name="BaseQuality" type="integer" optional="true" value="0" help="skip bases with baseQ/BAQ smaller than INT" />
+    <expand macro="reference_loc"/>
+  </inputs>
+  <outputs>
+    <data format="pileup" name="output" label="mpileup on ${on_string}"/>
+    <data format="txt" name="log" label="mpileup on ${on_string}:log"/>
+  </outputs>
+  <help>
+**more information** at http://www.htslib.org/doc/samtools-1.2.html
+
+**Implemented options** samtools mpileup
+  -B, --no-BAQ            disable BAQ (per-Base Alignment Quality)
+  -C, --adjust-MQ INT     adjust mapping quality; recommended:50, disable:0 [0]
+  -d, --max-depth INT     max per-file depth; avoids excessive memory usage [8000]
+  -f, --fasta-ref FILE    faidx indexed reference sequence file
+  -l, --positions FILE    skip unlisted positions (chr pos) or regions (BED)
+  -q, --min-MQ INT        skip alignments with mapQ smaller than INT [0]
+  -Q, --min-BQ INT        skip bases with baseQ/BAQ smaller than INT [13]
+**fixed option**
+  -A, --count-orphans     do not discard anomalous read pairs
+
+  </help>
+  <citations>
+        <citation type="doi">10.1186/s12864-018-4508-1</citation>
+  </citations>
+</tool>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/covacs_bed.loc.sample	Fri Nov 09 06:02:52 2018 -0500
@@ -0,0 +1,17 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory bed file for covacs sequences data files. You will need
+#to create these data files and then create a bed_loc.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The bed_loc.loc
+#file has this format (longer white space characters are TAB characters):
+#
+#<unique_id>   <dbkey>   <display_name>   <file_path>
+#
+#
+#Note that for backwards compatibility with workflows, the unique ID of
+#an entry must be the path that was in the original loc file, because that
+#is the value stored in the workflow for that parameter. That is why the
+#hg19 entry above looks odd. New genomes can be better-looking.
+#
+hg19	hg19	hg19-padded	/export/BED/S07084713_Padded.bed
+hgbed	hg19	hg19-bed-test	/export/BED/chr22.bed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/covacs_gatk_indexes.loc.sample	Fri Nov 09 06:02:52 2018 -0500
@@ -0,0 +1,36 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of all covacs wrapper that need a gatk reference. You will need
+#to create these data files and then create a covacs_gatk_indexes.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The covacs_gatk_indexes.loc
+#file has this format (longer white space characters are TAB characters):
+#
+#<unique_build_id>   <dbkey>   <display_name>   <file_path>
+#
+#So, for example, if you had phiX indexed stored in 
+#/depot/data2/galaxy/phiX/base/, 
+#then the bwa_index.loc entry would look like this:
+#
+#phiX174   phiX   phiX Pretty   /depot/data2/galaxy/phiX/base/phiX.fa
+#
+#and your /depot/data2/galaxy/phiX/base/ directory
+#would contain phiX.dict, phiX.fa.fai files.
+#
+#
+#Your covacs_gatk_indexes.loc file should include an entry per line for each
+#index set you have stored. The "file" in the path does not actually
+#exist, but it is the prefix for the actual index files.  For example:
+#
+#phiX174                                phiX    phiX174                 /depot/data2/galaxy/phiX/base/phiX.fa
+#hg18canon                              hg18    hg18 Canonical  /depot/data2/galaxy/hg18/base/hg18canon.fa
+#hg18full                               hg18    hg18 Full               /depot/data2/galaxy/hg18/base/hg18full.fa
+#/orig/path/hg19.fa             hg19    hg19                    /depot/data2/galaxy/hg19/base/hg19.fa
+#...etc...
+#
+#Note that for backwards compatibility with workflows, the unique ID of
+#an entry must be the path that was in the original loc file, because that
+#is the value stored in the workflow for that parameter. That is why the
+#hg19 entry above looks odd. New genomes can be better-looking.
+#
+hg38	hg38	hg38_GDC	/export/gatkhg38pl/GRCh38.d1.vd1.fa
+hg19	hg19	hg19	/export/gatk_hg19_index_bundle/ucsc.hg19.fasta
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Fri Nov 09 06:02:52 2018 -0500
@@ -0,0 +1,12 @@
+<tables>
+<!-- Location of bed-file for covacs -->
+    <table name="covacs_bed" comment_char="#">
+        <columns> value, dbkey, name, path</columns>
+        <file path="tool-data/covacs_bed.loc" />
+    </table>
+<!-- Location of index file  for covacs gatk wrapper -->
+    <table name="covacs_gatk_indexes" comment_char="#">
+        <columns> value, dbkey, name, path</columns>
+        <file path="tool-data/covacs_gatk_indexes.loc" />
+    </table>
+</tables>