changeset 1:fa1aae53a2f3 draft

planemo upload for repository https://github.com/cdeanj/galaxytools/tree/master/tools/gene_fraction commit b9f62f2ab10f5ff1c56edb895323820df36bdd0e-dirty
author chrisd
date Tue, 28 Jun 2016 23:31:46 -0400
parents 72901052a829
children ec439b0e7512
files coverage_sampler.xml gene_fraction.xml test-data/csa_no_result test-data/csa_result test-data/ref.fa test-data/sampe.sam tool_dependencies.xml
diffstat 7 files changed, 108 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/coverage_sampler.xml	Tue Jun 28 23:31:46 2016 -0400
@@ -0,0 +1,80 @@
+<tool id="gene_fraction" name="Coverage Sampler" version="0.1.0">
+    <description>A simple tool for calculating the amount of a gene that is covered by a sample of alignments</description>
+    <requirements>
+	<requirement type="package" version="0.1">csa</requirement>
+    </requirements>
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    <command><![CDATA[
+	csa
+	  -ref_fp $reference
+	  -sam_fp $sam
+	  -min $min
+	  -max $max
+	  -t $threshold
+	  -skip $skip
+	  -samples $samples
+	  -out_fp $output
+    ]]></command>
+    <inputs>
+	<param type="data" name="reference" format="fasta" label="Reference sequence" />
+	<param type="data" name="sam" format="sam" label="SAM file" />
+	<param name="min" type="integer" label="Starting sample level"
+	       value="1" min="1" max="100" help="(-min)" />
+	<param name="max" type="integer" label="Ending sample level"
+	       value="1" min="1" max="100" help="(-max)" />
+	<param name="threshold" type="integer" label="Gene fraction threshold"
+	       value="0" min="0" max="100" help="(-t)" />
+	<param name="skip" type="integer" label="Amount of sample levels to skip"
+	       value="1" min="1" max="100" help="(-skip)" />
+	<param name="samples" type="integer" label="Iterations per sample level"
+	       value="1" min="1" max="100" help="(-samples)" />
+    </inputs>
+    <outputs>
+	<data name="output" format="tabular" />
+    </outputs>
+    <tests>
+      <test>
+          <param name="reference" value="ref.fa"/>
+      	  <param name="sam" value="sampe.sam"/>
+	  <param name="min" value="100"/>
+	  <param name="max" value="100"/>
+	  <param name="threshold" value="50"/>
+	  <param name="skip" value="5"/>
+	  <param name="samples" value="1"/>
+      	  <output name="output" file="csa_result" ftype="tabular"/>
+      </test>
+      <test>
+	  <param name="reference" value="ref.fa"/>
+          <param name="sam" value="sampe.sam"/>
+          <param name="min" value="100"/>
+          <param name="max" value="100"/>
+          <param name="threshold" value="80"/>
+          <param name="skip" value="5"/>
+          <param name="samples" value="1"/>
+          <output name="output" file="csa_no_result" ftype="tabular"/>
+      </test>
+    </tests>
+    <help><![CDATA[
+A simple tool for calculating the amount of a gene that is covered by a sample of alignments.
+
+Program: Coverage Sampler
+
+Contact: Chris Dean <cdean11@rams.colostate.edu>
+
+Usage: csa [options]
+
+Options:
+    -ref_fp    STR/FILE	    	ref file path
+    -sam_fp    STR/FILE	    	sam file path
+    -min       INT      		starting sample level
+    -max       INT	        	ending sample level
+    -skip      INT	        	amount of sample levels to skip
+    -t         INT	        	gene fraction threshold
+    -samples   INT	        	iterations per sample level
+    -out_fp    STR/FILE	    	output file path
+    ]]></help>
+    <citations>
+    </citations>
+</tool>
--- a/gene_fraction.xml	Wed Mar 23 17:54:53 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-<tool id="gene_fraction" name="Coverage Sampler" version="0.1.0">
-    <requirements>
-	<requirement type="package" version="0.1">csa</requirement>
-    </requirements>
-    <stdio>
-        <exit_code range="1:" />
-    </stdio>
-    <description>Calculates the amount of a gene that is covered from a sample of reads</description>
-    <command><![CDATA[
-	csa
-	  -amr_fp $input1
-	  -sam_fp $input2
-	  -min $min
-	  -max $max
-	  -t $threshold
-	  -skip $skip
-	  -samples $samples
-	  -out_fp $output1
-    ]]></command>
-    <inputs>
-	<param type="data" name="input1" format="fasta" label="Reference sequence" />
-	<param type="data" name="input2" format="sam" label="SAM file" />
-	<param name="min" type="integer" label="Starting sample level"
-	       value="1" min="1" max="100" help="(-min)" />
-	<param name="max" type="integer" label="Ending sample level"
-	       value="1" min="1" max="100" help="(-max)" />
-	<param name="threshold" type="integer" label="Gene threshold"
-	       value="0" min="0" max="100" help="(-t)" />
-	<param name="skip" type="integer" label="Amount of levels to skip"
-	       value="1" min="1" max="100" help="(-skip)" />
-	<param name="samples" type="integer" label="Amount of samples per level"
-	       value="1" min="1" max="100" help="(-samples)" />
-    </inputs>
-    <outputs>
-	<data name="output1" format="tabular" />
-    </outputs>
-    <tests>
-      <test>
-      <param name="input1" value="ref.fa"/>
-      <param name="input2" value="test.sam"/>
-      <output name="outfil1" file="out.txt"/>
-      </test>
-    </tests>
-    <help><![CDATA[
-This program takes iterative samples from a SAM file with the goal of identifying the amount of a gene that is covered by a sample of reads.
-        
-Program: Coverage Sampler
-
-Contact: Chris Dean <cdean11@rams.colostate.edu>
-
-Usage: csa [options]
-
-Options:
-    -amr_fp    amr database path
-    -sam_fp    sam file path
-    -min       starting level
-    -max       ending level
-    -skip      amount of levels to skip
-    -t         gene fraction threshold
-    -samples   amount of samples per level
-    -out_fp    output file path
-    ]]></help>
-</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/csa_no_result	Tue Jun 28 23:31:46 2016 -0400
@@ -0,0 +1,1 @@
+Level	Iteration	Gene Id	Gene Fraction	Hits
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/csa_result	Tue Jun 28 23:31:46 2016 -0400
@@ -0,0 +1,2 @@
+Level	Iteration	Gene Id	Gene Fraction	Hits
+100	1	chr2:172936693-172938111	59.6615	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ref.fa	Tue Jun 28 23:31:46 2016 -0400
@@ -0,0 +1,2 @@
+>chr2:172936693-172938111
+TTATGGCTTTAAAAATATTGTAACAGTGTCTGAATCAAACTTTAGTAAAATCTCTTTGGGTTATATCTGAGAAGCTTTTATTGAAGACTTTGAACAAAATTGTGTTTTTGACAGTTTTAAATTATAGGCTAACTAGCCTGGGAAAAAAGGATAGTGTCTCTCTGTTCTTTCATAGGAAATGTTGAATCAGACCCCTACTGGGAAAAGAAATTTAATGCATATCTCACTATCTTACTGTCCATGAATATAATAGAAATGAATTCAAAATGCAGTTTTATTTTTGCAAATGGGATGAGTCGATAGATGCACCTCATATTTTTGAACACCTAGGGTTCAACAAATTTACTGGTGGTGCTCTTGCATTTTAACAAAATTTATTCTTCAGTAGAAGGGGGCAGAGAACACTAGATTCTTATTCAAGCATTCTATCGAGCTCTGCATTCATGGCTGTGTCTAAAGGGCATGTCAGCCTTTGATTCTCTCTGAGAGGTAATTATCCTTTTCCTGTCACGGAACAACAAATGATAGCTAACTACAGAGGCACATTTGCAGTAGTCACATTCATCAACTGCAGAAAAAAAAATTCAATTTAATTGTGCAACACAGCTGCACATGGGCTTTTGAGCATTTCTGTTGTTCTCCCTGTCTCGCTATTCCTCCCTCCAGATCTATTTTTTAAACTTTTTTTCTGGTTATTTTTTCCCCTTTTTGTCTCTTCTTCCATTTTTACTCTCTGTACTTTCTTGTTAAAGTAATTTTCCTTTGTGGCTCTCATTCTTTTTCCCCCATTGAAGGCTATGAATGTAGAAAATTATCACAATTACTCATATAATTGAGCCTCTTTGTAGCAAGTGCAACTCCAGTAGCCTTTCTCCATCATGAAAATGGTTTCATTATAGGGTTTTTCATATTCTCTGACACCATCTACACAGAGGAACAGGCGTGCAGATGAGATGTGCTAGGAACAGGCTAGATCAGTAAGGTCACAGTAGGAATAATTAGCTCTGCTATGGAAAGAGCATCTAGGCCTTTTACTGCTACATAAATGTACTGTCCATGGCTTTTAGTCACAAAAAAAACTTACTAACAAATGGAGCTCCCGCCTACTACTTTGAAAAAAAGATTTGTATCAACACTACAATTTTCCATCATTAAGACTAATAACACAGAGCCTAGTATACATCAAGGGGAATAAAAAGAAAAATCTCACATTCAAGTGGCGGCTGGGTGCTGACCTTTGTTCCCTTTTTTTGTGTACGACTTAACTCTTTACAAAAAAGAGCCACACGCCACACCAACATGCAGGTGAACTCCAGCTAGTACTAGCAAAGCATAGCATTCAGTTGGAAAATTTGATAAATCTCCATGCAGGATAATGCATTTCATTACATATTCACTACATTAATTCTAGCTACATT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sampe.sam	Tue Jun 28 23:31:46 2016 -0400
@@ -0,0 +1,22 @@
+@SQ	SN:chr2:172936693-172938111	LN:1418
+@PG	ID:bwa	PN:bwa	VN:0.7.12-r1039	CL:bwa sampe ref.fa forward.sai reverse.sai lane1.fq lane2.fq
+chr2:172936693-172938111_82_621_1:0:0_0:0:0_0	81	chr2:172936693-172938111	552	37	70M	=	82	-540	GTAGTCACATTCATCAACTGCAGAAAAAAAAATTCAATTTAATTGTGCAACACAGCTGCACATGGGCTTT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
+chr2:172936693-172938111_82_621_1:0:0_0:0:0_0	161	chr2:172936693-172938111	82	37	70M	=	552	540	TGAAGACTTTGAACCAAATTGTGTTTTTGACAGTTTTAAATTATAGGCTAACTAGCCTGGGAAAAAAGGA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:1	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:1	XO:i:0	XG:i:0	MD:Z:14A55
+chr2:172936693-172938111_127_617_0:0:0_2:0:0_1	99	chr2:172936693-172938111	127	60	70M	=	548	491	GGCTAACTAGCCTGGGAAAAAAGGATAGTGTCTCTCTGTTCTTTCATAGGAAATGTTGAATCAGACCCCT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
+chr2:172936693-172938111_127_617_0:0:0_2:0:0_1	147	chr2:172936693-172938111	548	60	70M	=	127	-491	TGCAGTAGTCACATTCATCAACTGCAGAAAAAAAAATTCAAGTTAATGGTGCAACACAGCTGCACATGGG	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:2	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:2	XO:i:0	XG:i:0	MD:Z:41T5T22
+chr2:172936693-172938111_695_1174_2:0:0_0:0:0_2	83	chr2:172936693-172938111	1105	60	70M	=	695	-480	TACTACTTTGAAAAAAAGATTTGTATCAACACTACAATTTTCCATCATTAAGACTAATAACACAGAGCCT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
+chr2:172936693-172938111_695_1174_2:0:0_0:0:0_2	163	chr2:172936693-172938111	695	60	70M	=	1105	480	ATTTTTTCCCCTTTTTGTCTGTTCTTCCATTTTTACTCTCTGTACTTTCTTGTAAAAGTAATTTTCCTTT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:2	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:2	XO:i:0	XG:i:0	MD:Z:20C32T16
+chr2:172936693-172938111_675_1201_1:0:0_1:0:0_3	97	chr2:172936693-172938111	675	37	70M	=	1132	527	TTTAAACTTTTTTTCTGGTTATTTTTTCCCCTTTTTGTCTCTTCTTCCATTTTTACTCTCTGTACTTTGT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:1	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:1	XO:i:0	XG:i:0	MD:Z:68C1
+chr2:172936693-172938111_675_1201_1:0:0_1:0:0_3	145	chr2:172936693-172938111	1132	37	70M	=	675	-527	AACACTACAATTTTCCATCTTTAAGACTAATAACACAGAGCCTAGTATACATCAAGGGGAATAAAAAGAA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:1	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:1	XO:i:0	XG:i:0	MD:Z:19A50
+chr2:172936693-172938111_133_602_2:0:0_0:0:0_4	99	chr2:172936693-172938111	133	60	70M	=	533	470	CTCGCGTGGGAAAAAAGGATAGTGTCTCTCTGTTCTTTCATAGGAAATGTTGAATCAGACCCCTACTGGG	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:2	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:2	XO:i:0	XG:i:0	MD:Z:2A2C64
+chr2:172936693-172938111_133_602_2:0:0_0:0:0_4	147	chr2:172936693-172938111	533	60	70M	=	133	-470	CTACAGAGGCACATTTGCAGTAGTCACATTCATCAACTGCAGAAAAAAAAATTCAATTTAATTGTGCAAC	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
+chr2:172936693-172938111_268_735_1:0:0_1:0:0_5	83	chr2:172936693-172938111	666	60	70M	=	268	-468	CATCTATTTTTTAAACTTTTTTTCTGGTTATTTTTTCCCCTTTTTGTCTCTTCTTCCATTTTTACTCTCT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:1	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:1	XO:i:0	XG:i:0	MD:Z:0G69
+chr2:172936693-172938111_268_735_1:0:0_1:0:0_5	163	chr2:172936693-172938111	268	60	70M	=	666	468	TGCAGATTTATTTTTGCAAATGGGATGAGTCGATAGATGCACCTCATATTTTTGAACACCTAGGGTTCAA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:1	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:1	XO:i:0	XG:i:0	MD:Z:5T64
+chr2:172936693-172938111_380_811_2:0:0_1:0:0_6	99	chr2:172936693-172938111	380	60	70M	=	742	432	CTTCAGTAGAAGGGGGCAGAGAACACTAGCTTCTTCTTCAAGCATTCTATCGAGCTCTGCATTCATGGCT	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:2	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:2	XO:i:0	XG:i:0	MD:Z:29A5A34
+chr2:172936693-172938111_380_811_2:0:0_1:0:0_6	147	chr2:172936693-172938111	742	60	70M	=	380	-432	TCTTGTTAAAGTAATTTTCCTTTGTGGCTCTCATTCTTTTTCCCCCATTGAAGGCTAGGAATGTAGAAAA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:1	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:1	XO:i:0	XG:i:0	MD:Z:57T12
+chr2:172936693-172938111_440_981_0:0:0_0:0:0_7	81	chr2:172936693-172938111	912	37	70M	=	440	-542	TCTCTGACACCATCTACACAGAGGAACAGGCGTGCAGATGAGATGTGCTAGGAACAGGCTAGATCAGTAA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
+chr2:172936693-172938111_440_981_0:0:0_0:0:0_7	161	chr2:172936693-172938111	440	37	70M	=	912	542	ATTCATGGCTGTGTCTAAAGGGCATGTCAGCCTTTGATTCTCTCTGAGAGGTAATTATCCTTTTCCTGTC	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
+chr2:172936693-172938111_59_532_2:0:0_2:0:0_8	83	chr2:172936693-172938111	463	60	70M	=	59	-474	ATGGCAGCCTTTGATTCTCTCTGAGAGGTAATTTTCCTTTTCCTGTCACGGAACAACAAATGATAGCTAA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:2	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:2	XO:i:0	XG:i:0	MD:Z:3T29A36
+chr2:172936693-172938111_59_532_2:0:0_2:0:0_8	163	chr2:172936693-172938111	59	60	70M	=	463	474	GGTTATATCTGAGAAGCTTTTATTGAAGACTTTGAACAAAATTGTGTTTTTGACAGTTTTCAATTATCGG	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:2	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:2	XO:i:0	XG:i:0	MD:Z:60A6A2
+chr2:172936693-172938111_642_1121_0:0:0_3:0:0_9	83	chr2:172936693-172938111	1052	60	70M	=	642	-480	GGTCCATGGCTTTTAGTCACAAAAAAAACTTAATAACAAATGGAGCTCCCCCCTACTACTTTGAAAAAAA	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:3	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:3	XO:i:0	XG:i:0	MD:Z:0T31C17G19
+chr2:172936693-172938111_642_1121_0:0:0_3:0:0_9	163	chr2:172936693-172938111	642	60	70M	=	1052	480	CCTGTCTCGCTATTCCTCCCTCCAGATCTATTTTTTAAACTTTTTTTCTGGTTATTTTTTCCCCTTTTTG	2222222222222222222222222222222222222222222222222222222222222222222222	XT:A:U	NM:i:0	SM:i:37	AM:i:37	X0:i:1	X1:i:0	XM:i:0	XO:i:0	XG:i:0	MD:Z:70
--- a/tool_dependencies.xml	Wed Mar 23 17:54:53 2016 -0400
+++ b/tool_dependencies.xml	Tue Jun 28 23:31:46 2016 -0400
@@ -3,7 +3,7 @@
     <package name="csa" version="0.1">
         <install version="1.0">
             <actions>
-                <action type="shell_command">git clone --recursive https://github.com/ChrisD11/csa.git</action>
+                <action type="shell_command">git clone --recursive https://github.com/cdeanj/coverage_sampler.git</action>
                 <action type="shell_command">make</action>
                 <action type="move_file">
                     <source>csa</source>