annotate mismatch_frequencies.xml @ 0:77de5fc623f9 draft

planemo upload for repository https://bitbucket.org/drosofff/gedtools/
author mvdbeek
date Wed, 27 May 2015 13:40:23 -0400
parents
children 3613460e891e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
1 <tool id="mismatch_frequencies" name="Mismatch Frequencies" version="0.0.9" hidden="false" >
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
2 <description>Analyze mismatch frequencies in BAM/SAM alignments</description>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
3 <requirements>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
4 <requirement type="package" version="0.7.7">pysam</requirement>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
5 <requirement type="package" version="0.14.1">pandas</requirement>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
6 <requirement type="package" version="1.2.1">matplotlib</requirement>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
7 </requirements>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
8 <command interpreter="python">mismatch_frequencies.py --input
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
9 #for i in $rep
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
10 "$i.input_file"
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
11 #end for
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
12 --name
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
13 #for i in $rep
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
14 "$i.input_file.name"
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
15 #end for
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
16 --output_pdf $output_pdf --output_tab $output_tab --min $min_length --max $max_length
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
17 --n_mm $number_of_mismatches
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
18 --five_p $five_p
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
19 --three_p $three_p
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
20 --expanded_output_tab $expanded_tab
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
21 --possible_mismatches $possible_mismatches
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
22 </command>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
23 <inputs>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
24 <repeat name="rep" title="alignment files">
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
25 <param name="input_file" type="data" format="bam,sam" label="Alignment file" help="The input alignment file(s) for which to analyze the mismatches."/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
26 </repeat>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
27 <param name="number_of_mismatches" label="Maximum number of allowed mismatches per read" help="Discard reads with more than the chosen number of mismatches from the frequency calculation" type="integer" value="3"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
28 <param name="possible_mismatches" label="Specify mismatches that should be counted" help="Ignores mismatches that are not listed" type="text" value="AC AG AT CA CG CT GA GC GT TA TC TG">
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
29 <validator type="expression" message="Allowed values are AGCTN, seperated by space.">len([False for char in value if not char in " AGCTN"]) == 0</validator>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
30 </param>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
31 <param name="min_length" label="Minumum read length to analyse" type="integer" value="21"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
32 <param name="max_length" label="Maximum read length to analyse" type="integer" value="21"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
33 <param name="five_p" label="Ignore mismatches in the first N nucleotides of a read" type="integer" value="0"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
34 <param name="three_p" label="Ignore mismatches in the last N nucleotides of a read" help="useful to discriminate between tailing events and editing events" type="integer" value="3"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
35 <param help="Output expanded tabular format" label="Nucleotide mismatches per reference sequence" name="expanded" type="select">
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
36 <option select="true" value="false">No</option>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
37 <option value="expanded">Yes</option>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
38 </param>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
39 </inputs>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
40 <outputs>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
41 <data format="tabular" name="output_tab" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
42 <data format="tabular" name="expanded_tab">
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
43 <filter> expanded == "expanded"</filter>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
44 </data>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
45 <data format="pdf" name="output_pdf" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
46 </outputs>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
47 <tests>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
48 <test>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
49 <param name="rep_0|input_file" value="3mismatches_ago2ip_s2.bam" ftype="bam" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
50 <param name="rep_1|input_file" value="3mismatches_ago2ip_ovary.bam" ftype="bam" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
51 <param name="number_of_mismatches" value="1" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
52 <param name="min_length" value="21" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
53 <param name="max_length" value="21" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
54 <param name="three_p" value="0" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
55 <param name="five_p" value="0" />
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
56 <output name="tabular" file="mismatch.tab" ftype="tabular"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
57 <!--
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
58 <output name="pdf" file="mismatch.pdf" ftype="pdf"/>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
59 -->
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
60 </test>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
61 </tests>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
62 <help>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
63
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
64 .. class:: infomark
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
65
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
66
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
67 ***What it does***
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
68
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
69 This tool reconstitues for each aligned read of an alignment file in SAM/BAM format whether
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
70 a mismatch is annotated in the MD tag, and if that is the case counts the identity of the
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
71 mismatch relative to the reference sequence. The output is a PDF document with the calculated
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
72 frequency for each mismatch that occured relative to the total number of valid reads and a table
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
73 with the corresponding values. Read length can be limited to a specific read length, and 5 prime and
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
74 3 prime-most nucleotides of a read can be ignored.
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
75
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
76 ----
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
77
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
78 .. class:: warningmark
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
79
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
80 ***Warning***
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
81
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
82 This tool skips all read that have insertions and has been tested only with bowtie and bowtie2
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
83 generated alignment files.
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
84
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
85 Written by Marius van den Beek, m.vandenbeek at gmail . com
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
86 </help>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
87 <citations>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
88 </citations>
77de5fc623f9 planemo upload for repository https://bitbucket.org/drosofff/gedtools/
mvdbeek
parents:
diff changeset
89 </tool>