Repository revision
10:67cb43432196

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

Sub.sample tool metadata
Miscellaneous
Sub.sample
Create a sub sample
mothur_sub_sample
toolshed.g2.bx.psu.edu/repos/iuc/mothur_sub_sample/mothur_sub_sample/1.39.5.0
1.39.5.0
mothur "#help()" | sed '7q;d' | cut -d" " -f2
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/mothur_sub_sample/mothur_sub_sample/1.39.5.0 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/mothur_sub_sample/mothur_sub_sample/1.36.1.0
mothur_sub_sample
Requirements (dependencies defined in the <requirements> tag set)
name version type
mothur 1.39.5 package
Additional information about this tool
set -o pipefail; export TERM=vt100; 

## create symlinks to input datasets
ln -s '$input.otu' input_otu.dat &&
ln -s '$count' count.dat &&
ln -s '$taxonomy' taxonomy.dat &&
#if $input.format == "fasta":
    ln -s '$input.name_in' input_name_in.dat &&
#end if
#if ($input.format == "fasta" or $input.format == "list") and $input.use_group.to_filter == "yes":
    ln -s '$input.use_group.group_in' input_use_group_group_in.dat &&
#end if

echo 'sub.sample(
    #if $input.format == "fasta":
        fasta=input_otu.dat
        #if $input.name_in:
            ,name=input_name_in.dat
        #end if
    #else
        #if $input.format == "list":
            list=input_otu.dat
        #elif $input.format == "sabund":
            sabund=input_otu.dat
        #elif $input.format == "rabund":
            rabund=input_otu.dat
        #elif $input.format == "shared":
            shared=input_otu.dat
            #if $input.groups:
                ,groups=${ str($input.groups).replace(",","-") }
            #end if
        #end if
        #if $input.label:
            ,label=${ str($input.label).replace(",","-") }
        #end if
    #end if
    #if $input.format == "fasta" or $input.format == "list":
        #if $input.use_group.to_filter == "yes":
            ,group=input_use_group_group_in.dat
            #if $input.use_group.groups:
                ,groups=${ str($input.use_group.groups).replace(",","-") }
            #end if
            ,persample=$input.use_group.persample
        #end if
    #end if
    #if $count:
        ,count=count.dat
    #end if
    #if $taxonomy:
        ,taxonomy=taxonomy.dat
    #end if
    #if $size:
        ,size=$size
    #end if
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    
None
False
Functional tests
name inputs outputs required files
Test-1 input|otu: amazon.an.list
input|format: list
savelog: True
name: value
amazon.an.list
value
Test-2 input|otu: amazon.an.list
input|use_group|group_in: amazon.groups
input|use_group|groups: ['forest', 'pasture']
input|use_group|to_filter: yes
input|label: ['0.20', '0.45', '0.55']
input|format: list
savelog: True
name: value
amazon.an.list
amazon.groups
value
Test-3 input|otu: amazon.fasta
input|format: fasta
taxonomy: amazon.wang.wang.taxonomy
savelog: True
name: value
name: value
name: value
amazon.fasta
amazon.wang.wang.taxonomy
value
Test-4 input|otu: amazon.fasta
input|name_in: amazon1.names
input|use_group|group_in: amazon.groups
input|use_group|groups: ['forest', 'pasture']
input|use_group|to_filter: yes
input|format: fasta
savelog: True
name: value
name: value
name: value
name: value
amazon.fasta
amazon1.names
amazon.groups
value
Test-5 input|otu: amazon.an.shared
input|groups: forest
input|label: ['unique', '0.20']
input|format: shared
savelog: True
name: value
amazon.an.shared
value
Test-6 input|otu: amazon.an.rabund
input|format: rabund
savelog: True
name: value
name: value
amazon.an.rabund
value
Test-7 input|otu: amazon.an.sabund
input|format: sabund
savelog: True
name: value
name: value
amazon.an.sabund
value
Test-8 input|otu: amazon.unique.fasta
input|format: fasta
count: amazon.count_table
savelog: True
name: value
name: value
amazon.unique.fasta
amazon.count_table
value