Previous changeset 1:1670f0565000 (2014-06-03) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/pileup_parser commit ab627176cd4f6efe6d1fe4b85baa679aaa651eb1 |
modified:
pileup_parser.pl pileup_parser.xml |
b |
diff -r 1670f0565000 -r 85bedbea8a12 pileup_parser.pl --- a/pileup_parser.pl Tue Jun 03 12:40:39 2014 -0400 +++ b/pileup_parser.pl Wed Oct 05 06:30:36 2016 -0400 |
[ |
@@ -37,7 +37,7 @@ my @fields = split /\t/; next if $fields[ $ref_base_column ] eq "*"; # skip indel lines my $read_bases = $fields[ $read_bases_column ]; - die "Coverage column" . ($cvrg_column+1) . " contains non-numeric values. Check your input parameters as well as format of input dataset." if ( not isdigit $fields[ $cvrg_column ] ); + die "Coverage column" . ($cvrg_column+1) . " contains non-numeric values. Check your input parameters as well as format of input dataset." if ( not $fields[ $cvrg_column ] =~ qr/^[[:digit:]]+$/x ); next if $fields[ $cvrg_column ] < $cvrg_cutoff; my $base_quality = $fields[ $base_quality_column ]; if ($read_bases =~ m/[\$\^\+-]/) { |
b |
diff -r 1670f0565000 -r 85bedbea8a12 pileup_parser.xml --- a/pileup_parser.xml Tue Jun 03 12:40:39 2014 -0400 +++ b/pileup_parser.xml Wed Oct 05 06:30:36 2016 -0400 |
b |
b'@@ -1,5 +1,8 @@\n-<tool id="pileup_parser" name="Filter pileup" version="1.0.2">>\n+<tool id="pileup_parser" name="Filter pileup" version="1.0.2">\n <description>on coverage and SNPs</description>\n+ <requirements>\n+ <requirement type="package" version="5.22.0">perl</requirement>\n+ </requirements>\n <command interpreter="perl">\n #if $pileup_type.type_select == "six" #pileup_parser.pl $input "3" "5" "6" "4" $qv_cutoff $cvrg_cutoff $snps_only $interval "2" $out_file1 $diff $qc_base\n #elif $pileup_type.type_select == "ten" #pileup_parser.pl $input "3" "9" "10" "8" $qv_cutoff $cvrg_cutoff $snps_only $interval "2" $out_file1 $diff $qc_base\n@@ -44,7 +47,6 @@\n <option value="No">No</option>\n <option value="Yes" selected="true">Yes</option>\n </param>\n- \n </inputs>\n <outputs>\n <data format="tabular" name="out_file1">\n@@ -93,7 +95,7 @@\n <param name="type_select" value="ten"/>\n <param name="qv_cutoff" value="20" />\n <param name="cvrg_cutoff" value="3" />\n- <param name="snps_only" value="Yes"/>q\n+ <param name="snps_only" value="Yes"/>\n <param name="interval" value="Yes" />\n <param name="diff" value="No" />\n <param name="qc_base" value="Yes" />\n@@ -111,10 +113,10 @@\n <param name="cvrg_cutoff" value="3" />\n <param name="snps_only" value="Yes"/>\n <param name="interval" value="Yes" />\n- <param name="diff" value="No" />\n+ <param name="diff" value="No" />\n <param name="qc_base" value="Yes" />\n </test>\n- <test>\n+ <test>\n <param name="input" value="pileup_parser.10col.pileup"/>\n <output name="out_file1" file="pileup_parser.10col.20-3-yes-yes-yes-yes.pileup.out"/>\n <param name="type_select" value="manual"/>\n@@ -127,7 +129,7 @@\n <param name="cvrg_cutoff" value="3" />\n <param name="snps_only" value="Yes"/>\n <param name="interval" value="Yes" />\n- <param name="diff" value="Yes" />\n+ <param name="diff" value="Yes" />\n <param name="qc_base" value="Yes" />\n </test>\n <test>\n@@ -143,12 +145,10 @@\n <param name="cvrg_cutoff" value="3" />\n <param name="snps_only" value="Yes"/>\n <param name="interval" value="Yes" />\n- <param name="diff" value="Yes" />\n+ <param name="diff" value="Yes" />\n <param name="qc_base" value="No" />\n </test>\n-\n-\n- </tests>\n+</tests>\n <help>\n \n **What it does**\n@@ -169,12 +169,12 @@\n **Six column pileup**::\n \n 1 2 3 4 5 6\n- --------------------------------- \n+ ---------------------------------\n chrM 412 A 2 ., II\n chrM 413 G 4 ..t, IIIH\n chrM 414 C 4 ..Ta III2\n chrM 415 C 4 TTTt III7\n- \n+\n where::\n \n Column Definition\n@@ -185,7 +185,7 @@\n 4 Coverage (# reads aligning over that position)\n 5 Bases within reads\n 6 Quality values (phred33 scale, see Galaxy wiki for more)\n- \n+\n **Ten column pileup**\n \n The `ten-column`__ pileup incorporates additional consensus information generated with the *-c* option of the *samtools pileup* command::\n@@ -228,7 +228,7 @@\n - Number of **C** variants\n - Number of **G** variants\n - Number of **T** variants\n-- Number of read bases covering this position, where quality is equal to or higher than the value set by **Do not consider read bases with quality lower than** option. \n+- Number of read bases covering this position, where quality is equal to or higher than the value set by **Do not consider read bases with quality lower than** option.\n \n Optionally, if **Print total number of differences?** is set to **Yes**, the tool will append the sixth column with the total number of deviants (see below).\n \n@@ -246,7 +246,7 @@\n chrM 413 G 4 ..t, IIIH 0 0 2 1 3\n chrM 414 C 4 ..Ta III2 1 1 0 1 3\n chrM 415 C 4 TTTt III7 0 0 0 4 4\n- \n+\n where::\n \n Column Definition\n@@ -264,22 +264,21 @@\n 11 Quality adjusted coverage:\n '..b' 413 G 4 ..t, IIIH 0 0 2 1 3 1\n chrM 414 C 4 ..Ta III2 1 2 0 1 3 2\n- chrM 415 C 4 TTTt III7 0 0 0 4 4 0 \n- \n+ chrM 415 C 4 TTTt III7 0 0 0 4 4 0\n+\n Note the additional column 13, that contains the number of deviant reads (e.g., there are two deviants, T and a, for position 414).\n \n- \n Finally, if **Convert coordinates to intervals?** is set to **Yes**, you will get one additional column with the end coordinate::\n- \n+\n chrM 412 413 G 4 ..t, III2 0 0 2 1 3\n chrM 414 415 C 4 ..Ta III2 1 2 0 1 3\n chrM 414 415 C 4 TTTt III7 0 0 0 4 4\n- \n+\n where::\n \n Column Definition\n@@ -299,12 +298,12 @@\n 13 Total number of deviants (if Convert coordinates to intervals? is set to yes)\n \n \n-Note that in this case the coordinates of SNPs were converted to intervals, where the start coordinate is 0-based and the end coordinate in 1-based using the UCSC Table Browser convention. \n- \n+Note that in this case the coordinates of SNPs were converted to intervals, where the start coordinate is 0-based and the end coordinate in 1-based using the UCSC Table Browser convention.\n+\n Although three positions have variants in the original file (413, 414, and 415), only 413 and 415 are reported because the quality values associated with these two SNPs are above the threshold of 20. In the case of 414 the **a** allele has a quality value of 17 ( ord("2")-33 ), and is therefore not reported. Note that five columns have been added to each of the reported lines::\n \n chrM 413 G 4 ..t, IIIH 0 0 2 1 3\n- \n+\n Here, there is one variant, **t**. Because the fourth column represents **T** counts, it is incremented by 1. The last column shows that at this position, three reads have bases above the quality threshold of 20.\n \n -----\n@@ -317,17 +316,17 @@\n chrM 413 G 4 ..t, III2\n chrM 414 C 4 ..Ta III2\n chrM 415 C 4 TTTt III7\n- \n+\n To call all variants (with no restriction by coverage) with quality above phred value of 20, we will need to set the parameters as follows:\n \n-.. image:: pileup_parser_help1.png \n+.. image:: pileup_parser_help1.png\n \n Running the tool with these parameters will return::\n \n chrM 413 G 4 ..t, IIIH 0 0 0 1 3\n chrM 414 C 4 ..Ta III2 0 2 0 1 3\n chrM 415 C 4 TTTt III7 0 0 0 4 4\n- \n+\n **Note** that position 414 is not reported because the *a* variant has associated quality value of 17 (because ord(\'2\')-33 = 17) and is below the phred threshold of 20 set by the **Count variants with quality above this value** parameter.\n \n -----\n@@ -336,7 +335,7 @@\n \n In addition to calling variants, it is often useful to know the quality adjusted coverage. Running the tool with these parameters:\n \n-.. image:: pileup_parser_help2.png \n+.. image:: pileup_parser_help2.png\n \n will report everything from the original file::\n \n@@ -344,7 +343,7 @@\n chrM 413 G 4 ..t, III2 0 0 2 1 3\n chrM 414 C 4 ..Ta III2 0 2 0 1 3\n chrM 415 C 4 TTTt III7 0 0 0 4 4\n- \n+\n Here, you can see that although the total coverage at position 414 is 4 (column 4), the quality adjusted coverage is 3 (last column). This is because only three out of four reads have bases with quality above the set threshold of 20 (the actual qualities are III2 or, after conversion, 40, 40, 40, 17).\n \n One can use the last column of this dataset to filter out (using Galaxy\'s **Filter** tool) positions where quality adjusted coverage (last column) is below a set threshold.\n@@ -363,8 +362,7 @@\n chrM 413 G 4 ..t, III2 0 0 2 1 3 1\n chrM 414 C 4 ..Ta III2 0 2 0 1 3 1\n chrM 415 C 4 TTTt III7 0 0 0 4 4 0\n- \n- \n+\n -----\n \n **Example 4**: Report everything, print total number of differences, and ignore qualities and read bases\n@@ -379,9 +377,7 @@\n chrM 413 G 4 0 0 2 1 3 1\n chrM 414 C 4 0 2 0 1 3 1\n chrM 415 C 4 0 0 0 4 4 0\n-\n-\n-\n- \n </help>\n+<citations>\n+</citations>\n </tool>\n' |