Mercurial > repos > iuc > bedtools
diff shuffleBed.xml @ 1:82aac94b06c3 draft
Uploaded
author | iuc |
---|---|
date | Thu, 08 Jan 2015 14:25:51 -0500 |
parents | b8348686a0b9 |
children | 2cd7e321d259 |
line wrap: on
line diff
--- a/shuffleBed.xml Tue Nov 04 01:45:04 2014 -0500 +++ b/shuffleBed.xml Thu Jan 08 14:25:51 2015 -0500 @@ -6,63 +6,107 @@ <expand macro="requirements" /> <expand macro="stdio" /> <command> +<![CDATA[ bedtools shuffle -g $genome -i $inputA $bedpe - #if $seed.choose: - -seed $seed.seed + #if str($seed.seed_choose) == "True": + -seed $seed.seed #end if - #if $excl.choose: - -excl $excl.excl - -f $overlap - #end if - #if $incl.choose: - -incl $incl.incl + #if str($add_bed.add_bed_select) == "not_be": + -excl $add_bed_select.excl + -f $add_bed_select.overlap + #elif str($add_bed.add_bed_select) == "be": + -incl $add_bed_select.incl #end if $chrom $chromfirst - $nooverlap - $allowBeyond + $no_overlap + $allow_beyond -maxTries $maxtries - > $output + > $output +]]> </command> <inputs> <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/> <param name="bedpe" type="boolean" label="The file is in BEDPE format" selected="False" truevalue="-bedpe" falsevalue="" /> <expand macro="genome" /> - <param name="chrom" type="boolean" label="Keep features in the input file on the same chromosome. Solely permute their location on the chromosome. By default, both the chromosome and position are randomly chosen" selected="False" truevalue="-chrom" falsevalue="" /> + <param name="chrom" type="boolean" selected="False" truevalue="-chrom" falsevalue="" + label="Keep features in the input file on the same chromosome" + help="Solely permute their location on the chromosome. By default, both the chromosome and position are randomly chosen. (-chrom)" /> <expand macro="seed" /> - <conditional name="excl"> - <param name="choose" type="boolean" label="Choose a BED file of coordinates in which features from -i should not be placed?" selected="False" truevalue="True" falsevalue="False" /> - <when value="True"> + <conditional name="add_bed"> + <param name="add_bed_select" type="select" label="Choose an additional BED file"> + <option value="no" selected="True">No additional BED file</option> + <option value="not_be">Coordinates in which features from -i should not be placed?</option> + <option value="be">coordinates in which features from -i should be placed?</option> + </param> + <when value="not_be"> <param name="excl" type="data" format="bed" label="Choose File" /> <expand macro="overlap" /> </when> - </conditional> - <conditional name="incl"> - <param name="choose" type="boolean" label="Choose a BED file of coordinates in which features from -i should be placed?" selected="False" truevalue="True" falsevalue="False" /> - <when value="True"> + <when value="be"> <param name="incl" type="data" format="bed" label="Choose File" /> </when> </conditional> - <param name="chromfirst" type="boolean" selected="False" truevalue="-chromFirst" falsevalue="" - label="Instead of choosing a position randomly among the entire genome (the default), first choose a chrom randomly, and then choose a random start coordinate on that chrom. This leads to features being ~uniformly distributed among the chroms, as opposed to features being distribute as a function of chrom size" /> - <param name="maxtries" type="integer" value="1000" label="Max. number of attempts to find a home for a shuffled interval in the presence of -incl or -excl" /> - <param name="nooverlap" type="boolean" selected="False" truevalue="-noOverlapping" falsevalue="" label="Don’t allow shuffled intervals to overlap" /> - <param name="allowBeyond" type="boolean" selected="False" truevalue="-allowBeyondChromEnd" falsevalue="" label="Allow the original the length of the original records to extebd beyond the length of the chromosome." /> + label="Choose chromosome first" + help="Instead of choosing a position randomly among the entire genome (the default), first choose a chrom randomly, and then choose a random start coordinate on that chrom. This leads to features being ~uniformly distributed among the chroms, as opposed to features being distribute as a function of chrom size. (-chromFirst)" /> + <param name="maxtries" type="integer" value="1000" + label="Max. number of attempts to find a home for a shuffled interval in the presence of -incl or -excl" help="(-maxTries)" /> + <param name="no_overlap" type="boolean" selected="False" truevalue="-noOverlapping" falsevalue="" + label="Don’t allow shuffled intervals to overlap" help="(-noOverlapping)" /> + <param name="allow_beyond" type="boolean" selected="False" truevalue="-allowBeyondChromEnd" falsevalue="" + label="Allow the original the length of the original records to extebd beyond the length of the chromosome" help="(-allowBeyondChromEnd)" /> </inputs> <outputs> <data format="bed" name="output" /> </outputs> + <tests> + <test> + <param name="inputA" value="shuffleBed1.bed" ftype="bed" /> + <param name="genome" value="shuffleBed.len" ftype="tabular" /> + <param name="chrom" value="" /> + <param name="seed_choose" value="True" /> + <param name="seed" value="1" /> + <output name="output" file="shuffleBed_result1.bed" ftype="bed" /> + </test> + <test> + <param name="inputA" value="shuffleBed1.bed" ftype="bed" /> + <param name="genome" value="shuffleBed.len" ftype="tabular" /> + <param name="chrom" value="True" /> + <param name="seed_choose" value="True" /> + <param name="seed" value="1" /> + <output name="output" file="shuffleBed_result2.bed" ftype="bed" /> + </test> + <test> + <param name="inputA" value="shuffleBed1.bed" ftype="bed" /> + <param name="genome" value="shuffleBed.len" ftype="tabular" /> + <param name="excl" value="shuffleBed2.bed" ftype="bed" /> + <param name="seed_choose" value="True" /> + <param name="seed" value="1" /> + <output name="output" file="shuffleBed_result3.bed" ftype="bed" /> + </test> + <test> + <param name="inputA" value="shuffleBed1.bed" ftype="bed" /> + <param name="genome" value="shuffleBed.len" ftype="bed" /> + <param name="allow_beyond" value="True" /> + <param name="seed_choose" value="True" /> + <param name="seed" value="1" /> + <output name="output" file="shuffleBed_result4.bed" ftype="bed" /> + </test> + </tests> <help> - +<![CDATA[ **What it does** bedtools shuffle will randomly permute the genomic locations of a feature file among a genome defined in a genome file. One can also provide an “exclusions” BED/GFF/VCF file that lists regions where you do not want the permuted features to be placed. For example, one might want to prevent features from being placed in known genome gaps. shuffle is useful as a null basis against which to test the significance of associations of one feature with another. + .. image:: $PATH_TO_IMAGES/shuffle-glyph.png + @REFERENCES@ +]]> </help> <expand macro="citations" /> </tool>