Previous changeset 6:b641062a2587 (2017-12-12) Next changeset 8:e3c64225cbe6 (2019-06-05) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 2684e1443f03bfe2ae20c31d23817415ec8f7e69 |
modified:
bcftools_stats.xml macros.xml test-data/view.bcf |
added:
test-data/summary.pdf test-data/view.vcf_bgzip |
removed:
test-data/view.bcf.csi |
b |
diff -r b641062a2587 -r baa8823f8073 bcftools_stats.xml --- a/bcftools_stats.xml Tue Dec 12 13:56:27 2017 -0500 +++ b/bcftools_stats.xml Thu Feb 21 15:56:16 2019 -0500 |
[ |
@@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@"> +<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@"> <description>Parses VCF or BCF and produces stats which can be plotted using plot-vcfstats</description> <macros> <token name="@EXECUTABLE@">stats</token> @@ -7,11 +7,16 @@ </macros> <expand macro="requirements"> <expand macro="samtools_requirement"/> - <requirement type="package" version="2.0.0">matplotlib</requirement> + <requirement type="package" version="3.0.2">matplotlib</requirement> + <requirement type="package" version="0.1.11">tectonic</requirement> </expand> <expand macro="version_command" /> <command detect_errors="aggressive"><![CDATA[ @PREPARE_ENV@ +#set $input_files = [$input_file] +#if $inputB_file: + #silent $input_files.append($inputB_file) +#end if @PREPARE_INPUT_FILES@ #set $section = $sec_restrict @PREPARE_TARGETS_FILE@ @@ -29,21 +34,21 @@ @EXONS_FILE@ ${section.first_allele_only} #if $section.depth.set_depth == 'yes': - --depth "${section.depth.depth_min},${section.depth.depth_max},${section.depth.depth_bin_size}" + --depth ${section.depth.depth_min},${section.depth.depth_max},${section.depth.depth_bin_size} #end if #if $section.user_tstv: - --user-tstv "${section.user_tstv}" + --user-tstv '${section.user_tstv}' #end if #if $section.afbins.afbins_select == 'af_bins_list': - --af-bins $section.afbins.af_bins_list + --af-bins '$section.afbins.af_bins_list' #elif $section.afbins.afbins_select == 'af_bins_file': - --af-bins $section.afbins.af_bins_file + --af-bins '$section.afbins.af_bins_file' #end if #if $section.af_tag: - --af-tag "${section.af_tag}" + --af-tag '${section.af_tag}' #end if #if len($input_vcfs) == 1: -${section.split_by_ID} + ${section.split_by_ID} #end if ${section.verbose} @@ -59,15 +64,19 @@ ## Primary Input/Outputs @INPUT_FILES@ -> $output_file -## requires: matplotlib and pdflatex +> '$output_file' #if $plot_title: -&& plot-vcfstats -p 'plot_tmp/' -T $plot_title -s $output_file + && plot-vcfstats + -p 'plot_tmp/' + -T '$plot_title' + -s + '$output_file' + || (printf "The content of plot_tmp/plot-vcfstats.log is:\n" >&2 && cat plot_tmp/plot-vcfstats.log >&2 && exit 1) #end if -]]> - </command> + ]]></command> <inputs> - <expand macro="macro_inputs" /> + <expand macro="macro_input" /> + <param name="inputB_file" type="data" format="vcf,vcf_bgzip,bcf" optional="true" label="Optional VCF/BCF Data to compare against" help="When this second dataset is also specified, separate stats for intersection and the complements are generated" /> <section name="sec_restrict" expanded="false" title="Restrict to"> <expand macro="macro_samples" /> <expand macro="macro_apply_filters" /> @@ -128,13 +137,14 @@ </inputs> <outputs> <data name="output_file" format="txt"/> - <data name="output_pdf" format="pdf"> + <data name="output_pdf" format="pdf" from_work_dir="plot_tmp/summary.pdf"> <filter>plot_title</filter> </data> </outputs> <tests> <test> - <param name="input_files" ftype="vcf" value="stats.b.vcf,stats.a.vcf" /> + <param name="input_file" ftype="vcf" value="stats.b.vcf" /> + <param name="inputB_file" ftype="vcf" value="stats.a.vcf" /> <output name="output_file"> <assert_contents> <has_text_matching expression="SN\t0\tnumber of samples:\t3"/> @@ -143,7 +153,8 @@ </output> </test> <test> - <param name="input_files" ftype="vcf" value="mpileup.vcf" /> + <param name="input_file" ftype="vcf" value="mpileup.vcf" /> + <param name="plot_title" value="Plot for mpileup.vcf" /> <output name="output_file"> <assert_contents> <has_text_matching expression="SN\t0\tnumber of samples:\t3"/> @@ -151,6 +162,7 @@ <has_text_matching expression="ST\t0\tA>C\t16"/> </assert_contents> </output> + <output name="output_pdf" file="summary.pdf" compare="sim_size" delta="20000" /> </test> </tests> <help><![CDATA[ @@ -163,6 +175,8 @@ When two files are given, the program generates separate stats for intersection and the complements. By default only sites are compared, -s/-S must given to include also sample columns. +When one VCF file is specified, then stats by non-reference allele frequency, depth distribution, stats by quality and per-sample counts, singleton stats, etc. are printed. When two VCF files are given, then stats such as concordance (Genotype concordance by non-reference allele frequency, Genotype concordance by sample, Non-Reference Discordance) and correlation are also printed. Per-site discordance (PSD) is also printed in --verbose mode. + @COLLAPSE_HELP@ @REGIONS_HELP@ @TARGETS_HELP@ |
b |
diff -r b641062a2587 -r baa8823f8073 macros.xml --- a/macros.xml Tue Dec 12 13:56:27 2017 -0500 +++ b/macros.xml Thu Feb 21 15:56:16 2019 -0500 |
[ |
b'@@ -1,5 +1,5 @@\n <macros>\n- <token name="@VERSION@">1.4.0</token>\n+ <token name="@TOOL_VERSION@">1.9</token>\n <xml name="stdio">\n <stdio>\n <exit_code range="1:" />\n@@ -10,13 +10,13 @@\n </xml>\n <xml name="requirements">\n <requirements>\n- <requirement type="package" version="1.4">bcftools</requirement>\n- <requirement type="package" version="1.4">htslib</requirement>\n+ <requirement type="package" version="@TOOL_VERSION@">bcftools</requirement>\n+ <requirement type="package" version="1.9">htslib</requirement>\n <yield />\n </requirements>\n </xml>\n <xml name="samtools_requirement">\n- <requirement type="package" version="1.3.1">samtools</requirement>\n+ <requirement type="package" version="1.9">samtools</requirement>\n </xml>\n <xml name="version_command">\n <version_command>bcftools 2>&1 | grep \'Version:\'</version_command>\n@@ -39,7 +39,7 @@\n ]]>\n </token>\n <xml name="macro_input">\n- <param name="input_file" type="data" format="vcf,vcf_bgzip,bcf,bcf_bgzip" label="VCF/BCF Data" />\n+ <param name="input_file" type="data" format="vcf,vcf_bgzip,bcf" label="VCF/BCF Data" />\n </xml>\n <token name="@PREPARE_INPUT_FILE@">\n <![CDATA[\n@@ -50,6 +50,11 @@\n bcftools index $input_vcf &&\n #elif $input_file.is_of_type(\'vcf_bgzip\')\n ln -s \'$input_file\' $input_vcf &&\n+ #if $input_file.metadata.tabix_index:\n+ ln -s \'${input_file.metadata.tabix_index}\' ${input_vcf}.tbi &&\n+ #else\n+ bcftools index $input_vcf &&\n+ #end if\n #elif $input_file.is_of_type(\'bcf\')\n #set $input_vcf = \'input.bcf\'\n ln -s \'$input_file\' $input_vcf &&\n@@ -58,8 +63,6 @@\n #else\n bcftools index $input_vcf &&\n #end if\n-#elif $input_file.is_of_type(\'bcf_bgzip\')\n- ln -s \'$input_file\' $input_vcf &&\n #end if\n ]]>\n </token>\n@@ -68,7 +71,7 @@\n </token>\n \n <xml name="macro_inputs">\n- <param name="input_files" type="data" format="vcf,bcf" label="Other VCF/BCF Datasets" multiple="True" />\n+ <param name="input_files" type="data" format="vcf,vcf_bgzip,bcf" label="Other VCF/BCF Datasets" multiple="True" />\n </xml>\n <token name="@PREPARE_INPUT_FILES@">\n <![CDATA[\n@@ -80,8 +83,13 @@\n #if $input_file.is_of_type(\'vcf\')\n bgzip -c \'$input_file\' > $input_vcf &&\n bcftools index $input_vcf &&\n- #elif $input_file.is_of_type(\'vcf_bgz\')\n- ln -s \'$input_file\' $input_vcf\n+ #elif $input_file.is_of_type(\'vcf_bgzip\')\n+ ln -s \'$input_file\' $input_vcf &&\n+ #if $input_file.metadata.tabix_index:\n+ ln -s \'${input_file.metadata.tabix_index}\' ${input_vcf}.tbi &&\n+ #else\n+ bcftools index $input_vcf &&\n+ #end if\n #elif $input_file.is_of_type(\'bcf\')\n #set $input_vcf = \'input\' + str($i) + \'.bcf.gz\'\n ln -s \'$input_file\' $input_vcf &&\n@@ -90,8 +98,6 @@\n #else\n bcftools index $input_vcf &&\n #end if\n- #elif $input_file.is_of_type(\'bcfvcf_bgz\')\n- ln -s \'$input_file\' $input_vcf &&\n #end if\n echo \'$input_vcf\' >> $vcfs_list_file &&\n $input_vcfs.append($input_vcf)\n@@ -106,7 +112,7 @@\n </token>\n \n <xml name="macro_fasta_ref">\n- <param name="fasta_ref" argument="--fasta-ref" type="data" format="data" label="Reference sequence in FASTA format" optional="True" />\n+ <param name="fasta_ref" argument="--fasta-ref" type="data" format="data" optional="true" label="Reference sequence in FASTA format" />\n </xml>\n <token name="@PREPARE_FASTA_REF@">\n <![CDATA[\n@@ -148,7 +154,7 @@\n \n \n <xml name="macro_AF_file">\n- <param name="AF_file" argument="--AF-file" type="data" format="tabular" label="Allele frequencies file" optional="True" help="Tab-delimited file containing the columns CHR,POS,REF,ALT,AF" />\n+ <param name="AF_file" argument="--AF-file" type="data" format="tabular" optional="true" label="Allele frequencies file" help="Tab-delimited file containing the columns CHR,POS,REF,ALT,AF" />\n </xml>\n <!-- This may need to bgzip and tabix the file -->\n <token name="@PREPARE_AF_FILE@">\n@@ -165,7 +171,7 @@\n </token>\n \n <xml '..b'ne__"/>\n <when value="targets">\n- <param name="targets" type="text" value="" label="Restrict to comma-separated list of targets" optional="true"\n+ <param name="targets" type="text" value="" optional="true" label="Restrict to comma-separated list of targets"\n help="Each target is specifed as: chr or chr:pos or chr:from-to">\n <validator type="regex" message="">^(\\w+(:\\d+(-\\d+)?)?(,\\w+(:\\d+(-\\d+)?)?)*)?$</validator>\n </param>\n@@ -373,16 +379,16 @@\n </token>\n \n <xml name="macro_samples">\n- <param name="samples" type="text" value="" label="Samples" optional="true"\n- help="(-s) comma separated list of samples to annotate (or exclude)">\n+ <param argument="--samples" type="text" value="" optional="true" label="Samples"\n+ help="Comma separated list of samples to annotate (or exclude)">\n <validator type="regex" message="">^(\\w+(,\\w+)*)?$</validator>\n </param>\n <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples"\n- help="inverts the query/filtering applied by Samples (adds "^" prefix to exclude)" />\n- <param name="samples_file" type="data" format="tabular" label="Samples File" optional="True"\n- help="(-S) file of samples to include" />\n- <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples File"\n- help="inverts the query/filtering applied by Samples File" />\n+ help="Inverts the query/filtering applied by Samples (adds "^" prefix to exclude)" />\n+ <param argument="--samples_file" type="data" format="tabular" optional="true" label="Samples file"\n+ help="File of samples to include" />\n+ <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples file"\n+ help="inverts the query/filtering applied by Samples file" />\n </xml>\n <token name="@SAMPLES@">\n #set $samples_defined = False\n@@ -397,7 +403,7 @@\n </token>\n \n <xml name="macro_sample">\n- <param name="sample" type="text" label="Sample" optional="True" help="apply variants of the given sample" />\n+ <param name="sample" type="text" optional="true" label="Sample" help="Apply variants of the given sample" />\n </xml>\n <token name="@SAMPLE@">\n #if $section.sample:\n@@ -407,7 +413,7 @@\n \n \n <xml name="macro_include">\n- <param name="include" type="text" label="Include" optional="True" help="(-i) select sites for which the expression is true">\n+ <param argument="--include" type="text" optional="true" label="Include" help="Select sites for which the expression is true">\n <validator type="regex" message="Single quote not allowed">^[^\']*$</validator>\n <sanitizer sanitize="False"/>\n </param>\n@@ -419,7 +425,7 @@\n </token>\n \n <xml name="macro_exclude">\n- <param name="exclude" type="text" label="Exclude" optional="True" help="(-e) exclude sites for which the expression is true">\n+ <param argument="--exclude" type="text" optional="true" label="Exclude" help="Exclude sites for which the expression is true">\n <validator type="regex" message="Single quote not allowed">^[^\']*$</validator>\n <sanitizer sanitize="False"/>\n </param>\n@@ -431,8 +437,8 @@\n </token>\n \n <xml name="macro_columns">\n- <param name="columns" type="text" value="" label="Columns" optional="true"\n- help="list of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG. See man page for details">\n+ <param name="columns" type="text" value="" optional="true" label="Columns"\n+ help="List of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG. See man page for details">\n <validator type="regex" message="COLUMN names separated by commas">^([^,]+(,[^,]+)*)?$</validator>\n </param>\n </xml>\n' |
b |
diff -r b641062a2587 -r baa8823f8073 test-data/summary.pdf |
b |
Binary file test-data/summary.pdf has changed |
b |
diff -r b641062a2587 -r baa8823f8073 test-data/view.bcf |
b |
Binary file test-data/view.bcf has changed |
b |
diff -r b641062a2587 -r baa8823f8073 test-data/view.bcf.csi |
b |
Binary file test-data/view.bcf.csi has changed |
b |
diff -r b641062a2587 -r baa8823f8073 test-data/view.vcf_bgzip |
b |
Binary file test-data/view.vcf_bgzip has changed |