Repository revision
13:38ecfb8d52c6

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

Stacks: assemble read pairs by locus tool metadata
Miscellaneous
run the STACKS sort_read_pairs.pl and exec_velvet.pl wrappers
stacks_assembleperead
toolshed.g2.bx.psu.edu/repos/iuc/stacks_assembleperead/stacks_assembleperead/1.46.1
1.46.1
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/stacks_assembleperead/stacks_assembleperead/1.46.1 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/stacks_assembleperead/stacks_assembleperead/1.46.0
toolshed.g2.bx.psu.edu/repos/iuc/stacks_assembleperead/stacks_assembleperead/1.42.0
toolshed.g2.bx.psu.edu/repos/iuc/stacks_assembleperead/stacks_assembleperead/1.40.1
toolshed.g2.bx.psu.edu/repos/iuc/stacks_assembleperead/stacks_assembleperead/1.40.0
stacks_assembleperead
Requirements (dependencies defined in the <requirements> tag set)
name version type
stacks 1.46 package
velvet 1.2.10 package
stacks_summary 1.1 package
Additional information about this tool
mkdir stacks_inputs reads stacks_outputs
        &&
        #for $input_file in $stacks_col
            #set $ext = ""
            #if not str($input_file.element_identifier).endswith('.tsv')
                #set $ext = ".tsv"
            #end if
            ln -s '${input_file}' 'stacks_inputs/${input_file.element_identifier}${ext}' &&
        #end for

        #for $input_file in $reads
            #set $name = str($input_file.element_identifier)
            ## sort_read_pairs is expecting strange fastq names: <sample_name>.fq_2
            #if $name.endswith('.1.fq')
                ## handle a common case
                #set $name = $name[:-5]+".fq_1"
            #else if $name.endswith('.2.fq')
                ## handle a common case
                #set $name = $name[:-5]+".fq_2"
            #else if not $name.endswith('.fq') and not $name.endswith('.fq_2')
                ## no extension, consider it's a fq_2 file
                #set $name = $name + ".fq_2"
            #end if
            ln -s '${input_file}' 'reads/${name}' &&
        #end for

        sort_read_pairs.pl
            -p stacks_inputs
            -s 'reads'

            #if $whitelist
                -w '$whitelist'
            #end if

            #if $threshold
                -r $threshold
            #end if

            -o stacks_outputs

        #if $velvet.use_velvet == "yes"
            ## remove possible empty files
            && find stacks_outputs -type f -size 0 -exec rm {} \;

            &&
            mkdir assembled
            &&
            velvet_path=`which velveth` && velvet_path=`dirname "\$velvet_path"`
            &&
            exec_velvet.pl -s stacks_outputs -o assembled -c -M ${velvet.contig_length} -e "\$velvet_path"
        #end if

    
None
False
Functional tests
name inputs outputs required files
Test-1 stacks_col: list collection
reads: ['demultiplexed/PopA_01.2.fq', 'demultiplexed/PopA_02.2.fq']
genotypes/batch_1.catalog.alleles.tsv
genotypes/batch_1.catalog.snps.tsv
genotypes/batch_1.catalog.tags.tsv
genotypes/PopA_01.alleles.tsv
genotypes/PopA_01.matches.tsv
genotypes/PopA_01.snps.tsv
genotypes/PopA_01.tags.tsv
genotypes/PopA_02.alleles.tsv
genotypes/PopA_02.matches.tsv
genotypes/PopA_02.snps.tsv
genotypes/PopA_02.tags.tsv
demultiplexed/PopA_01.2.fq
demultiplexed/PopA_02.2.fq
Test-2 stacks_col: list collection
reads: ['demultiplexed/PopA_01.2.fq', 'demultiplexed/PopA_02.2.fq']
velvet|contig_length: 20
velvet|use_velvet: yes
name: value
genotypes/batch_1.catalog.alleles.tsv
genotypes/batch_1.catalog.snps.tsv
genotypes/batch_1.catalog.tags.tsv
genotypes/PopA_01.alleles.tsv
genotypes/PopA_01.matches.tsv
genotypes/PopA_01.snps.tsv
genotypes/PopA_01.tags.tsv
genotypes/PopA_02.alleles.tsv
genotypes/PopA_02.matches.tsv
genotypes/PopA_02.snps.tsv
genotypes/PopA_02.tags.tsv
demultiplexed/PopA_01.2.fq
demultiplexed/PopA_02.2.fq
value