Mercurial > repos > devteam > sam_pileup
annotate sam_pileup.xml @ 1:efd77ef84903 draft
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
| author | devteam |
|---|---|
| date | Tue, 13 Oct 2015 12:30:34 -0400 |
| parents | cb3966035753 |
| children | 37df866ccf1a |
| rev | line source |
|---|---|
|
1
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
1 <tool id="sam_pileup" name="Generate pileup" version="1.1.2"> |
| 0 | 2 <description>from BAM dataset</description> |
| 3 <requirements> | |
| 4 <requirement type="package" version="0.1.16">samtools</requirement> | |
| 5 </requirements> | |
| 6 <command interpreter="python"> | |
| 7 sam_pileup.py | |
| 8 --input1=$input1 | |
| 9 --output=$output1 | |
| 10 --ref=$refOrHistory.reference | |
| 11 #if $refOrHistory.reference == "history": | |
| 12 --ownFile=$refOrHistory.ownFile | |
| 13 #else: | |
|
1
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
14 --index=${refOrHistory.index.fields.path} |
| 0 | 15 #end if |
| 16 --bamIndex=${input1.metadata.bam_index} | |
| 17 --lastCol=$lastCol | |
| 18 --indels=$indels | |
| 19 --mapCap=$mapCap | |
| 20 --consensus=$c.consensus | |
| 21 #if $c.consensus == "yes": | |
| 22 --theta=$c.theta | |
| 23 --hapNum=$c.hapNum | |
| 24 --fraction=$c.fraction | |
| 25 --phredProb=$c.phredProb | |
| 26 #else: | |
| 27 --theta="None" | |
| 28 --hapNum="None" | |
| 29 --fraction="None" | |
| 30 --phredProb="None" | |
| 31 #end if | |
| 32 </command> | |
| 33 <inputs> | |
| 34 <conditional name="refOrHistory"> | |
| 35 <param name="reference" type="select" label="Will you select a reference genome from your history or use a built-in index?"> | |
| 36 <option value="indexed">Use a built-in index</option> | |
| 37 <option value="history">Use one from the history</option> | |
| 38 </param> | |
| 39 <when value="indexed"> | |
| 40 <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for"> | |
| 41 <validator type="unspecified_build" /> | |
|
1
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
42 <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." /> |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
43 |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
44 </param> |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
45 <param name="index" type="select" label="Using reference genome"> |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
46 <options from_data_table="fasta_indexes"> |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
47 <filter type="data_meta" ref="input1" key="dbkey" column="1" /> |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
48 <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" /> |
|
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
49 </options> |
| 0 | 50 </param> |
| 51 </when> | |
| 52 <when value="history"> | |
| 53 <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for" /> | |
| 54 <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" /> | |
| 55 </when> | |
| 56 </conditional> | |
| 57 <param name="lastCol" type="select" label="Whether or not to print the mapping quality as the last column" help="Makes the output easier to parse, but is space inefficient"> | |
| 58 <option value="no">Do not print the mapping quality as the last column</option> | |
| 59 <option value="yes">Print the mapping quality as the last column</option> | |
| 60 </param> | |
| 61 <param name="indels" type="select" label="Whether or not to print only output pileup lines containing indels"> | |
| 62 <option value="no">Print all lines</option> | |
| 63 <option value="yes">Print only lines containing indels</option> | |
| 64 </param> | |
| 65 <param name="mapCap" type="integer" value="60" label="Where to cap mapping quality" /> | |
| 66 <conditional name="c"> | |
| 67 <param name="consensus" type="select" label="Call consensus according to MAQ model?"> | |
| 68 <option selected="true" value="no">No</option> | |
| 69 <option value="yes">Yes</option> | |
| 70 </param> | |
| 71 <when value="no" /> | |
| 72 <when value="yes"> | |
| 73 <param name="theta" type="float" value="0.85" label="Theta parameter (error dependency coefficient) in the MAQ consensus calling model" /> | |
| 74 <param name="hapNum" type="integer" value="2" label="Number of haplotypes in the sample" help="Greater than or equal to 2" /> | |
| 75 <param name="fraction" type="float" value="0.001" label="Expected fraction of differences between a pair of haplotypes" /> | |
| 76 <param name="phredProb" type="integer" value="40" label="Phred probability of an indel in sequencing/prep" /> | |
| 77 </when> | |
| 78 </conditional> | |
| 79 </inputs> | |
| 80 <outputs> | |
| 81 <data format="tabular" name="output1" label="${tool.name} on ${on_string}: converted pileup" /> | |
| 82 </outputs> | |
| 83 <tests> | |
| 84 <test> | |
| 85 <!-- | |
| 86 Bam to pileup command: | |
| 87 samtools faidx chr_m.fasta | |
| 88 samtools pileup -M 60 -f chr_m.fasta test-data/sam_pileup_in1.bam > sam_pileup_out1.pileup | |
| 89 chr_m.fasta is the prefix of the index | |
| 90 --> | |
| 91 <param name="reference" value="history" /> | |
| 92 <param name="input1" value="sam_pileup_in1.bam" ftype="bam" /> | |
| 93 <param name="ownFile" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" /> | |
| 94 <param name="lastCol" value="no" /> | |
| 95 <param name="indels" value="no" /> | |
| 96 <param name="mapCap" value="60" /> | |
| 97 <param name="consensus" value="no" /> | |
| 98 <output name="output1" file="sam_pileup_out1.pileup" /> | |
| 99 </test> | |
| 100 <test> | |
| 101 <!-- | |
| 102 Bam to pileup command: | |
| 103 samtools pileup -M 60 -c -T 0.85 -N 2 -r 0.001 -I 40 -f chr_m.fasta test-data/sam_pileup_in1.bam > sam_pileup_out2.pileup | |
| 104 chr_m.fasta is the prefix of the index | |
| 105 --> | |
| 106 <param name="reference" value="indexed" /> | |
| 107 <param name="input1" value="sam_pileup_in1.bam" ftype="bam" dbkey="equCab2" /> | |
|
1
efd77ef84903
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
108 <param name="index" value="chr_m" /> |
| 0 | 109 <param name="lastCol" value="no" /> |
| 110 <param name="indels" value="no" /> | |
| 111 <param name="mapCap" value="60" /> | |
| 112 <param name="consensus" value="yes" /> | |
| 113 <param name="theta" value="0.85" /> | |
| 114 <param name="hapNum" value="2" /> | |
| 115 <param name="fraction" value="0.001" /> | |
| 116 <param name="phredProb" value="40" /> | |
| 117 <output name="output1" file="sam_pileup_out2.pileup" /> | |
| 118 </test> | |
| 119 </tests> | |
| 120 <help> | |
| 121 | |
| 122 **What it does** | |
| 123 | |
| 124 Uses SAMTools_' pileup command to produce a pileup dataset from a provided BAM dataset. It generates two types of pileup datasets depending on the specified options. If *Call consensus according to MAQ model?* option is set to **No**, the tool produces simple pileup. If the option is set to **Yes**, a ten column pileup dataset with consensus is generated. Both types of datasets are briefly summarized below. | |
| 125 | |
| 126 .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml | |
| 127 | |
| 128 ------ | |
| 129 | |
| 130 **Types of pileup datasets** | |
| 131 | |
| 132 The description of pileup format below is largely based on information that can be found on SAMTools Pileup_ documentation page. The 6- and 10-column variants are described below. | |
| 133 | |
| 134 .. _Pileup: http://samtools.sourceforge.net/pileup.shtml | |
| 135 | |
| 136 **Six column pileup**:: | |
| 137 | |
| 138 1 2 3 4 5 6 | |
| 139 --------------------------------- | |
| 140 chrM 412 A 2 ., II | |
| 141 chrM 413 G 4 ..t, IIIH | |
| 142 chrM 414 C 4 ...a III2 | |
| 143 chrM 415 C 4 TTTt III7 | |
| 144 | |
| 145 where:: | |
| 146 | |
| 147 Column Definition | |
| 148 ------- ---------------------------- | |
| 149 1 Chromosome | |
| 150 2 Position (1-based) | |
| 151 3 Reference base at that position | |
| 152 4 Coverage (# reads aligning over that position) | |
| 153 5 Bases within reads where (see Galaxy wiki for more info) | |
| 154 6 Quality values (phred33 scale, see Galaxy wiki for more) | |
| 155 | |
| 156 **Ten column pileup** | |
| 157 | |
| 158 The `ten-column` (consensus_) pileup incorporates additional consensus information generated with *-c* option of *samtools pileup* command:: | |
| 159 | |
| 160 | |
| 161 1 2 3 4 5 6 7 8 9 10 | |
| 162 ------------------------------------------------ | |
| 163 chrM 412 A A 75 0 25 2 ., II | |
| 164 chrM 413 G G 72 0 25 4 ..t, IIIH | |
| 165 chrM 414 C C 75 0 25 4 ...a III2 | |
| 166 chrM 415 C T 75 75 25 4 TTTt III7 | |
| 167 | |
| 168 where:: | |
| 169 | |
| 170 Column Definition | |
| 171 ------- -------------------------------------------------------- | |
| 172 1 Chromosome | |
| 173 2 Position (1-based) | |
| 174 3 Reference base at that position | |
| 175 4 Consensus bases | |
| 176 5 Consensus quality | |
| 177 6 SNP quality | |
| 178 7 Maximum mapping quality | |
| 179 8 Coverage (# reads aligning over that position) | |
| 180 9 Bases within reads where (see Galaxy wiki for more info) | |
| 181 10 Quality values (phred33 scale, see Galaxy wiki for more) | |
| 182 | |
| 183 | |
| 184 .. _consensus: http://samtools.sourceforge.net/cns0.shtml | |
| 185 | |
| 186 ------ | |
| 187 | |
| 188 **Citation** | |
| 189 | |
| 190 For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. <http://www.ncbi.nlm.nih.gov/pubmed/19505943>`_ | |
| 191 | |
| 192 | |
| 193 </help> | |
| 194 </tool> | |
| 195 | |
| 196 |
