diff freebayes.xml @ 32:8a7a42541080 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/freebayes commit cce7fcdd5e8ba8636c751f9f974bf07a6845ba1c"
author iuc
date Wed, 01 Dec 2021 21:50:06 +0000
parents 57def2d7c093
children 04fa42777df9
line wrap: on
line diff
--- a/freebayes.xml	Sat Nov 27 09:38:13 2021 +0000
+++ b/freebayes.xml	Wed Dec 01 21:50:06 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="freebayes" name="FreeBayes" version="@TOOL_VERSION@+galaxy1">
+<tool id="freebayes" name="FreeBayes" version="@TOOL_VERSION@+galaxy0">
     <description>bayesian genetic variant detector</description>
     <xrefs>
         <xref type="bio.tools">freebayes</xref>
@@ -7,8 +7,8 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements">
-        <requirement type="package" version="4.1.3">gawk</requirement>
-        <requirement type="package" version="20170422">parallel</requirement>
+        <requirement type="package" version="5.1.0">gawk</requirement>
+        <requirement type="package" version="20211022">parallel</requirement>
     </expand>
     <command detect_errors="exit_code"><![CDATA[
     ##set up input files
@@ -29,8 +29,13 @@
     #end if
 
     #for $bam_count, $input_bam in enumerate( $input_bamfiles ):
-        ln -s -f '${input_bam}' 'b_${bam_count}.bam' &&
-        ln -s -f '${input_bam.metadata.bam_index}' 'b_${bam_count}.bam.bai' &&
+        #if $input_bam.ext == 'bam':
+            ln -s -f '${input_bam}' 'b_${bam_count}.bam' &&
+            ln -s -f '${input_bam.metadata.bam_index}' 'b_${bam_count}.bam.bai' &&
+        #elif $input_bam.ext == 'cram':
+            ln -s -f '${input_bam}' 'b_${bam_count}.cram' &&
+            ln -s -f '${input_bam.metadata.cram_index}' 'b_${bam_count}.cram.crai' &&
+        #end if
     #end for
 
     ## Tabixize optional input_variant_vcf file (for --variant-input option)
@@ -47,7 +52,7 @@
     #else
         ##divide up the regions in the bam file for efficient processing
         #for $bam_count, $input_bam in enumerate( $input_bamfiles ):
-            samtools view -H b_${bam_count}.bam |
+            samtools view -H b_${bam_count}.${input_bam.ext}|
             grep '^@SQ' |
             cut -f 2- |
             awk '{ gsub("^SN:","",$1); gsub("^LN:","",$2); print $1"\t0\t"$2; }' >> regions_all.bed &&
@@ -73,7 +78,7 @@
         --region '\$i'
 
         #for $bam_count, $input_bam in enumerate( $input_bamfiles ):
-            --bam 'b_${bam_count}.bam'
+            --bam 'b_${bam_count}.${input_bam.ext}'
         #end for
         --fasta-reference '${reference_fasta_filename}'
 
@@ -135,6 +140,7 @@
                 #if $options_type.optional_inputs.contamination_estimates:
                     --contamination-estimates '${options_type.optional_inputs.contamination_estimates}'
                 #end if
+                $options_type.optional_inputs.trim_complex_tail
             #end if
 
         ## REPORTING
@@ -332,7 +338,7 @@
 
                 <conditional name="optional_inputs">
                     <param name="optional_inputs_selector" type="select" label="Additional inputs"
-                           help="Sets --samples, --populations, --cnv-map, --trace, --failed-alleles, --variant-input, --only-use-input-alleles, --haplotype-basis-alleles, --report-all-haplotype-alleles, --report-monomorphic options, --observation-bias, and --contamination-estimates">
+                           help="Sets --samples, --populations, --cnv-map, --trace, --failed-alleles, --variant-input, --only-use-input-alleles, --haplotype-basis-alleles, --report-all-haplotype-alleles, --report-monomorphic options, --observation-bias, --contamination-estimates and --trim-complex-tail">
                         <option value="do_not_set" selected="true">Do not provide additional inputs</option>
                         <option value="set">Provide additional inputs</option>
                     </param>
@@ -375,6 +381,8 @@
                         <param name="contamination_estimates" argument="--contamination-estimates" type="data" format="tabular" optional="true"
                                label="Upload per-sample estimates of contamination from"
                                help="The format should be: sample p(read=R|genotype=AR) p(read=A|genotype=AA) Sample '*' can be used to set default contamination estimates" />
+                        <param name="trim_complex_tail" argument="--trim-complex-tail" type="boolean" truevalue="--trim-complex-tail" falsevalue=""
+                               label="Trim trailing reference matches" />
                     </when>
                     <when value="do_not_set" />
                 </conditional>
@@ -649,6 +657,7 @@
             <param name="options_type_selector" value="full"/>
             <param name="population_model_selector" value="set"/>
             <param name="P" value="1"/>
+            <param name="trim_complex_tail" value="--trim-complex-tail"/>
             <output name="output_vcf" file="freebayes-phix174-test4.vcf" lines_diff="4" />
         </test>
         <test>
@@ -681,6 +690,14 @@
             <param name="skip_coverage" value="100" />
             <output name="output_vcf" file="freebayes-hxb2-test7.vcf" lines_diff="4" />
         </test>
+        <test> <!-- Test with CRAM -->
+            <param name="reference_source_selector" value="history" />
+            <param name="processmode" value="individual" />
+            <param name="ref_file" ftype="fasta" value="freebayes-phix174.fasta"/>
+            <param name="input_bams" ftype="cram" value="freebayes-phix174.cram"/>
+            <param name="options_type_selector" value="simple"/>
+            <output name="output_vcf" file="freebayes-phix174-test1.vcf" lines_diff="4" />
+        </test>
     </tests>
     <help><![CDATA[
 **What it does**