Mercurial > repos > devteam > bamtools
changeset 4:4d343c1f606b draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/bamtools/bamtools commit 5ecb0de2196e69548d74a88a4e3c1095ca9bfd16"
author | iuc |
---|---|
date | Wed, 04 Dec 2019 07:44:35 -0500 |
parents | 04866f817daa |
children | befc9dad4ca8 |
files | bamtools.xml macros.xml |
diffstat | 2 files changed, 55 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/bamtools.xml Wed Jan 18 11:47:11 2017 -0500 +++ b/bamtools.xml Wed Dec 04 07:44:35 2019 -0500 @@ -1,76 +1,69 @@ <?xml version="1.0"?> -<tool id="bamtools" name="Convert, Merge, Randomize" version="2.4.0"> +<tool id="bamtools" name="Convert, Merge, Randomize" version="@VERSION@.0"> <description>BAM datasets and perform other transformations</description> - <requirements> - <requirement type="package" version="2.4.0">bamtools</requirement> - <requirement type="package" version="1.3.1">samtools</requirement> - </requirements> - <stdio> - <exit_code range="1:" /> - </stdio> - <command> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <command detect_errors="exit_code"> <![CDATA[ ##set up input files - #for $bam_count, $input_bam in enumerate( $input_bams ): - ln -s "${input_bam}" "localbam_${bam_count}.bam" && - ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" && - #end for - #if str( $analysis_type.analysis_type_selector ) == "convert": - #if str( $analysis_type.format_type.format_type_selector ) == "pileup": - #set $reference_fasta_filename = "localref.fa" - #if str( $analysis_type.format_type.reference_source.reference_source_selector ) == "history": - ln -s "${analysis_type.format_type.reference_source.ref_file}" "${reference_fasta_filename}" && - samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for bamtools convert" >&2 && + ln -s '${input_bams}' localbam.bam && + ln -s '${input_bams.metadata.bam_index}' localbam.bam.bai && + #if str( $analysis_type.analysis_type_selector ) == 'convert': + #if str( $analysis_type.format_type.format_type_selector ) == 'pileup': + #set $reference_fasta_filename = 'localref.fa' + #if str( $analysis_type.format_type.reference_source.reference_source_selector ) == 'history': + ln -s '${analysis_type.format_type.reference_source.ref_file}' '${reference_fasta_filename}' && + samtools faidx '${reference_fasta_filename}' 2>&1 || echo 'Error running samtools faidx for bamtools convert' >&2 && #else: #set $reference_fasta_filename = str( $analysis_type.format_type.reference_source.ref_file.fields.path ) #end if #end if #end if bamtools - #if str( $analysis_type.analysis_type_selector ) == "convert": + #if str( $analysis_type.analysis_type_selector ) == 'convert': convert -format ${analysis_type.format_type.format_type_selector} - #if str( $analysis_type.format_type.format_type_selector ) == "pileup": + #if str( $analysis_type.format_type.format_type_selector ) == 'pileup': ${analysis_type.format_type.mapqual} - -fasta "${reference_fasta_filename}" - #elif str( $analysis_type.format_type.format_type_selector ) == "sam": + -fasta '${reference_fasta_filename}' + #elif str( $analysis_type.format_type.format_type_selector ) == 'sam': ${analysis_type.format_type.noheader} #end if - -out $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "count": + -out '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'count': count - > $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "coverage": + > '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'coverage': coverage - -out $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "header": + -out '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'header': header - > $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "merge": + > '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'merge': merge - -out $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "random": + -out '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'random': random -n ${analysis_type.count} -seed ${analysis_type.seed} - -out $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "revert": + -out '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'revert': revert ${analysis_type.keepDuplicate} ${analysis_type.keepQualities} - -out $out_file1 - #elif str( $analysis_type.analysis_type_selector ) == "sort": + -out '$out_file1' + #elif str( $analysis_type.analysis_type_selector ) == 'sort': sort ${analysis_type.byname} - -out $out_file1 + -out '$out_file1' #end if - #for $bam_count, $input_bam in enumerate( $input_bams ): - -in "localbam_${bam_count}.bam" - #end for + -in localbam.bam ]]> </command> <inputs> - <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/> + <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" /> <conditional name="analysis_type"> <param name="analysis_type_selector" type="select" label="Select BAM manipulation" help="See help below for detailed description of each tool"> <option value="convert">Convert</option> @@ -153,6 +146,7 @@ <when input="analysis_type.format_type.format_type_selector" value="fastq" format="fastq" /> <when input="analysis_type.format_type.format_type_selector" value="sam" format="sam" /> <when input="analysis_type.format_type.format_type_selector" value="pileup" format="pileup" /> + <when input="analysis_type.analysis_type_selector" value="count" format="tabular" /> <when input="analysis_type.analysis_type_selector" value="coverage" format="tabular" /> <when input="analysis_type.analysis_type_selector" value="merge" format="bam" /> <when input="analysis_type.analysis_type_selector" value="random" format="bam" /> @@ -169,22 +163,22 @@ <param name="reference_source_selector" value="history" /> <param name="mapqual" value="true" /> <param name="ref_file" ftype="fasta" value="bamtools-fasta.fa"/> - <output name="output_bam" file="bamtools-convert-pileup.pu" /> + <output name="out_file1" file="bamtools-convert-pileup.pu" /> </test> <test> <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> <param name="analysis_type_selector" value="count"/> - <output name="output_bam" file="bamtools-count.tab" /> + <output name="out_file1" file="bamtools-count.tab" /> </test> <test> <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> <param name="analysis_type_selector" value="coverage"/> - <output name="output_bam" file="bamtools-coverage.tab" /> + <output name="out_file1" file="bamtools-coverage.tab" /> </test> <test> <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> <param name="analysis_type_selector" value="header"/> - <output name="output_bam" file="bamtools-header.txt" /> + <output name="out_file1" file="bamtools-header.txt" /> </test> </tests> <help>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Dec 04 07:44:35 2019 -0500 @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<macros> + <token name="@VERSION@">2.4.0</token> + <xml name="requirements"> + <requirements> + <requirement type="package" version="@VERSION@">bamtools</requirement> + <requirement type="package" version="1.4.1">samtools</requirement> + </requirements> + </xml> + <xml name="citations"> + <citations> + <citation type="doi">10.1093/bioinformatics/btr174</citation> + </citations> + </xml> +</macros> \ No newline at end of file