view parse.xml @ 7:b0a1f128fa15 draft

planemo upload for repository https://github.com/open2c/pairtools commit edb9fd7a6734203070b623876e76ce4a0a164ed9
author iuc
date Tue, 16 Apr 2024 12:51:07 +0000
parents 26ed6ceeeec1
children 44cb74c154bc
line wrap: on
line source

<tool id="pairtools_parse" name="Pairtools parse" version="@TOOL_VERSION@+galaxy1" profile="23.2" license="MIT">
    <description>Find ligation pairs in alignments and create pairs.</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        pairtools parse
            '$sam_path'
            -c '$chroms_path'
            #if str($assembly_name).strip(): 
                --assembly '$assembly_name'
            #end if
            -o '$output_parsed_pairs'
            --min-mapq '$min_mapq'
            --max-molecule-size '$max_molecule_size'
            $drop_readid
            $drop_seq
            $output_stats
            $drop_sam
            #if $output_stats:
                '$parsed_pairs_stats'
            #end if
            --walks-policy '$walks_policy'
            --max-inter-align-gap '$max_inter_algn_gap'
            --nproc-in \${GALAXY_SLOTS:-4}
            --nproc-out \${GALAXY_SLOTS:-4}
    ]]></command>
    <inputs>
        <param name="sam_path" type="data" format="sam,bam" label="Input SAM/BAM file" help="Input SAM or BAM file with paired-end sequence alignments of Hi-C molecules."/>    
        <param name="chroms_path" argument="-c" type="data" format="tabular" label="Input a chromosome order file" help="Chromosome order used to flip interchromosomal mates. Any scaffolds not listed will be ordered lexicographically."/>
        <param name="assembly_name" type="text" value="" label="Input a name of genome assembly" help="Name of genome assembly (e.g. hg19, mm10) to store in the pairs header"></param>
        <param argument="--min-mapq" type="integer" value="40" min="0" label="Minimal MAPQ" help="Minimal MAPQ score to consider a read as uniquely mapped."/>
        <param argument="--max-molecule-size" type="integer" min="0" value="750" label="Input the maximal size of a Hi-C molecule" help="The maximal size of a Hi-C molecule; used to rescue single ligations(from molecules with three alignments) and to rescue complex ligations."></param>
        <param argument="--drop-readid" type="boolean" truevalue="--drop-readid" falsevalue="" checked="False" label="Do not add read ids to the output"></param>
        <param argument="--drop-seq" type="boolean" truevalue="--drop-seq" falsevalue="" checked="False" label="remove sequences and PHREDs from the sam fields"></param>
        <param argument="--output-stats" type="boolean" truevalue="--output-stats" falsevalue="" checked="False" label="Generate various statistics of pairs file"></param>
        <param argument="--drop-sam" type="boolean" truevalue="--drop-sam" falsevalue="" checked="False" label="Do not add sams to the output"></param>    
        <param argument="--walks-policy" type="select" label="Walks Policy" help="The policy for reporting unrescuable walks.">
            <expand macro="walks_policy_options"/>
        </param>   
        <param argument="max_inter_algn_gap" type="integer" min="0" value="30" label="Max alignment gap" help="read segments that are not covered by any alignment and longer than the specified value are treated as null alignments."/>
    </inputs>
    <outputs>
        <data name="output_parsed_pairs" format="4dn_pairs" label="${tool.name} on ${on_string}: .pairs"/>
        <data name="parsed_pairs_stats" format="txt,tabular" label="${tool.name} on ${on_string}: parsed.stats">
            <filter>output_stats</filter>
        </data>
    </outputs>
    <tests>
        <!--Test 01 with SAM file as input and default parameters-->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.sam"/>
            <param name="chroms_path" value="test.genome"/>
            <param name="min_mapq" value="1"/>
            <param name="walks_policy" value="mask"/>
            <param name="max_inter_algn_gap" value="20"/>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_sam.pairs" lines_diff="10"/>
        </test>
        <!--Test 02 with BAM file as input and default parameters-->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.bam"/>
            <param name="chroms_path" value="test.reduced.chrom.sizes"/>
            <param name="min_mapq" value="1"/>
            <param name="walks_policy" value="mask"/>
            <param name="max_inter_algn_gap" value="20"/>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_bam.pairs" lines_diff="10"/>
        </test>
        <!--Test 03 with BAM file as input and minimal mapq of 40-->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.bam"/>
            <param name="chroms_path" value="test.reduced.chrom.sizes"/>
            <param name="min_mapq" value="40"/>
            <param name="walks_policy" value="mask"/>
            <param name="max_inter_algn_gap" value="20"/>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_bam_min_mapq_40.pairs" lines_diff="10"/>
        </test>
        <!--Test 04 with BAM file as input and walk policy of 5unique-->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.bam"/>
            <param name="chroms_path" value="test.reduced.chrom.sizes"/>
            <param name="min_mapq" value="40"/>
            <param name="walks_policy" value="5unique"/>
            <param name="max_inter_algn_gap" value="20"/>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_bam_5unique.pairs" lines_diff="10"/>
        </test>
        <!--Test 05 with BAM file as input and read id dropped-->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.bam"/>
            <param name="chroms_path" value="test.reduced.chrom.sizes"/>
            <param name="min_mapq" value="40"/>
            <param name="walks_policy" value="5unique"/>
            <param name="max_inter_algn_gap" value="20"/>
            <param name="drop_readid" value="true"></param>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_bam_readid_dropped.pairs" lines_diff="10"/>
        </test>
        <!--Test 06 with SAM file as input and drop_seq enabled-->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.sam"/>
            <param name="chroms_path" value="test.genome"/>
            <param name="min_mapq" value="40"/>
            <param name="walks_policy" value="5unique"/>
            <param name="max_inter_algn_gap" value="20"/>
            <param name="drop_seq" value="true"></param>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_bam_readid_dropped_seq.pairs" lines_diff="10"/>
        </test>
        <!--Test 07 with SAM file as input and output_stats enabled-->
        <test expect_num_outputs="2">
            <param name="sam_path" value="test.sam"/>
            <param name="chroms_path" value="test.genome"/>
            <param name="min_mapq" value="40"/>
            <param name="walks_policy" value="5unique"/>
            <param name="max_inter_algn_gap" value="20"/>
            <param name="output_stats" value="true"></param>
            <output name="parsed_pairs_stats" file="output_parsed_pairs.stats" lines_diff="10"/>
        </test>
        <!--Test 08 with SAM file as input and default parameters and assembly name -->
        <test expect_num_outputs="1">
            <param name="sam_path" value="test.sam"/>
            <param name="chroms_path" value="test.genome"/>
            <param name="assembly_name" value="test_assembly"/>
            <param name="min_mapq" value="1"/>
            <param name="walks_policy" value="mask"/>
            <param name="max_inter_algn_gap" value="20"/>
            <output name="output_parsed_pairs" ftype="4dn_pairs" file="output_parsed_pairs_sam_assemblyname.pairs" lines_diff="10"/>
        </test>

    </tests>
    <help><![CDATA[
        **Pairtools parse**

        Detects ligation events in the aligned sequences of DNA molecules formed in Hi-C experiments and reports them in the .pairs/.pairsam format.
        
        sam_path : an input .sam/.bam file with paired-end sequence alignments of Hi-C molecules. 
              
    ]]></help>
    <expand macro="citations"/>
    <expand macro="creator"/>
</tool>