Mercurial > repos > bgruening > bismark
changeset 22:8c191acde702 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 3005cec91ca52f9d28aa2fe0bd4190555abafc35
author | bgruening |
---|---|
date | Tue, 01 Aug 2023 11:42:10 +0000 |
parents | 120b7b35e442 |
children | |
files | bismark_methylation_extractor.py bismark_methylation_extractor.xml test-data/output_splitting_report.txt |
diffstat | 3 files changed, 38 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/bismark_methylation_extractor.py Thu Apr 22 17:05:46 2021 +0000 +++ b/bismark_methylation_extractor.py Tue Aug 01 11:42:10 2023 +0000 @@ -69,6 +69,8 @@ parser.add_argument("--splitting_report", dest="splitting_report") parser.add_argument("--mbias_report", dest="mbias_report") parser.add_argument("--cytosine_report", dest="cytosine_report") + parser.add_argument("--coverage_file", dest="coverage_file") + parser.add_argument("--genome_file", dest="genome_file") parser.add_argument("--cx_context", action="store_true") @@ -133,7 +135,6 @@ "--bedGraph", "--CX_context", "--cytosine_report", - "--CX_context", "--genome_folder", tmp_genome_dir, ] @@ -175,11 +176,20 @@ glob(os.path.join(output_dir, "*CX_report.txt"))[0], args.cytosine_report, ) + else: shutil.move( glob(os.path.join(output_dir, "*CpG_report.txt"))[0], args.cytosine_report, ) + + # coverage file + if args.coverage_file: + shutil.move( + glob(os.path.join(output_dir, "*datbismark.cov.gz"))[0], + args.coverage_file, + ) + # splitting report if args.splitting_report: logger.debug("Collecting splitting report.")
--- a/bismark_methylation_extractor.xml Thu Apr 22 17:05:46 2021 +0000 +++ b/bismark_methylation_extractor.xml Tue Aug 01 11:42:10 2023 +0000 @@ -1,9 +1,9 @@ -<tool id="bismark_methylation_extractor" name="Bismark Meth. Extractor" version="0.22.1" profile="18.01"> +<tool id="bismark_methylation_extractor" name="Bismark Meth. Extractor" version="0.22.1+galaxy1" profile="18.01"> <description>Reports on methylation status of reads mapped by Bismark</description> <requirements> <requirement type="package" version="0.22.1">bismark</requirement> <requirement type="package" version="1.8">samtools</requirement> - <requirement type="package" version="2.3.5">bowtie2</requirement> + <requirement type="package" version="2.4.4">bowtie2</requirement> </requirements> <command><![CDATA[ python '$__tool_directory__/bismark_methylation_extractor.py' @@ -45,6 +45,9 @@ #if $cytosine_report['cytosine_report_selector']: --cytosine_report '$output_cytosine_report' + #if $cytosine_report['coverage_output']: + --coverage_file '$coverage_file' + #end if #if $cytosine_report.refGenomeSource.genomeSource == "built_in_fasta": --genome_file '${cytosine_report.refGenomeSource.built_in_fasta.fields.path}' #else: @@ -128,6 +131,9 @@ </conditional> <param name="cpg_context" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Reports Cpg Context only"/> + <param name="coverage_output" type="boolean" truevalue="true" falsevalue="false" checked="False" + label="Generate Bismark coverage report"/> + </when> <when value="false"></when> </conditional> @@ -158,6 +164,10 @@ label="${tool.name} on ${on_string}: Genome-wide methylation report."> <filter>( cytosine_report['cytosine_report_selector'] )</filter> </data> + <data format="tabular.gz" name="coverage_file" + label="${tool.name} on ${on_string}:Coverage file."> + <filter>( cytosine_report['cytosine_report_selector'] and cytosine_report['coverage_output'])</filter> + </data> <data format="zip" name="compressed_output" label="${tool.name} on ${on_string}: Result archive."/> <data name="log_report" format="txt" label="${tool.name} on ${on_string}: log report (tool stdout)"> <filter>( output_settings['separate_logfile'] is True )</filter> @@ -184,6 +194,20 @@ </assert_contents> </output> </test> + <!--Test coverage output --> + <test> + <param name="input" value="mapped_reads.bam" ftype="qname_sorted.bam"/> + <param name="sPaired" value="single"/> + <param name="cytosine_report_selector" value="true"/> + <param name="genomeSource" value="history"/> + <param name="own_file" value="mm10.tiny.fa.gz" /> + <param name="coverage_output" value="true"/> + <output name="coverage_file" ftype="tabular.gz"> + <assert_contents> + <has_size value="19960" delta="300"/> + </assert_contents> + </output> + </test> </tests> <help>
--- a/test-data/output_splitting_report.txt Thu Apr 22 17:05:46 2021 +0000 +++ b/test-data/output_splitting_report.txt Tue Aug 01 11:42:10 2023 +0000 @@ -1,4 +1,4 @@ -dataset_76c1988f-01b0-427e-9dbe-bfb5eee1c664.dat +dataset_4c47ea8c-d35c-4f79-9403-33b9e262c542.dat Parameters used to extract methylation information: Bismark Extractor Version: v0.22.1