Mercurial > repos > iuc > crossmap_bam
diff crossmap_bam.xml @ 0:d04d5afec2e0 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/crossmap commit d578fad97ce545d68dde40155d36426a121e4447
author | iuc |
---|---|
date | Tue, 26 Sep 2017 05:44:53 -0400 |
parents | |
children | 8e5feca6a518 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/crossmap_bam.xml Tue Sep 26 05:44:53 2017 -0400 @@ -0,0 +1,136 @@ +<tool id="crossmap_bam" name="CrossMap BAM" version="@WRAPPER_VERSION@-0"> + <description>Convert genome coordinates or annotation files between genome assemblies</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="stdio"/> + <expand macro="version_command"/> + <command><![CDATA[ + #if $input_file.extension == "bam": + #set $input_file = "input.sam" + samtools view -h '${seq_source.input}' > '${input_file}' && + #else: + #set $input_file = "input.bam" + ln -s '${seq_source.input}' '${input_file}' + #end if + + CrossMap.py + bam + + "$chain_source.input_chain" + $optional_tags + + -m $insert_size + -s $insert_size_stdev + -t $insert_size_fold + + '${input_file}' + '${output}' + + && samtools sort "${output}.sam" > '${output}' + && samtools sort "${output}.unmap.sam" > '${output_unmapped}' + ]]></command> + + <inputs> + <conditional name="seq_source"> + <expand macro="source" /> + <when value="cached"> + <param type="data" format="bam" name="input" label="BAM file"> + <validator type="unspecified_build"/> + <!-- Gives error in tests + <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build."/> + --> + </param> + <param name="input_chain" type="select" label="Lift Over To"> + <options from_file="liftOver.loc"> + <column name="name" index="1"/> + <column name="value" index="2"/> + <column name="dbkey" index="0"/> + <filter type="data_meta" ref="input" key="dbkey" column="0"/> + </options> + </param> + </when> + <when value="history"> + <param type="data" format="bam" name="input" label="BAM/SAM file"/> + <param type="data" format="csv" name="input_chain" label="LiftOver chain file"/> + </when> + </conditional> + <expand macro="chain" /> + <param name="optional_tags" type="boolean" truevalue="-a" falsevalue="" label="Add optional BAM/SAM Headers" argument="-a"/> + + <param name="insert_size" type="float" value="200.0" label="Insert size" argument="-m" help="Average insert size of pair-end sequencing (bp) [default=200.0]"/> + <param name="insert_size_stdev" type="float" value="30.0" label="Insert size std. dev" argument="-s" help="Stanadard deviation of insert size. [default=30.0]"/> + <param name="insert_size_fold" type="float" value="3.0" label="Insert size std. dev foldchange" argument="-t" help="A mapped pair is considered as 'proper pair' if both ends mapped to different strand and the distance between them is less then '-t' * stdev from the mean. [default=3.0]"/> +</inputs> + + <outputs> + <data format="bam" name="output" label="${tool.name} on ${on_string}" /> + <data format="bam" name="output_unmapped" label="${tool.name} (unmapped) on ${on_string}" /> + </outputs> + + <tests> + <!-- BAM/SAM --> + <test> + <param name="index_source" value="history"/> + <param name="input" value="test_bam_01_input_a.bam" ftype="bam"/> + <param name="input_chain" value="aToB.over.chain" ftype="csv"/> + <param name="include_fails" value="False"/> + + <output name="output" file="test_bam_01_output_a.bam" compare="diff" lines_diff="8"/> + <output name="output_unmapped" file="test_bam_01_output_a.unmap.bam" compare="diff" lines_diff="8"/> + </test> + </tests> + <help><![CDATA[ +@HELP_GENERAL@ + +SAM / BAM +--------- + + CrossMap updates chromosomes, genome coordinates, header sections, and all + SAM flags accordingly. The program version (of CrossMap) is inserted into the + header section, along with the names of the original BAM file and the chain + file. For pair-end sequencing, insert size is also recalculated. + + + **Optional tags** + + Q + QC. QC failed. + + N + Unmapped. Originally unmapped or originally mapped but failed to liftover to new assembly. + + M + Multiple mapped. Alignment can be liftover to multiple places. + + U + Unique mapped. Alignment can be liftover to only 1 place. + + **Tags for pair-end sequencing include:** + + QF = QC failed + NN = both read1 and read2 unmapped + NU = read1 unmapped, read2 unique mapped + NM = read1 unmapped, multiple mapped + UN = read1 uniquely mapped, read2 unmap + UU = both read1 and read2 uniquely mapped + UM = read1 uniquely mapped, read2 multiple mapped + MN = read1 multiple mapped, read2 unmapped + MU = read1 multiple mapped, read2 unique mapped + MM = both read1 and read2 multiple mapped + + **Tags for single-end sequencing include** + + QF = QC failed + SN = unmaped + SM = multiple mapped + SU = uniquely mapped + +See `the manual <http://crossmap.sourceforge.net/#convert-bam-sam-format-files>`__ for more details +]]></help> + + <citations> + <citation type="doi">10.1093/bioinformatics/btt730</citation> + </citations> +</tool>