diff crossmap_vcf.xml @ 1:a40d9af7d058 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/crossmap commit e365f2835488e73b870c73502c24ff23d28b76a5
author iuc
date Fri, 20 Oct 2017 02:51:15 -0400
parents 734eedede47c
children 7a3c34157901
line wrap: on
line diff
--- a/crossmap_vcf.xml	Tue Sep 26 05:45:41 2017 -0400
+++ b/crossmap_vcf.xml	Fri Oct 20 02:51:15 2017 -0400
@@ -8,70 +8,65 @@
     <expand macro="version_command"/>
 
     <command><![CDATA[
-        #set $input_file = str($seq_source.input)
+#set $input_file = str($seq_source.input)
 
-        CrossMap.py
-            vcf
+CrossMap.py vcf
 
-            #if $seq_source.index_source == "cached"
-                <!-- This is the 2nd dbkey, and the corresponding value has to be looked up -->
-                "${filter(lambda x: str( x[1] ) == str($chain_source.input_chain ), $__app__.tool_data_tables['liftOver'].get_fields())[0][2] }"
-            #else
-                "$chain_source.input_chain"
-            #end if
+#if $seq_source.index_source_s == "cached"
+    ## This is the 2nd dbkey, and the corresponding value has to be looked up
+    "${filter(lambda x: str( x[1] ) == str($chain_source.input_chain ), $__app__.tool_data_tables['liftOver'].get_fields())[0][2] }"
+#else
+    '${chain_source.input_chain}'
+#end if
 
-            '${input_file}'
-            '${seq_source.input_fasta}'
+'${input_file}'
+'${seq_source.input_fasta}'
 
-            '${output}'
+'${output}'
 
-            && mv "${output}.unmap" "$output_unmapped"
+&& mv '${output}.unmap' '$output_unmapped'
     ]]></command>
 
     <inputs>
         <conditional name="seq_source">
-            <expand macro="source" />
-
+            <param name="index_source_s" type="select" label="Source for Input Data">
+                <option value="cached">Local data (in galaxy)</option>
+                <option value="history">From History</option>
+            </param>
             <when value="cached">
-                <param type="data" format="vcf" name="input" label="VCF file">
+                <param name="input" type="data" format="vcf" label="VCF file">
+                    <!--
                     <validator type="unspecified_build"/>
+                    -->
                     <!-- Gives error in tests
                     <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build."/>
                     -->
                 </param>
-                <!-- automatically fetch a FASTA file from the same DBKEY as the chain file -->
                 <param name="input_fasta" type="select" label="Lift Over To (FASTA file)" help="The FASTA file must be on the same build (dbkey) as the LiftOver chain file">
-                    <options from_file="all_fasta.loc">
-                        <column name="name" index="2"/>
-                        <column name="value" index="3"/>
-                        <column name="dbkey" index="1"/>
-                        <filter type="param_value" ref="input_chain" column="1"/>
-                    </options>
+                    <options from_data_table="all_fasta"/>
                 </param>
             </when>
 
             <when value="history">
-                <param type="data" format="vcf"   name="input" label="VCF file"/>
-                <param type="data" format="fasta" name="input_fasta" multiple="false" label="Full genome FASTA file"/>
+                <param name="input" type="data" format="vcf" label="VCF file"/>
+                <param name="input_fasta" type="data" format="fasta" label="Full genome FASTA file"/>
             </when>
         </conditional>
         <expand macro="chain" />
-
     </inputs>
 
     <outputs>
-        <data format="vcf" name="output" label="${tool.name} on ${on_string}" />
-        <data format="vcf" name="output_unmapped" label="${tool.name} (unmapped) on ${on_string}" />
+        <data name="output" format="vcf" label="${tool.name} on ${on_string}" />
+        <data name="output_unmapped" format="vcf" label="${tool.name} (unmapped) on ${on_string}" />
     </outputs>
 
     <tests>
-    <!-- VCF -->
         <test>
-            <param name="index_source" value="history_all"/>
+            <param name="index_source_s" value="history"/>
             <param name="input" value="test_vcf_01_input.vcf" ftype="vcf"/>
-            <param name="input_chain" value="test_vcf_01.over.chain" ftype="csv"/>
+            <param name="index_source" value="history"/>
             <param name="input_fasta" value="test_vcf_01.fasta" ftype="fasta"/>
-            <param name="include_fails" value="False"/>
+            <param name="input_chain" value="test_vcf_01.over.chain" ftype="csv"/>
 
             <output name="output">
                 <assert_contents>
@@ -93,25 +88,24 @@
 VCF
 ---
 
-    VCF (variant call format) is a flexible and extendable line-oriented
-    text format developed by the 1000 Genome Project. It is useful for
-    representing single nucleotide variants, indels, copy number
-    variants, and structural variants. Chromosomes, coordinates, and
-    reference alleles are updated to a new assembly, and all the other
-    fields are not changed.
+VCF (variant call format) is a flexible and extendable line-oriented
+text format developed by the 1000 Genome Project. It is useful for
+representing single nucleotide variants, indels, copy number
+variants, and structural variants. Chromosomes, coordinates, and
+reference alleles are updated to a new assembly, and all the other
+fields are not changed.
 
-    NOTE:
+Notes:
 
-    - Genome coordinates and reference allele will be updated to target assembly.
-    - Reference genome is genome sequence of target assembly.
-    - If the reference genome sequence file (../database/genome/hg18.fa) was
-      not indexed, CrossMap will automatically indexed it (only the first time
-      you run CrossMap).
-    - In the output VCF file, whether the chromosome IDs contain “chr” or not
-      depends on the format of the input VCF file.
+- Genome coordinates and reference allele will be updated to target assembly.
+- Reference genome is genome sequence of target assembly.
+- If the reference genome sequence file (../database/genome/hg18.fa) was
+  not indexed, CrossMap will automatically indexed it (only the first time
+  you run CrossMap).
+- In the output VCF file, whether the chromosome IDs contain “chr” or not
+  depends on the format of the input VCF file.
 
-Please see `the manual <http://crossmap.sourceforge.net/#convert-vcf-format-files>`__ for more details
-]]></help>
+    ]]></help>
 
     <citations>
         <citation type="doi">10.1093/bioinformatics/btt730</citation>