Mercurial > repos > iuc > colibread_lordec
diff macros.xml @ 6:a32b531f66a0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/colibread commit 8d37fef93da141323cc120b5fec737432e497dcf"
author | iuc |
---|---|
date | Thu, 06 May 2021 12:44:48 +0000 |
parents | 435a98f01ae9 |
children | c126b04edfd2 |
line wrap: on
line diff
--- a/macros.xml Tue Oct 13 21:38:11 2020 +0000 +++ b/macros.xml Thu May 06 12:44:48 2021 +0000 @@ -1,34 +1,73 @@ <macros> <token name="@DISCOSNP_VERSION@">2.5.4</token> + <token name="@PROFILE@">20.01</token> + <xml name="discosnp_requirements"> <requirements> <requirement type="package" version="@DISCOSNP_VERSION@">discosnp</requirement> </requirements> </xml> - <token name="@discosnp_single_reads@"><![CDATA[ - #for $input in $input_type_options.list_reads - #set $filename = os.path.basename(str($input)) + "." + $input.ext - ln -sf '${input}' '${filename}' && + <token name="@discosnp_single_for@"><![CDATA[ + #for $input in $input_type_options.list_reads: + ]]></token> + + <token name="@discosnp_single_end_for@"><![CDATA[ echo '${filename}' >> input.lst && #end for ]]></token> - <token name="@discosnp_paired_reads@"><![CDATA[ - #for $i, $paired in enumerate( $input_type_options.list_paired_reads ) + <token name="@single_reads@"><![CDATA[ + #import re + #set $base_filename = re.sub('[^\w_]', '_', $input.element_identifier) + #if $input.ext.startswith('fasta'): + #set filename = $base_filename + ".fasta" + #else: + #set filename = $base_filename + ".fastq" + #end if + #if $input.ext.endswith('.gz'): + gunzip -c '${input}' > '${filename}' && + #else: + ln -sf '${input}' '${filename}' && + #end if + ]]></token> - #set $filenameFWD = os.path.basename(str($paired.forward)) + "." + $paired.forward.ext - ln -sf '${paired.forward}' '${filenameFWD}' && + <token name="@discosnp_paired_for@"><![CDATA[ + #for $i, $paired in enumerate($input_type_options.list_paired_reads): + ]]></token> - #set $filenameREV = os.path.basename(str($paired.reverse)) + "." + $paired.reverse.ext - ln -sf '${paired.reverse}' '${filenameREV}' && + <token name="@discosnp_paired_end_for@"><![CDATA[ + echo '${forward}' > "paired_${i}.lst" && + echo '${reverse}' >> "paired_${i}.lst" && + echo "paired_${i}.lst" >> input.lst && + #end for + ]]></token> - echo '${filenameFWD}' > "paired_${i}.lst" && - echo '${filenameREV}' >> "paired_${i}.lst" && - echo "paired_${i}.lst" >> input.lst && + <token name="@paired_reads@"><![CDATA[ + #set $base_forward = re.sub('[^\w_]', '_', $paired.forward.element_identifier) + #if $paired.forward.ext.startswith('fasta'): + #set forward = $base_forward + ".fasta" + #else: + #set forward = $base_forward + ".fastq" + #end if + #if $paired.forward.ext.endswith('.gz'): + gunzip -c '$paired.forward' > '$forward' && + #else: + ln -sf '${paired.forward}' '$forward' && + #end if - #end for + #set $base_reverse = re.sub('[^\w_]', '_', $paired.reverse.element_identifier) + #if $paired.reverse.ext.startswith('fasta'): + #set reverse = $base_reverse + ".fasta" + #else: + #set reverse = $base_reverse + ".fastq" + #end if + #if $paired.reverse.ext.endswith('.gz'): + gunzip -c '$paired.reverse' > '$reverse' && + #else: + ln -sf '${paired.reverse}' '$reverse' && + #end if ]]></token> <xml name="discosnp_inputs"> @@ -39,14 +78,14 @@ <option value="mix">Both single and paired reads</option> </param> <when value="single"> - <param name='list_reads' argument="-r" format="fasta,fastq" type="data" multiple="true" label="Single read files" /> + <param name='list_reads' argument="-r" format="fasta,fasta.gz,fastq,fastq.gz" type="data" multiple="true" label="Single read files" /> </when> <when value="paired"> - <param name='list_paired_reads' argument="-r" format="fasta,fastq" type="data_collection" collection_type="list:paired" multiple='true' label="List of paired read files" /> + <param name='list_paired_reads' argument="-r" format="fasta,fasta.gz,fastq,fastq.gz" type="data_collection" collection_type="list:paired" multiple='true' label="List of paired read files" /> </when> <when value="mix"> - <param name='list_reads' argument="-r" format="fasta,fastq" type="data" multiple="true" label="Single read files" /> - <param name='list_paired_reads' argument="-r" format="fasta,fastq" type="data_collection" collection_type="list:paired" multiple='true' label="List of paired read files"/> + <param name='list_reads' argument="-r" format="fasta,fasta.gz,fastq,fastq.gz" type="data" multiple="true" label="Single read files" /> + <param name='list_paired_reads' argument="-r" format="fasta,fasta.gz,fastq,fastq.gz" type="data_collection" collection_type="list:paired" multiple='true' label="List of paired read files"/> </when> </conditional> </xml> @@ -97,8 +136,8 @@ ]]></token> <xml name="lordec_inputs"> - <param name="inputs" argument="-2" type="data" format="fasta,fastq.gz,fastq" multiple="true" label="Short read FASTA/Q files" /> - <param argument="-i" type="data" format="fasta,fastq.gz,fastq" label="Long read FASTA/Q file" help="PacBio reads files" /> + <param name="inputs" argument="-2" type="data" format="fasta,fastq.gz,fastq,fastq.gz" multiple="true" label="Short read FASTA/Q files" /> + <param argument="-i" type="data" format="fasta,fastq.gz,fastq,fastq.gz" label="Long read FASTA/Q file" help="PacBio reads files" /> <param argument="-k" type="integer" label="Size of kmers" value="31" help="Only uneven number"/> <param argument="-s" type="integer" label="Solidity abundance threshold for k-mers" value="4" /> </xml>