Mercurial > repos > iuc > samtools_faidx
comparison samtools_faidx.xml @ 1:76c27c4861bd draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tool_collections/samtools/samtools_faidx commit 7ba11a2aa8901b555a95e284e4fb83c8dca2833e
| author | iuc |
|---|---|
| date | Tue, 04 Nov 2025 22:34:23 +0000 |
| parents | baa79754a17e |
| children |
comparison
equal
deleted
inserted
replaced
| 0:baa79754a17e | 1:76c27c4861bd |
|---|---|
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
| 7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
| 8 <expand macro="version_command"/> | 8 <expand macro="version_command"/> |
| 9 <command><![CDATA[ | 9 <command><![CDATA[ |
| 10 samtools | 10 #set is_fastq = ("fastq" in $input.ext) |
| 11 faidx | 11 #if $input.ext.endswith(".gz") or $input.ext.endswith(".bgz") or $input.ext == "bgzip" |
| 12 '$in_fasta' | 12 ln -s '$input' input.gz && |
| 13 --fai-idx '$output' | 13 samtools faidx |
| 14 #if $is_fastq | |
| 15 --fastq | |
| 16 #end if | |
| 17 input.gz | |
| 18 --fai-idx '$output' | |
| 19 --gzi-idx input.gz.gzi | |
| 20 || ( | |
| 21 echo "Failed to index compressed reference. Trying decompressed ..." 1>&2 && | |
| 22 gzip -dc input.gz > input.plain && | |
| 23 samtools faidx | |
| 24 #if $is_fastq | |
| 25 --fastq | |
| 26 #end if | |
| 27 input.plain | |
| 28 --fai-idx '$output' | |
| 29 ) | |
| 30 #else | |
| 31 ln -s '$input' input && | |
| 32 samtools faidx | |
| 33 #if $is_fastq | |
| 34 --fastq | |
| 35 #end if | |
| 36 input | |
| 37 --fai-idx '$output' | |
| 38 #end if | |
| 14 ]]></command> | 39 ]]></command> |
| 15 <inputs> | 40 <inputs> |
| 16 <param name="in_fasta" type="data" format="fasta,fasta.gz,fastq,fastq.gz,fastqsanger,fastqsanger.gz" label="dataset with sequences" /> | 41 <param name="input" |
| 42 type="data" | |
| 43 format="fasta,fasta.gz,fastqsanger,fastqsanger.gz,fastqillumina,fastqillumina.gz" | |
| 44 label="Dataset with sequences (FASTA or FASTQ; auto-detected)" /> | |
| 17 </inputs> | 45 </inputs> |
| 18 <outputs> | 46 <outputs> |
| 19 <data name="output" format="tabular"/> | 47 <data name="output" format="tabular"/> |
| 20 </outputs> | 48 </outputs> |
| 21 <tests> | 49 <tests> |
| 22 <test expect_num_outputs="1"> | 50 <test expect_num_outputs="1"> |
| 23 <param name="in_fasta" value="samtools_fastx-out1-2.fasta" /> | 51 <param name="input" value="samtools_fastx-out1-2.fasta" /> |
| 24 <output name="output" file="out.tabular" /> | 52 <output name="output" file="out_fasta.tabular" /> |
| 53 </test> | |
| 54 <test expect_num_outputs="1"> | |
| 55 <param name="input" value="samtools_fastx-out1-2.fasta.gz" /> | |
| 56 <output name="output" file="out_fasta.tabular" /> | |
| 57 <assert_stderr> | |
| 58 <has_line line="Failed to index compressed reference. Trying decompressed ..." /> | |
| 59 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip"/> | |
| 60 </assert_stderr> | |
| 61 </test> | |
| 62 <test expect_num_outputs="1"> | |
| 63 <param name="input" value="samtools_fastx-out1-2.fasta.bgz" /> | |
| 64 <output name="output" file="out_fasta.tabular" /> | |
| 65 <assert_stderr> | |
| 66 <has_line line="Failed to index compressed reference. Trying decompressed ..." negate="true" /> | |
| 67 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip" negate="true"/> | |
| 68 </assert_stderr> | |
| 69 </test> | |
| 70 <test expect_num_outputs="1"> | |
| 71 <param name="input" value="samtools_fastx-out1-2.fastq" /> | |
| 72 <output name="output" file="out_fastq.tabular" /> | |
| 73 </test> | |
| 74 <test expect_num_outputs="1"> | |
| 75 <param name="input" value="samtools_fastx-out1-2.fastq.gz" /> | |
| 76 <output name="output" file="out_fastq.tabular" /> | |
| 77 <assert_stderr> | |
| 78 <has_line line="Failed to index compressed reference. Trying decompressed ..."/> | |
| 79 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip"/> | |
| 80 </assert_stderr> | |
| 81 </test> | |
| 82 <test expect_num_outputs="1"> | |
| 83 <param name="input" value="samtools_fastx-out1-2.fastq.bgz" /> | |
| 84 <output name="output" file="out_fastq.tabular" /> | |
| 85 <assert_stderr> | |
| 86 <has_line line="Failed to index compressed reference. Trying decompressed ..." negate="true"/> | |
| 87 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip" negate="true"/> | |
| 88 </assert_stderr> | |
| 89 </test> | |
| 90 <test expect_num_outputs="1"> | |
| 91 <param name="input" value="samtools_fastx-out1-2.fastq" ftype="fastqsanger" /> | |
| 92 <output name="output" file="out_fastq.tabular" /> | |
| 93 </test> | |
| 94 <test expect_num_outputs="1"> | |
| 95 <param name="input" value="samtools_fastx-out1-2.fastq.gz" ftype="fastqsanger.gz" /> | |
| 96 <output name="output" file="out_fastq.tabular" /> | |
| 97 <assert_stderr> | |
| 98 <has_line line="Failed to index compressed reference. Trying decompressed ..." /> | |
| 99 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip" /> | |
| 100 </assert_stderr> | |
| 101 </test> | |
| 102 <test expect_num_outputs="1"> | |
| 103 <param name="input" value="samtools_fastx-out1-2.fastq.bgz" ftype="fastqsanger.gz" /> | |
| 104 <output name="output" file="out_fastq.tabular" /> | |
| 105 <assert_stderr> | |
| 106 <has_line line="Failed to index compressed reference. Trying decompressed ..." negate="true" /> | |
| 107 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip" negate="true" /> | |
| 108 </assert_stderr> | |
| 109 </test> | |
| 110 <test expect_num_outputs="1"> | |
| 111 <param name="input" value="samtools_fastx-out1-2.fastq" ftype="fastqillumina" /> | |
| 112 <output name="output" file="out_fastq.tabular" /> | |
| 113 </test> | |
| 114 <test expect_num_outputs="1"> | |
| 115 <param name="input" value="samtools_fastx-out1-2.fastq.gz" ftype="fastqillumina.gz" /> | |
| 116 <output name="output" file="out_fastq.tabular" /> | |
| 117 <assert_stderr> | |
| 118 <has_line line="Failed to index compressed reference. Trying decompressed ..." /> | |
| 119 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip" /> | |
| 120 </assert_stderr> | |
| 121 </test> | |
| 122 <test> | |
| 123 <param name="input" value="samtools_fastx-out1-2.fastq.bgz" ftype="fastqillumina.gz" /> | |
| 124 <output name="output" file="out_fastq.tabular" /> | |
| 125 <assert_stderr> | |
| 126 <has_line line="Failed to index compressed reference. Trying decompressed ..." negate="true" /> | |
| 127 <has_line line="[E::fai_build3_core] Cannot index files compressed with gzip, please use bgzip" negate="true" /> | |
| 128 </assert_stderr> | |
| 25 </test> | 129 </test> |
| 26 </tests> | 130 </tests> |
| 27 <help><![CDATA[ | 131 <help><![CDATA[ |
| 28 **What it does** | 132 **What it does** |
| 29 | 133 |
| 30 Runs the ``samtools faidx`` command to index reference sequence in the FASTA format reference sequence. | 134 Runs the ``samtools faidx`` command to index reference sequence in the FASTA format reference sequence. |
| 31 | 135 |
| 32 Full `documentation <https://www.htslib.org/doc/samtools-faidx.html>`_ for the faidx command. | 136 If the input file is of ``fastq`` type, passes the --fastq flag to accomodate the ``samtools faidx`` command line tool. |
| 137 | |
| 138 **Notes on compression** | |
| 139 - ``samtools faidx`` supports **BGZF-compressed** FASTA files (e.g. ``.fa.bgz`` / ``.fasta.bgz``). | |
| 140 - Plain ``.fasta.gz`` may need to be decompressed first, depending on how it was created. | |
| 141 | |
| 142 Full `documentation <https://www.htslib.org/doc/samtools-faidx.html>`_ for the faidx command. | |
| 33 ]]></help> | 143 ]]></help> |
| 34 <expand macro="citations"/> | 144 <expand macro="citations"/> |
| 35 </tool> | 145 </tool> |
