Repository revision
5:e9bd16ba5ebd

Repository 'purge_dups'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/purge_dups

Purge overlaps tool metadata
Miscellaneous
and haplotigs in an assembly based on read depth (purge_dups)
purge_dups
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.6+galaxy0
1.2.6+galaxy0
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.6+galaxy0 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.5+galaxy4
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.5+galaxy3
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.5+galaxy2
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.5+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/purge_dups/purge_dups/1.2.5+galaxy0
purge_dups
Requirements (dependencies defined in the <requirements> tag set)
name version type
purge_dups 1.2.6 package
matplotlib-base 3.5.2 package
Additional information about this tool
#if $function_select.functions == 'purge_dups':
            #for $i, $file in enumerate($function_select.input):
                #if $file.is_of_type("paf"):
                    gzip -c '${file}' > '${i}.gz' &&
                #else
                    ln -s '${file}' '${i}.gz' &&
                #end if
            #end for
            purge_dups
            #if $function_select.coverage:
                -c '${function_select.coverage}'
            #end if
            #if $function_select.cutoffs:
                -T '${function_select.cutoffs}'
            #end if
            -f $function_select.min_bad
            -a $function_select.min_align
            -b $function_select.min_match
            -m $function_select.min_chain
            -M $function_select.max_gap
            #if $function_select.double_chain.chaining_rounds == 'two':
                -2
                -G $function_select.double_chain.max_gap_2
            #end if
            -l $function_select.min_chain_score
            -E $function_select.max_extend
            #for $i, $file in enumerate($function_select.input):
                '${i}.gz'
            #end for
            > dups.bed 2> purge_dups.log
        #else if $function_select.functions == 'split_fa':
            split_fa
            '${function_select.input}' > split.fasta
        #else if $function_select.functions == 'pbcstat':
            #for $i, $file in enumerate($function_select.input):
                #if $file.is_of_type('paf'):
                    gzip -c '${file}' > '${i}.gz' &&
                #else
                    ln -s '${file}' '${i}.gz' &&
                #end if
            #end for
            pbcstat
            -M $function_select.pbcstat_options.max_cov
            -f $function_select.pbcstat_options.min_map_ratio
            #if $function_select.pbcstat_options.min_map_qual:
                -q $function_select.pbcstat_options.min_map_qual
            #end if
            -l $function_select.pbcstat_options.flank
            $function_select.pbcstat_options.primary_alignments
            #for $i, $file in enumerate($function_select.input):
                '${i}.gz'
            #end for
            && mv PB.stat depth.stat
            && 
        calcuts
        #if $function_select.section_calcuts.min_depth:
            -f $function_select.section_calcuts.min_depth
        #end if
        #if $function_select.section_calcuts.low_depth:
            -l $function_select.section_calcuts.low_depth
        #end if
        #if $function_select.section_calcuts.transition:
            -m $function_select.section_calcuts.transition
        #end if
        #if $function_select.section_calcuts.upper_depth:
            -u $function_select.section_calcuts.upper_depth
        #end if
        $function_select.section_calcuts.ploidy
     depth.stat > cutoffs.tsv 2>calcuts.log
            && 
        python '$__tool_directory__/hist_plot.py' 
        --cutoffs cutoffs.tsv
        #if $function_select.section_hist.ymin
            --ymin $function_select.section_hist.ymin
        #end if
        #if $function_select.section_hist.ymax
            --ymax $function_select.section_hist.ymax
        #end if
        #if $function_select.section_hist.xmin
            --xmin $function_select.section_hist.xmin
        #end if
        #if $function_select.section_hist.xmax
            --xmax $function_select.section_hist.xmax
        #end if
        #if $function_select.section_hist.title
            --title '${function_select.section_hist.title}'
        #end if
        depth.stat hist.png
    

        #else if $function_select.functions == 'ngscstat':
            ngscstat
            -q $function_select.ngscstat_options.min_align_qual
    ##        #if $function_select.max_depth:
    ##            -M $function_select.max_depth
    ##        #end if
            -L $function_select.ngscstat_options.max_insert
            '${function_select.input}'
            && mv TX.stat depth.stat
            && 
        calcuts
        #if $function_select.section_calcuts.min_depth:
            -f $function_select.section_calcuts.min_depth
        #end if
        #if $function_select.section_calcuts.low_depth:
            -l $function_select.section_calcuts.low_depth
        #end if
        #if $function_select.section_calcuts.transition:
            -m $function_select.section_calcuts.transition
        #end if
        #if $function_select.section_calcuts.upper_depth:
            -u $function_select.section_calcuts.upper_depth
        #end if
        $function_select.section_calcuts.ploidy
     depth.stat > cutoffs.tsv 2>calcuts.log
            && 
        python '$__tool_directory__/hist_plot.py' 
        --cutoffs cutoffs.tsv
        #if $function_select.section_hist.ymin
            --ymin $function_select.section_hist.ymin
        #end if
        #if $function_select.section_hist.ymax
            --ymax $function_select.section_hist.ymax
        #end if
        #if $function_select.section_hist.xmin
            --xmin $function_select.section_hist.xmin
        #end if
        #if $function_select.section_hist.xmax
            --xmax $function_select.section_hist.xmax
        #end if
        #if $function_select.section_hist.title
            --title '${function_select.section_hist.title}'
        #end if
        depth.stat hist.png
     

        #else if $function_select.functions == 'calcuts':
            
        calcuts
        #if $function_select.section_calcuts.min_depth:
            -f $function_select.section_calcuts.min_depth
        #end if
        #if $function_select.section_calcuts.low_depth:
            -l $function_select.section_calcuts.low_depth
        #end if
        #if $function_select.section_calcuts.transition:
            -m $function_select.section_calcuts.transition
        #end if
        #if $function_select.section_calcuts.upper_depth:
            -u $function_select.section_calcuts.upper_depth
        #end if
        $function_select.section_calcuts.ploidy
     '${function_select.input}' > cutoffs.tsv 2>calcuts.log

        #else if $function_select.functions == 'get_seqs':
            get_seqs
            $function_select.advanced_options.coverage
            $function_select.advanced_options.haplotigs
            $function_select.advanced_options.end_trim
            $function_select.advanced_options.split
            -l $function_select.advanced_options.length
            -m $function_select.advanced_options.min_ratio
            -g $function_select.advanced_options.min_gap
            '${function_select.bed_input}' '${function_select.fasta_input}'
        #end if
    
None
False
Functional tests
name inputs outputs required files
Test-1 function_select|input: assembly_test.paf
function_select|coverage: test.cov
function_select|cutoffs: cutoffs.tsv
function_select|min_bad: 0.01
function_select|min_align: 10
function_select|min_match: 100
function_select|min_chain: 1
function_select|max_gap: 1000
function_select|double_chain|max_gap_2: 1001
function_select|double_chain|chaining_rounds: two
function_select|min_chain_score: 1
function_select|max_extend: 100
function_select|functions: purge_dups
name: value
assembly_test.paf
test.cov
cutoffs.tsv
value
Test-2 function_select|input: assembly_test.paf.gz
function_select|coverage: test.cov
function_select|cutoffs: cutoffs.tsv
function_select|min_bad: 0.01
function_select|min_align: 10
function_select|min_match: 100
function_select|min_chain: 1
function_select|max_gap: 1000
function_select|double_chain|max_gap_2: 1001
function_select|double_chain|chaining_rounds: two
function_select|min_chain_score: 1
function_select|max_extend: 100
function_select|log_file: True
function_select|functions: purge_dups
name: value
name: value
assembly_test.paf.gz
test.cov
cutoffs.tsv
value
Test-3 function_select|input: ['assembly_test.paf', 'test2.paf.gz']
function_select|functions: purge_dups
name: value
assembly_test.paf
test2.paf.gz
value
Test-4 function_select|input: assembly_test.fasta
function_select|functions: split_fa
name: value
assembly_test.fasta
value
Test-5 function_select|input: assembly_test.paf
function_select|pbcstat_options|max_cov: 1000
function_select|pbcstat_options|min_map_ratio: 0.01
function_select|pbcstat_options|min_map_qual: 1
function_select|pbcstat_options|flank: 1
function_select|pbcstat_options|primary_alignments: True
function_select|section_calcuts|min_depth: 0.01
function_select|section_calcuts|low_depth: 1
function_select|section_calcuts|transition: 1
function_select|section_calcuts|upper_depth: 100
function_select|section_calcuts|ploidy: -d 0
function_select|output_options: ['pbcstat_coverage', 'pbcstat_wig', 'depth_stats', 'histogram', 'calcuts_cutoff', 'calcuts_log']
function_select|functions: pbcstat
name: value
name: value
name: value
name: value
name: value
name: value
assembly_test.paf
value
Test-6 function_select|input: assembly_test.paf.gz
function_select|pbcstat_options|max_cov: 1000
function_select|pbcstat_options|min_map_ratio: 0.01
function_select|pbcstat_options|min_map_qual: 1
function_select|pbcstat_options|flank: 1
function_select|pbcstat_options|primary_alignments: True
function_select|section_calcuts|min_depth: 0.01
function_select|section_calcuts|low_depth: 1
function_select|section_calcuts|transition: 1
function_select|section_calcuts|upper_depth: 100
function_select|section_calcuts|ploidy: -d 0
function_select|output_options: ['pbcstat_coverage', 'calcuts_cutoff']
function_select|functions: pbcstat
name: value
name: value
assembly_test.paf.gz
value
Test-7 function_select|input: ['assembly_test.paf', 'test2.paf.gz']
function_select|section_calcuts|min_depth: 0.01
function_select|section_calcuts|low_depth: 1
function_select|section_calcuts|transition: 1
function_select|section_calcuts|upper_depth: 100
function_select|section_calcuts|ploidy: -d 0
function_select|output_options: ['pbcstat_coverage', 'calcuts_cutoff']
function_select|functions: pbcstat
name: value
name: value
assembly_test.paf
test2.paf.gz
value
Test-8 function_select|input: test.bam
function_select|ngscstat_options|min_align_qual: 10
function_select|ngscstat_options|max_insert: 100
function_select|section_calcuts|min_depth: 0.01
function_select|section_calcuts|low_depth: 1
function_select|section_calcuts|transition: 1
function_select|section_calcuts|upper_depth: 100
function_select|section_calcuts|ploidy: -d 0
function_select|output_options: ['ngscstat_coverage', 'calcuts_cutoff']
function_select|functions: ngscstat
name: value
name: value
test.bam
value
Test-9 function_select|input: test.stat
function_select|section_calcuts|min_depth: 0.01
function_select|section_calcuts|low_depth: 1
function_select|section_calcuts|transition: 1
function_select|section_calcuts|upper_depth: 100
function_select|section_calcuts|ploidy: -d 0
function_select|functions: calcuts
name: value
name: value
test.stat
value
Test-10 function_select|fasta_input: split_out.fasta
function_select|bed_input: dups.bed
function_select|advanced_options|coverage: True
function_select|advanced_options|haplotigs: True
function_select|advanced_options|length: 10
function_select|advanced_options|min_ratio: .01
function_select|advanced_options|end_trim: True
function_select|advanced_options|split: True
function_select|advanced_options|min_gap: 100000
function_select|functions: get_seqs
name: value
name: value
split_out.fasta
dups.bed
value
Test-11 function_select|input: assembly_test.paf
function_select|pbcstat_options|max_cov: 1000
function_select|pbcstat_options|min_map_ratio: 0.01
function_select|pbcstat_options|min_map_qual: 1
function_select|pbcstat_options|flank: 1
function_select|pbcstat_options|primary_alignments: True
function_select|section_calcuts|min_depth: 0.01
function_select|section_calcuts|low_depth: 1
function_select|section_calcuts|transition: 1
function_select|section_calcuts|upper_depth: 100
function_select|section_calcuts|ploidy: -d 0
function_select|section_hist|ymax: 100
function_select|section_hist|xmax: 100
function_select|output_options: histogram
function_select|functions: pbcstat
name: value
assembly_test.paf
value