diff allegro.xml @ 0:8c29e3621475 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/allegro/ commit 458d9276671695befc9ca85c4d355725ef36b831
author iuc
date Sat, 09 Dec 2017 06:39:42 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/allegro.xml	Sat Dec 09 06:39:42 2017 -0500
@@ -0,0 +1,272 @@
+<tool id="allegro" name="Allegro" version="@VER@.0" >
+    <description>Linkage and Haplotype analysis</description>
+    <macros>
+        <token name="@VER@">2</token>
+        <xml name="macro_inputs" >
+            <param name="inp_ped" value="pedin.21" />
+            <param name="inp_dat" value="datain.21" />
+            <param name="inp_map" value="map.21" />
+        </xml>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@VER@">allegro</requirement>
+    </requirements>
+    <version_command><![CDATA[
+    allegro 2>&1 | head -1 | awk -F' ' '{print $2}'
+    ]]>
+    </version_command>
+    <command detect_errors='exit_code'>allegro $allegro_conf</command>
+
+    <configfiles>
+        <configfile name="allegro_conf" ><![CDATA[
+PREFILE $inp_ped
+DATFILE $inp_dat
+#if $inp_map
+MAPFILE $inp_map
+#end if
+
+#if $cond_haplotypes.opt_haplotypes == 'yes'
+HAPLOTYPE haplo.out ${out_ihaplo} ${out_founder} inher.out
+        #if $cond_haplotypes.opt_crossover
+CROSSOVERRATE combined.out ${out_combined_cross}
+        #end if
+#elif $cond_haplotypes.opt_haplotypes.value == 'no'
+    #if $cond_haplotypes.section_linkage.cond_linktype.extra_linkage_type.value == 'defaults'
+MODEL $cond_haplotypes.section_linkage.extra_linkage_mptspt.value par ${opt_xlinked} het param.mpt ${out_fparam}
+
+    #elif $cond_haplotypes.section_linkage.cond_linktype.extra_linkage_type.value == 'allele_sharing'
+MODEL $cond_haplotypes.section_linkage.extra_linkage_mptspt.value $cond_haplotypes.section_linkage.cond_linktype.extra_linkage_linexp.value $cond_haplotypes.section_linkage.cond_linktype.extra_linkage_scoring.value $cond_haplotypes.section_linkage.cond_linktype.extra_weighting.value param.mpt ${out_linexp}
+ 
+    #elif $cond_haplotypes.section_linkage.cond_linktype.extra_linkage_type.value == 'classical'
+        #if $cond_haplotypes.section_linkage.cond_linktype.cond_customfreqs.opt_custom_freqs.value == 'yes'
+MODEL $cond_haplotypes.section_linkage.extra_linkage_mptspt.value par $opt_xlinked} freq:$cond_haplotypes.section_linkage.cond_linktype.cond_customfreqs.extra_linkage_par_freq pen:$cond_haplotypes.section_linkage.cond_linktype.cond_customfreqs.extra_linkage_par_pen $cond_haplotypes.section_linkage.cond_linktype.extra_linkage_par_het param.mpt ${out_fparam}
+        #end if
+    #end if
+
+    #if $cond_haplotypes.section_linkage.cond_steps.extra_steps_type.value == 'STEPS'
+STEPS $cond_haplotypes.section_linkage.cond_steps.extra_steps
+    #elif $cond_haplotypes.section_linkage.cond_steps.extra_steps_type.value == 'STEPFILE'
+STEPFILE $cond_haplotypes.section_linkage.cond_steps.inp_stepfile
+    #elif $cond_haplotypes.section_linkage.cond_steps.extra_steps_type.value == 'MAXSTEPLENGTH'
+MAXSTEPLENGTH $cond_haplotypes.section_linkage.cond_steps.extra_maxstep
+    #end if
+#end if
+
+#if $opt_xlinked.value == 'X'
+SEXSPECIFIC on
+#end if
+
+ENTROPY ${opt_entropy}
+NPLEXACTP ${opt_nplexactp}
+
+#if $cond_pairwise.opt_pairwise.value == 'yes'
+PAIRWISEIBD $cond_haplotypes.section_linkage.extra_linkage_mptspt.value $cond_pairwise.extra_pairwise_type.value
+#end if
+
+
+#if $cond_sim.opt_sim.value == 'yes'
+SIMULATE $cond_sim.extra_sim_dloc $cond_sim.extra_sim_npre $cond_sim.extra_sim_rep $cond_sim.extra_sim_err $cond_sim.extra_sim_yield $cond_sim.extra_sim_het
+#end if
+
+MAXMEMORY 102400
+UNIT $opt_unit
+
+UNINFORMATIVE
+
+
+]]>
+        </configfile>
+    </configfiles>
+
+    <inputs>
+        <param name="inp_ped" type="data" format="linkage_pedin" label="Pedigree" />
+        <param name="inp_dat" type="data" format="linkage_recomb" label="Recombination Freqs." />
+        <param name="inp_map" type="data" format="linkage_map" label="Marker Positions" optional="true" />
+
+        <conditional name="cond_haplotypes" >
+            <param name="opt_haplotypes" type="select" label="Use Haplotypes?" >
+                <option value="yes" >Yes</option>
+                <option value="no" selected="true" >No</option>
+            </param>
+
+            <when value="yes" >
+                <param name="opt_crossover" type="boolean" value="false" label="Show crossover rate" />
+            </when>
+            <when value="no" >
+                <section name="section_linkage" title="Linkage" expanded="true" >
+                    <param name="extra_linkage_mptspt" type="select" label="Use multipoint IBD sharing probabilities, instead of single point" >
+                        <option value="mpt" selected="true" >mpt</option>
+                        <option value="spt" >spt</option>
+                    </param>
+
+                    <conditional name="cond_linktype" >
+                        <param name="extra_linkage_type" type="select" label="Type of analysis" >
+                            <option value="defaults" selected="true" >Defaults</option>
+                            <option value="allele_sharing" >Allele Sharing</option>
+                            <option value="classical" >Classical</option>
+                        </param>
+
+                        <when value="defaults" />
+
+                        <when value="allele_sharing">
+                            <param name="extra_linkage_linexp" type="select" label="Linear or Exponential" >
+                                <option value="lin" >Linear</option>
+                                <option value="exp" >Exponential</option>
+                            </param>
+                            <param name="extra_linkage_scoring" type="select" label="Scoring function" >
+                                <option value="pairs">Pairs</option>
+                                <option value="all">All</option>
+                                <option value="homoz">Homozygous</option>
+                                <option value="mnallele">MNAllele</option>
+                                <option value="robdom">RobDom</option>
+                                <option value="ps:mm/mf/ff">PS:MM/MF/FF</option>
+                            </param>
+
+                            <param name="extra_weighting" type="select" label="Weighting function" >
+                                <option value="equal">Equal</option>
+                                <option value="power:0.5">Power</option>
+                            </param>
+                        </when>
+
+                        <when value="classical" >
+                            <conditional name="cond_customfreqs" >
+                                <param name="opt_custom_freqs" type="select" label="Use custom frequencies instead of datafile" >
+                                    <option value="yes" >Yes</option>
+                                    <option value="no" selected="true" >No</option>
+                                </param>
+                                <when value="no" />
+                                <when value="yes" >
+                                    <param name="extra_linkage_par_freq" type="float" value="0" min="0" max="1" label="Frequency" />
+                                    <param name="extra_linkage_par_pen" type="text" value="p0/p1/p2" label="Penetrance" />
+                                </when>
+                            </conditional>
+                            <param name="extra_linkage_par_het" type="float" value="" label="HET Frequency (leave blank for dynamic)" />
+                        </when>
+                    </conditional>
+
+                    <conditional name="cond_steps" >
+                        <param name="extra_steps_type" type="select" label="Step Type" >
+                            <option value="STEPS">Calculations between adjacent markers</option>
+                            <option value="STEPFILE">Calculations at positions set in file</option>
+                            <option value="MAXSTEPLENGTH">Calculations at periodic (cM) intervals</option>
+                        </param>
+                        <when value="STEPS">
+                            <param name="extra_steps" type="integer" min="1" value="2" label="# Steps" />
+                        </when>
+                        <when value="STEPFILE">
+                            <param name="inp_stepfile" type="data" format="txt" label="Step file" />
+                        </when>
+                        <when value="MAXSTEPLENGTH">
+                            <param name="extra_maxstep" type="float" min="1" value="2" label="cM" />
+                        </when>
+                    </conditional>
+                </section>
+            </when>
+        </conditional>
+
+        <param name="opt_xlinked" type="select" label="Disease model" >
+            <option value="">Autosomal</option>
+            <option value="X">X-Linked</option>
+        </param>
+
+        <param name="opt_entropy" type="boolean" truevalue="on" falsevalue="off" checked="false" label="Entropy" />
+        <param name="opt_nplexactp" type="boolean" truevalue="on" falsevalue="off" checked="false" label="Use exact P-values" />
+
+        <conditional name="cond_pairwise" >
+            <param name="opt_pairwise" type="select" label="Perform Pairwise Analysis?" >
+                <option value="yes" >Yes</option>
+                <option value="no" selected="true" >No</option>
+            </param>
+
+            <when value="no"/>
+            <when value="yes" >
+                <param name="extra_pairwise_type" type="select" label="Weighting" >
+                    <option value="all">All</option>
+                    <option value="genotype">Genotype</option>
+                    <option value="affected">Affected</option>
+                    <option value="informative">Informative</option>
+                </param>
+            </when>
+        </conditional>
+
+        <conditional name="cond_sim" >
+            <param name="opt_sim" type="select" label="Simulate multipoint data?" >
+                <option value="yes" >Yes</option>
+                <option value="no" selected="true" >No</option>
+            </param>
+            <when value="no" />
+            <when value="yes" >
+                <param name="extra_sim_dloc" type="float" value="" min="0" label="Disease Locus (cM). Leave blank for unlinked disease locus." />
+                <param name="extra_sim_npre" type="integer" value="1" label="Number of prefiles to generate" />
+                <param name="extra_sim_rep" type="integer" value="1" label="How many times to repeat family pattern" />
+                <param name="extra_sim_err" type="float" value="0" min="0" label="Error Rate" />
+                <param name="extra_sim_yield" type="float" value="1" label="Genotype Yield" />
+                <param name="extra_sim_het" type="float" value="0" label="HET probability" />
+            </when>
+        </conditional>
+        <param name="opt_sexspecific" type="boolean" truevalue="on" falsevalue="off" value="false" label="Use Sex-Specific Penetrances (specified in data file)" help="Note that you will need to include sex-specific penetrances in your data input file for this to work." />
+        <param name="opt_unit" type="boolean" truevalue="centimorgan" falsevalue="recombination" value="false" label="Datafile uses centimorgan distances instead of recombination frequencies" />
+    </inputs>
+
+    <outputs>
+        <data name="out_ihaplo" format="allegro_haplo" label="${tool.name} on ${on_string}: Haplotypes" />
+        <data name="out_fparam" format="allegro_linkage" label="${tool.name} on ${on_string}: Linkage" />
+        <data name="out_founder" format="allegro_descent" label="${tool.name} on ${on_string}: Descent" />
+        <data name="out_linexp" format="txt" label="${tool.name} on ${on_string}: Linear Expression" />
+        <data name="out_combined_cross" format="txt" label="${tool.name} on ${on_string}: Combined Crossovers" />
+    </outputs>
+
+    <tests>
+        <test><!-- Default Haplotypes -->
+            <expand macro="macro_inputs" />
+            
+            <param name="extra_linkage_type" value="classical" />
+            <param name="extra_linkage_mptspt" value="mpt" />
+            <param name="opt_haplotypes" value="yes" />
+
+            <output name="out_ihaplo" >
+                <assert_contents>
+                    <has_text_matching expression="1\s+206003\s+111\s+112(\s+[012])+" />
+                </assert_contents>
+            </output>
+        </test>
+        <test><!-- Linkage with custom steps-->
+            <expand macro="macro_inputs" />
+            
+            <param name="extra_linkage_type" value="classical" />
+            <param name="extra_linkage_mptspt" value="mpt" />
+            <param name="extra_linkage_mptspt" value="mpt" />
+            <param name="extra_steps" value="3" />
+            <param name="extra_maxstep" value="30" />
+
+
+            <output name="out_fparam" >
+                <assert_contents>
+                    <has_text_matching expression="1(\s+[-0-9.]+){2}\s+rs2822572" />
+                </assert_contents>
+            </output>
+        </test>
+        <test><!-- Single-point linear expression test with power weights -->
+            <expand macro="macro_inputs" />
+            
+            <param name="extra_linkage_type" value="allele_sharing" />
+            <param name="extra_linkage_mptspt" value="spt" />
+            <param name="extra_linkage_linexp" value="lin" />
+            <param name="extra_linkage_scoring" value="homoz" />
+            <param name="extra_weighting" value="power:50" />
+                       
+            <output name="out_fparam" >
+                <assert_contents>
+                    <has_text_matching expression='(\-\d+\.\d+\s+)+rs2822696' />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help>
+Allegro is a computer program for multipoint genetic linkage analysis and related calculations. Allegro can do both classical parametric linkage analysis and analysis based on allele sharing models. In addition, Allegro estimates total number of recombinations between markers, computes posterior IBD sharing probabilities, re-constructs haplotypes and does two types of simulation. Thus Allegro includes the basic functionality of the well known Genehunter program (Kruglyak et al. 1996). It can analyse pedigrees of moderate size,and it can handle many markers. The biggest advantages of Allegro over Genehunterar the allele sharing models that it provides and a much shorter execution time.
+    </help>
+    <citations>
+        <citation type="doi">10.1038/ng1005-1015</citation>
+        <citation type="doi">10.1038/75514</citation>
+    </citations>
+</tool>