Mercurial > repos > nml > biohansel
comparison biohansel.xml @ 6:ba6a0af656a6 draft
planemo upload for repository https://github.com/phac-nml/biohansel commit 27adc5d715e9adc4b037586cccf1244cf031a7af
author | nml |
---|---|
date | Wed, 20 Mar 2019 13:44:02 -0400 |
parents | c0b8de7aa02e |
children | 3360158bb0c5 |
comparison
equal
deleted
inserted
replaced
5:c0b8de7aa02e | 6:ba6a0af656a6 |
---|---|
1 <tool id="biohansel" name="biohansel" version="2.1.4"> | 1 <tool id="biohansel" name="biohansel" version="2.1.5"> |
2 <description>SNP subtyping of genome sequence reads or assemblies</description> | 2 <description>SNP subtyping of genome sequence reads or assemblies</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="2.1.1">bio_hansel</requirement> | 4 <requirement type="package" version="2.1.1">bio_hansel</requirement> |
5 </requirements> | 5 </requirements> |
6 <command detect_errors="exit_code"> | 6 <command detect_errors="exit_code"> |
8 | 8 |
9 #import re | 9 #import re |
10 | 10 |
11 ## Illumina FASTQ naming regular expression (https://github.com/phac-nml/biohansel/issues/38) | 11 ## Illumina FASTQ naming regular expression (https://github.com/phac-nml/biohansel/issues/38) |
12 #set global $ILLUMINA_REGEX = $re.compile(r'^([\w\-\_]+)_S\d+_L\d{3}_R(\d)_001\.fastq(\.gz)?$') | 12 #set global $ILLUMINA_REGEX = $re.compile(r'^([\w\-\_]+)_S\d+_L\d{3}_R(\d)_001\.fastq(\.gz)?$') |
13 #set global $FASTQ_DUMP_REGEX = $re.compile(r'^(\w+|\d+):((forward|reverse)(_\d+)?)\.fastq(\.gz|sanger|sanger\.gz)?$') | 13 #set global $FASTQ_DUMP_REGEX = $re.compile(r'^(\w+|\d+):((forward|reverse)(_\d+)?)') |
14 | 14 |
15 #def is_gzipped_fastq($data_input) | 15 #def is_gzipped_fastq($data_input) |
16 ## Is FASTQ data param gzipped type? i.e. either 'fastq.gz' or 'fastqsanger.gz'? | 16 ## Is FASTQ data param gzipped type? i.e. either 'fastq.gz' or 'fastqsanger.gz'? |
17 #return $data_input.is_of_type('fastqsanger.gz') or $data_input.is_of_type('fastq.gz') | 17 #return $data_input.is_of_type('fastqsanger.gz') or $data_input.is_of_type('fastq.gz') |
18 #end def | 18 #end def |
27 #set $illumina_match = $ILLUMINA_REGEX.match($name) | 27 #set $illumina_match = $ILLUMINA_REGEX.match($name) |
28 #set $fastq_dump_match = $FASTQ_DUMP_REGEX.match($name) | 28 #set $fastq_dump_match = $FASTQ_DUMP_REGEX.match($name) |
29 | 29 |
30 #if $illumina_match | 30 #if $illumina_match |
31 #return $illumina_match.group(1) | 31 #return $illumina_match.group(1) |
32 #elif $fastq_dump_match | |
33 #return $fastq_dump_match.group(1) | |
32 #elif $re.search(r'_R(1|2)', $name): | 34 #elif $re.search(r'_R(1|2)', $name): |
33 #return $re.sub(r'(.+)_R(1|2)([^\.]*)(\..+)', r'\1\3', $name) | 35 #return $re.sub(r'(.+)_R(1|2)([^\.]*)(\..+)', r'\1\3', $name) |
34 #elif $re.match(r'.+_\d\.', $name): | 36 #elif $re.match(r'.+_\d\.', $name): |
35 #return $re.sub(r'(.+)_(\d)(\..+)', r'\1', $name) | 37 #return $re.sub(r'(.+)_(\d)(\..+)', r'\1', $name) |
36 #elif $fastq_dump_match | |
37 #return $fastq_dump_match.group(1) | |
38 #else | 38 #else |
39 #return $name | 39 #return $name |
40 #end if | 40 #end if |
41 #end def | 41 #end def |
42 | 42 |