Mercurial > repos > iuc > crossmap_bam
comparison crossmap_bam.xml @ 0:9bcfe0aabf5d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/crossmap commit 8564863eaad7bb9f9c8c273d471511979a2c96aa
| author | iuc |
|---|---|
| date | Sat, 01 Jul 2017 17:45:57 -0400 |
| parents | |
| children | 6463cf32d733 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9bcfe0aabf5d |
|---|---|
| 1 <tool id="crossmap_bam" name="CrossMap BAM" version="@WRAPPER_VERSION@-0"> | |
| 2 <description>Convert genome coordinates or annotation files between genome assemblies</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="stdio"/> | |
| 8 <expand macro="version_command"/> | |
| 9 <command><![CDATA[ | |
| 10 #if $input_file.extension == "bam": | |
| 11 #set $input_file = "input.sam" | |
| 12 samtools view -h '${seq_source.input}' > '${input_file}' && | |
| 13 #else: | |
| 14 #set $input_file = "input.bam" | |
| 15 ln -s '${seq_source.input}' '${input_file}' | |
| 16 #end if | |
| 17 | |
| 18 CrossMap.py | |
| 19 bam | |
| 20 | |
| 21 "$chain_source.input_chain" | |
| 22 $optional_tags | |
| 23 | |
| 24 -m $insert_size | |
| 25 -s $insert_size_stdev | |
| 26 -t $insert_size_fold | |
| 27 | |
| 28 '${input_file}' | |
| 29 '${output}' | |
| 30 | |
| 31 && samtools sort "${output}.sam" > '${output}' | |
| 32 && samtools sort "${output}.unmap.sam" > '${output_unmapped}' | |
| 33 ]]></command> | |
| 34 | |
| 35 <inputs> | |
| 36 <conditional name="seq_source"> | |
| 37 <expand macro="source" /> | |
| 38 <when value="cached"> | |
| 39 <param type="data" format="bam" name="input" label="BAM file"> | |
| 40 <validator type="unspecified_build"/> | |
| 41 <!-- Gives error in tests | |
| 42 <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."/> | |
| 43 --> | |
| 44 </param> | |
| 45 <param name="input_chain" type="select" label="Lift Over To"> | |
| 46 <options from_file="liftOver.loc"> | |
| 47 <column name="name" index="1"/> | |
| 48 <column name="value" index="2"/> | |
| 49 <column name="dbkey" index="0"/> | |
| 50 <filter type="data_meta" ref="input" key="dbkey" column="0"/> | |
| 51 </options> | |
| 52 </param> | |
| 53 </when> | |
| 54 <when value="history"> | |
| 55 <param type="data" format="bam" name="input" label="BAM/SAM file"/> | |
| 56 <param type="data" format="csv" name="input_chain" label="LiftOver chain file"/> | |
| 57 </when> | |
| 58 </conditional> | |
| 59 <expand macro="chain" /> | |
| 60 <param name="optional_tags" type="boolean" truevalue="-a" falsevalue="" label="Add optional BAM/SAM Headers" argument="-a"/> | |
| 61 | |
| 62 <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]"/> | |
| 63 <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]"/> | |
| 64 <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]"/> | |
| 65 </inputs> | |
| 66 | |
| 67 <outputs> | |
| 68 <data format="bam" name="output" label="${tool.name} on ${on_string}" /> | |
| 69 <data format="bam" name="output_unmapped" label="${tool.name} (unmapped) on ${on_string}" /> | |
| 70 </outputs> | |
| 71 | |
| 72 <tests> | |
| 73 <!-- BAM/SAM --> | |
| 74 <test> | |
| 75 <param name="index_source" value="history"/> | |
| 76 <param name="input" value="test_bam_01_input_a.bam" ftype="bam"/> | |
| 77 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> | |
| 78 <param name="include_fails" value="False"/> | |
| 79 | |
| 80 <output name="output" file="test_bam_01_output_a.bam" compare="diff" lines_diff="8"/> | |
| 81 <output name="output_unmapped" file="test_bam_01_output_a.unmap.bam" compare="diff" lines_diff="8"/> | |
| 82 </test> | |
| 83 </tests> | |
| 84 <help><![CDATA[ | |
| 85 @HELP_GENERAL@ | |
| 86 | |
| 87 SAM / BAM | |
| 88 --------- | |
| 89 | |
| 90 CrossMap updates chromosomes, genome coordinates, header sections, and all | |
| 91 SAM flags accordingly. The program version (of CrossMap) is inserted into the | |
| 92 header section, along with the names of the original BAM file and the chain | |
| 93 file. For pair-end sequencing, insert size is also recalculated. | |
| 94 | |
| 95 | |
| 96 **Optional tags** | |
| 97 | |
| 98 Q | |
| 99 QC. QC failed. | |
| 100 | |
| 101 N | |
| 102 Unmapped. Originally unmapped or originally mapped but failed to liftover to new assembly. | |
| 103 | |
| 104 M | |
| 105 Multiple mapped. Alignment can be liftover to multiple places. | |
| 106 | |
| 107 U | |
| 108 Unique mapped. Alignment can be liftover to only 1 place. | |
| 109 | |
| 110 **Tags for pair-end sequencing include:** | |
| 111 | |
| 112 QF = QC failed | |
| 113 NN = both read1 and read2 unmapped | |
| 114 NU = read1 unmapped, read2 unique mapped | |
| 115 NM = read1 unmapped, multiple mapped | |
| 116 UN = read1 uniquely mapped, read2 unmap | |
| 117 UU = both read1 and read2 uniquely mapped | |
| 118 UM = read1 uniquely mapped, read2 multiple mapped | |
| 119 MN = read1 multiple mapped, read2 unmapped | |
| 120 MU = read1 multiple mapped, read2 unique mapped | |
| 121 MM = both read1 and read2 multiple mapped | |
| 122 | |
| 123 **Tags for single-end sequencing include** | |
| 124 | |
| 125 QF = QC failed | |
| 126 SN = unmaped | |
| 127 SM = multiple mapped | |
| 128 SU = uniquely mapped | |
| 129 | |
| 130 See `the manual <http://crossmap.sourceforge.net/#convert-bam-sam-format-files>`__ for more details | |
| 131 ]]></help> | |
| 132 | |
| 133 <citations> | |
| 134 <citation type="doi">10.1093/bioinformatics/btt730</citation> | |
| 135 </citations> | |
| 136 </tool> |
