# HG changeset patch # User aaronquinlan # Date 1325172007 18000 # Node ID 26c21c634c51fcbd8b8bd7052e572d20e4558e36 Uploaded diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/README.rst Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,1 @@ +This repository houses Galaxy wrappers for BEDTools. \ No newline at end of file diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/bamToBed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/bamToBed.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,70 @@ + + + + + + + bamToBed + + + + bamToBed $option $ed_score -i '$input' > '$output' + #if str($tag): + -tag $tag + #end if + + + + + + + + + + + + + + + + + + + + +**What it does** + +This tool converts a BAM file to a BED file. The end coordinate is computed +by inspecting the CIGAR string. The QNAME for the alignment is used as the +BED name field and, by default, the MAPQ is used as the BED score. + +.. class:: infomark + +The "Report spliced BAM alignment..." option breaks BAM alignments with the "N" (splice) operator into distinct BED entries. For example, using this option on a CIGAR such as 50M1000N50M would, by default, produce a single BED record that spans 1100bp. However, using this option, it would create two separate BED records that are each 50bp in size and are separated by 1000bp (the size of the N operation). This is important for RNA-seq and structural variation experiments. + + +.. class:: warningmark + +If using a custom BAM alignment TAG as the BED score, note that this must be a numeric tag (e.g., type "i" as in NM:i:0). + +.. class:: warningmark + +If creating a BEDPE output (see output formatting options), the BAM file should be sorted by query name. + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +------ + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + + + + diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/coverageBed_counts.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/coverageBed_counts.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,69 @@ + + + + + + + coverageBed + + + + coverageBed + #if $inputA.ext == "bam" + -abam '$inputA' + #else + -a '$inputA' + #end if + -b '$inputB' + -counts + $split + $strand + | sort -k1,1 -k2,2n + > '$output' + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +This tool converts counts the number of intervals in a BAM or BED file (the source) that overlap another BED file (the target). + +.. class:: infomark + +The output file will be comprised of each interval from your original target BED file, plus an additional column indicating the number of intervals in your source file that overlapped that target interval. + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +------ + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + + diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/genomeCoverageBed_bedgraph.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/genomeCoverageBed_bedgraph.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,117 @@ + + + + + + + genomeCoverageBed + + + genomeCoverageBed + #if $input.ext == "bam" + -ibam '$input' + #else + -i '$input' + -g ${chromInfo} + #end if + + #if str($scale): + -scale $scale + #end if + + -bg + $zero_regions + $split + $strand + > '$output' + + + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +This tool calculates the genome-wide coverage of intervals defined in a BAM or BED file and reports them in BedGraph format. + +.. class:: warningmark + +The input BED or BAM file must be sorted by chromosome name (but doesn't necessarily have to be sorted by start position). + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +----- + +**Example 1** + +Input (BED format)- +Overlapping, un-sorted intervals:: + + chr1 140 176 + chr1 100 130 + chr1 120 147 + + +Output (BedGraph format)- +Sorted, non-overlapping intervals, with coverage value on the 4th column:: + + chr1 100 120 1 + chr1 120 130 2 + chr1 130 140 1 + chr1 140 147 2 + chr1 147 176 1 + +----- + +**Example 2 - with ZERO-Regions selected (assuming hg19)** + +Input (BED format)- +Overlapping, un-sorted intervals:: + + chr1 140 176 + chr1 100 130 + chr1 120 147 + + +Output (BedGraph format)- +Sorted, non-overlapping intervals, with coverage value on the 4th column:: + + chr1 0 100 0 + chr1 100 120 1 + chr1 120 130 2 + chr1 130 140 1 + chr1 140 147 2 + chr1 147 176 1 + chr1 176 249250621 0 + + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/genomeCoverageBed_histogram.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/genomeCoverageBed_histogram.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,81 @@ + + + + + + genomeCoverageBed + + + genomeCoverageBed + #if $input.ext == "bam" + -ibam '$input' + #else + -i '$input' + -g ${chromInfo} + #end if + #if str($max): + -max $max + #end if + > '$output' + + + + + + + + + + + + +**What it does** + +This tool calculates a histogram of genome coverage depth based on mapped reads in BAM format or intervals in BED format. + + +------ + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +.. class:: infomark + +The output file will contain five columns: + + * 1. Chromosome name (or 'genome' for whole-genome coverage) + * 2. Coverage depth + * 3. The number of bases on chromosome (or genome) with depth equal to column 2. + * 4. The size of chromosome (or entire genome) in base pairs + * 5. The fraction of bases on chromosome (or entire genome) with depth equal to column 2. + +**Example Output**:: + + chr2L 0 1379895 23011544 0.0599653 + chr2L 1 837250 23011544 0.0363839 + chr2L 2 904442 23011544 0.0393038 + chr2L 3 913723 23011544 0.0397072 + chr2L 4 952166 23011544 0.0413778 + chr2L 5 967763 23011544 0.0420555 + chr2L 6 986331 23011544 0.0428624 + chr2L 7 998244 23011544 0.0433801 + chr2L 8 995791 23011544 0.0432735 + chr2L 9 996398 23011544 0.0432999 + + + + +------ + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + + + + diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/intersectBed_bam.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/intersectBed_bam.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,78 @@ + + + + + + intersectBed + + + + intersectBed + -abam '$inputA' + -b '$inputB' + $split + $strand + #if str($fraction): + -f $fraction + #end if + $reciprocal + $invert + > '$output' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +This tool creates a new BAM alignment file based on alignments that overlap (or optionally, those that do not overlap) intervals in another BED file. Example usage would be to cull a BAM file from an exome capture experiment to include on the "on-target" alignments. + +.. class:: infomark + +Note that each BAM alignment is treated individually. Therefore, if one end of a paired-end alignment overlaps an interval in the BED file, yet the other end does not, the output file will only include the overlapping end. + +.. class:: infomark + +Note that a BAM alignment will be sent to the output file **once** even if it overlaps more than one interval in the BED file. + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +------ + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + + diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/multiIntersectBed.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/multiIntersectBed.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,209 @@ + + + + + + multiIntersectBed + + + multiIntersectBed + $header + #if $zero.value == True: + -empty + -g ${chromInfo} + #end if + + -i '$input1' + '$input2' + #for $q in $beds + '${q.input}' + #end for + + -names + #if $name1.choice == "tag": + '${input1.name}' + #else + '${name1.custom_name}' + #end if + + #if $name2.choice == "tag": + '${input2.name}' + #else + '${name2.custom_name}' + #end if + + #for $q in $beds + #if $q.name.choice == "tag": + '${q.input.name}' + #else + '${q.input.custom_name}' + #end if + #end for + > '$output' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files. The pictorial and raw data examples below illustrate the behavior of this tool more clearly. + + +.. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/mbi.png + + +.. class:: warningmark + +This tool requires that each BED file is reference-sorted (chrom, then start). + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +.. class:: infomark + +The output file will contain five fixed columns, plus additional columns for each BED file: + + * 1. Chromosome name (or 'genome' for whole-genome coverage). + * 2. The zero-based start position of the interval. + * 3. The one-based end position of the interval. + * 4. The number of input files that had at least one feature overlapping this interval. + * 5. A list of input files or labels that had at least one feature overlapping this interval. + * 6. For each input file, an indication (1 = Yes, 0 = No) of whether or not the file had at least one feature overlapping this interval. + +------ + +**Example input**:: + + # a.bed + chr1 6 12 + chr1 10 20 + chr1 22 27 + chr1 24 30 + + # b.bed + chr1 12 32 + chr1 14 30 + + # c.bed + chr1 8 15 + chr1 10 14 + chr1 32 34 + + +------ + +**Example without a header and without reporting intervals with zero coverage**:: + + + chr1 6 8 1 1 1 0 0 + chr1 8 12 2 1,3 1 0 1 + chr1 12 15 3 1,2,3 1 1 1 + chr1 15 20 2 1,2 1 1 0 + chr1 20 22 1 2 0 1 0 + chr1 22 30 2 1,2 1 1 0 + chr1 30 32 1 2 0 1 0 + chr1 32 34 1 3 0 0 1 + + +**Example adding a header line**:: + + + chrom start end num list a.bed b.bed c.bed + chr1 6 8 1 1 1 0 0 + chr1 8 12 2 1,3 1 0 1 + chr1 12 15 3 1,2,3 1 1 1 + chr1 15 20 2 1,2 1 1 0 + chr1 20 22 1 2 0 1 0 + chr1 22 30 2 1,2 1 1 0 + chr1 30 32 1 2 0 1 0 + chr1 32 34 1 3 0 0 1 + + +**Example adding a header line and custom file labels**:: + + + chrom start end num list joe bob sue + chr1 6 8 1 joe 1 0 0 + chr1 8 12 2 joe,sue 1 0 1 + chr1 12 15 3 joe,bob,sue 1 1 1 + chr1 15 20 2 joe,bob 1 1 0 + chr1 20 22 1 bob 0 1 0 + chr1 22 30 2 joe,bob 1 1 0 + chr1 30 32 1 bob 0 1 0 + chr1 32 34 1 sue 0 0 1 + + +----- + + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + + + + + diff -r 000000000000 -r 26c21c634c51 bedtools-galaxy/unionBedGraphs.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bedtools-galaxy/unionBedGraphs.xml Thu Dec 29 10:20:07 2011 -0500 @@ -0,0 +1,248 @@ + + + + + + unionBedGraphs + + + unionBedGraphs + $header + -filler '$filler' + #if $zero.value == True: + -empty + -g ${chromInfo} + #end if + + -i '$input1' + '$input2' + #for $q in $bedgraphs + '${q.input}' + #end for + + -names + #if $name1.choice == "tag": + '${input1.name}' + #else + '${name1.custom_name}' + #end if + + #if $name2.choice == "tag": + '${input2.name}' + #else + '${name2.custom_name}' + #end if + + #for $q in $bedgraphs + #if $q.name.choice == "tag": + '${q.input.name}' + #else + '${q.input.custom_name}' + #end if + #end for + > '$output' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +This tool merges multiple BedGraph files, allowing direct and fine-scale coverage comparisons among many samples/files. The BedGraph files need not represent the same intervals; the tool will identify both common and file-specific intervals. In addition, the BedGraph values need not be numeric: one can use any text as the BedGraph value and the tool will compare the values from multiple files. + +.. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/ubg.png + + +.. class:: warningmark + +This tool requires that each BedGraph file is reference-sorted (chrom, then start) and contains non-overlapping intervals (within a given file). + +.. class:: warningmark + +This tool requires that `bedtools`__ has been installed on your system. + +------ + +**Example input**:: + + # 1.bedgraph + chr1 1000 1500 10 + chr1 2000 2100 20 + + # 2.bedgraph + chr1 900 1600 60 + chr1 1700 2050 50 + + # 3.bedgraph + chr1 1980 2070 80 + chr1 2090 2100 20 + + +------ + +**Examples using the Zero Coverage checkbox** + +Output example (*without* checking "Report regions with zero coverage"):: + + chr1 900 1000 0 60 0 + chr1 1000 1500 10 60 0 + chr1 1500 1600 0 60 0 + chr1 1700 1980 0 50 0 + chr1 1980 2000 0 50 80 + chr1 2000 2050 20 50 80 + chr1 2050 2070 20 0 80 + chr1 2070 2090 20 0 0 + chr1 2090 2100 20 0 20 + + +Output example (*with* checking "Report regions with zero coverage"). The lines marked with (*) are not covered in any input file, but are still reported (The asterisk marking does not appear in the file).:: + + chr1 0 900 0 0 0 (*) + chr1 900 1000 0 60 0 + chr1 1000 1500 10 60 0 + chr1 1500 1600 0 60 0 + chr1 1600 1700 0 0 0 (*) + chr1 1700 1980 0 50 0 + chr1 1980 2000 0 50 80 + chr1 2000 2050 20 50 80 + chr1 2050 2070 20 0 80 + chr1 2070 2090 20 0 0 + chr1 2090 2100 20 0 20 + chr1 2100 247249719 0 0 0 (*) + + +------ + +**Examples adjusting the "Filler value" for no-covered intervals** + +The default value is '0', but you can use any other value. + +Output example with **filler = N/A**:: + + chr1 900 1000 N/A 60 N/A + chr1 1000 1500 10 60 N/A + chr1 1500 1600 N/A 60 N/A + chr1 1600 1700 N/A N/A N/A + chr1 1700 1980 N/A 50 N/A + chr1 1980 2000 N/A 50 80 + chr1 2000 2050 20 50 80 + chr1 2050 2070 20 N/A 80 + chr1 2070 2090 20 N/A N/A + chr1 2090 2100 20 N/A 20 + + +------ + +**Examples using the "sample name" labels**:: + + chrom start end WT-1 WT-2 KO-1 + chr1 900 1000 N/A 60 N/A + chr1 1000 1500 10 60 N/A + chr1 1500 1600 N/A 60 N/A + chr1 1600 1700 N/A N/A N/A + chr1 1700 1980 N/A 50 N/A + chr1 1980 2000 N/A 50 80 + chr1 2000 2050 20 50 80 + chr1 2050 2070 20 N/A 80 + chr1 2070 2090 20 N/A N/A + chr1 2090 2100 20 N/A 20 + + +------ + +**Non-numeric values** + +The input BedGraph files can contain any kind of value in the fourth column, not necessarily a numeric value. + +Input Example:: + + File-1 File-2 + chr1 200 300 Sample1 chr1 100 240 0.75 + chr1 400 450 Sample1 chr1 250 700 0.43 + chr1 530 600 Sample2 + +Output Example:: + + chr1 100 200 0 0.75 + chr1 200 240 Sample1 0.75 + chr1 240 250 Sample1 0 + chr1 250 300 Sample1 0.43 + chr1 300 400 0 0.43 + chr1 400 450 Sample1 0.43 + chr1 450 530 0 0.43 + chr1 530 600 Sample2 0.43 + chr1 600 700 0 0.43 + + +----- + +This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__ + + .. __: http://code.google.com/p/bedtools/ + .. __: http://code.google.com/p/bedtools/ + .. __: http://cphg.virginia.edu/quinlan/ + .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short + + + + + +