|
20 | 20 | ## run pbmm2 |
21 | 21 | pbmm2 align |
22 | 22 | -j \${GALAXY_SLOTS:-4} |
23 | | - #if str($output_options.l): |
24 | | - -l $output_options.l |
25 | | - #end if |
26 | | - #if str($output_options.N): |
27 | | - -N $output_options.N |
| 23 | + -l $output_options.l |
| 24 | + -N $output_options.N |
| 25 | + #if $output_options.secondary: |
| 26 | + --secondary |
| 27 | + #if $output_options.max_secondary_alns: |
| 28 | + --max-secondary-alns $output_options.max_secondary_alns |
| 29 | + #end if |
28 | 30 | #end if |
29 | 31 | --preset $preset |
30 | 32 | '$reads_fn' |
|
42 | 44 | <when value="cached"> |
43 | 45 | <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list"> |
44 | 46 | <options from_data_table="all_fasta"> |
45 | | - <filter type="sort_by" column="2" /> |
46 | | - <validator type="no_options" message="No reference genomes are available" /> |
| 47 | + <filter type="sort_by" column="2"/> |
| 48 | + <validator type="no_options" message="No reference genomes are available"/> |
47 | 49 | </options> |
48 | 50 | <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> |
49 | 51 | </param> |
50 | 52 | </when> |
51 | 53 | <when value="history"> |
52 | | - <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" /> |
| 54 | + <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference"/> |
53 | 55 | </when> |
54 | 56 | </conditional> |
55 | 57 | <param type="data" name="reads" format="fastq,fastq.gz,fasta,fasta.gz,bam" label="reads" help="PacBio reads in BAM or [gzipped] fasta or fastq format"/> |
56 | | - <param argument="--preset" type="select" |
57 | | - label="Set alignment mode"> |
| 58 | + <param argument="--preset" type="select" label="Set alignment mode"> |
58 | 59 | <option value="CCS">PacBio CCS or HiFi reads</option> |
59 | 60 | <option value="SUBREAD">PacBio CLR or raw subreads</option> |
60 | 61 | <option value="ISOSEQ">PacBio IsoSeq transcripts</option> |
|
63 | 64 | <section name="output_options" title="Output Options" help="Sets -l, -N, --strip, --split-by-sample, --unmapped, --short-sa-cigar" expanded="False"> |
64 | 65 | <param argument="-l" type="integer" min="0" label="Minimum mapped read length in basepairs" value="50" optional="true"/> |
65 | 66 | <param argument="-N" type="integer" min="0" label="Output at maximum N alignments for each read, 0 means no maximum" value="0" optional="true"/> |
| 67 | + <param argument="--secondary" type="boolean" truevalue="--secondary" falsevalue="" label="Include secondary alignments in output" help="enable secondary alignment output."/> |
| 68 | + <param argument="--max-secondary-alns" type="integer" min="0" label="Maximum number of secondary alignments to output per read. Should be used along with --secondary argument" value="" optional="true"/> |
66 | 69 | </section> |
67 | 70 | </inputs> |
68 | 71 | <outputs> |
69 | | - <data name="bam" format="bam" from_work_dir="out.aligned.bam" label="${tool.name} on ${on_string} (BAM file)"/> |
| 72 | + <data name="bam" format="bam" from_work_dir="out.aligned.bam" label="${tool.name} on ${on_string}: BAM file"/> |
70 | 73 | </outputs> |
71 | 74 | <tests> |
72 | 75 | <!-- test1: basic test --> |
73 | 76 | <test expect_num_outputs="1"> |
74 | 77 | <conditional name="reference_source"> |
75 | | - <param name="reference_source_selector" value="history" /> |
| 78 | + <param name="reference_source_selector" value="history"/> |
76 | 79 | <param name="ref_file" ftype="fasta" value="bnd-ref.fasta"/> |
77 | 80 | </conditional> |
78 | 81 | <param name="reads" value="bnd.bam"/> |
79 | 82 | <output name="bam"> |
80 | 83 | <assert_contents> |
81 | | - <has_size value="2778" delta="200" /> |
| 84 | + <has_size value="2778" delta="200"/> |
82 | 85 | </assert_contents> |
83 | 86 | </output> |
84 | 87 | </test> |
85 | 88 | <!-- test2: map some reads for use with pbgcpp --> |
86 | 89 | <test expect_num_outputs="1"> |
87 | 90 | <conditional name="reference_source"> |
88 | | - <param name="reference_source_selector" value="history" /> |
| 91 | + <param name="reference_source_selector" value="history"/> |
89 | 92 | <param name="ref_file" ftype="fasta" value="All4mer.V2.01_Insert.fa"/> |
90 | 93 | </conditional> |
91 | 94 | <param name="reads" value="out.aligned_subreads.bam"/> |
92 | 95 | <param name="preset" value="SUBREAD"/> |
93 | 96 | <output name="bam"> |
94 | 97 | <assert_contents> |
95 | | - <has_size value="538329" delta="50000" /> |
| 98 | + <has_size value="538329" delta="50000"/> |
96 | 99 | </assert_contents> |
97 | 100 | </output> |
98 | 101 | </test> |
99 | 102 | <!-- test3: cached genome --> |
100 | 103 | <test> |
101 | 104 | <conditional name="reference_source"> |
102 | | - <param name="reference_source_selector" value="cached" /> |
| 105 | + <param name="reference_source_selector" value="cached"/> |
| 106 | + <param name="ref_file" value="bnd-ref"/> |
| 107 | + </conditional> |
| 108 | + <param name="reads" value="bnd.bam"/> |
| 109 | + <output name="bam"> |
| 110 | + <assert_contents> |
| 111 | + <has_size value="2778" delta="200"/> |
| 112 | + </assert_contents> |
| 113 | + </output> |
| 114 | + </test> |
| 115 | + <!-- test4: secondary alignments --> |
| 116 | + <test> |
| 117 | + <conditional name="reference_source"> |
| 118 | + <param name="reference_source_selector" value="cached"/> |
103 | 119 | <param name="ref_file" value="bnd-ref"/> |
104 | 120 | </conditional> |
105 | 121 | <param name="reads" value="bnd.bam"/> |
| 122 | + <section name="output_options"> |
| 123 | + <param name="secondary" value="true"/> |
| 124 | + <param name="max_secondary_alns" value="5"/> |
| 125 | + </section> |
106 | 126 | <output name="bam"> |
107 | 127 | <assert_contents> |
108 | | - <has_size value="2778" delta="200" /> |
| 128 | + <has_size value="2850" delta="200"/> |
109 | 129 | </assert_contents> |
110 | 130 | </output> |
111 | 131 | </test> |
|
0 commit comments