Mercurial > repos > iuc > data_manager_build_bracken_database
view data_manager/bracken_build_database.xml @ 6:84cc0dc92b0c draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_bracken_database/ commit c0f150357d52e21443197b2ec1427feb9fc7971e
author | iuc |
---|---|
date | Wed, 06 Mar 2024 14:09:08 +0000 |
parents | 5c8a23ccb14a |
children |
line wrap: on
line source
<?xml version="1.0"?> <tool id="bracken_build_database" name="Bracken Database Builder" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description>bracken database builder</description> <macros> <token name="@TOOL_VERSION@">2.8</token> <token name="@VERSION_SUFFIX@">0</token> <token name="@PROFILE@">22.01</token> </macros> <requirements> <requirement type="package" version="@TOOL_VERSION@">bracken</requirement> </requirements> <command> <![CDATA[ #import os #set db_dir = os.path.basename($kraken_db.fields.path) mkdir '$db_dir' && ln -s '${kraken_db.fields.path}/*' '$db_dir/' && python '$__tool_directory__/bracken_build_database.py' '${out_file}' --threads \${GALAXY_SLOTS:-1} #if $check_prebuilt.prebuilt == "no" --kraken-db '$db_dir' --kmer-len ${check_prebuilt.kmer_len} #end if #if $check_prebuilt.prebuilt == "yes" --kraken-db '${kraken_db.fields.path}' --prebuilt #end if --read-len ${check_prebuilt.read_len} --database-name '${database_name}' ]]> </command> <inputs> <param name="kraken_db" type="select"> <options from_data_table="kraken2_databases"> <validator type="no_options" message="No Kraken2 databases are available" /> </options> </param> <conditional name="check_prebuilt"> <param name="prebuilt" type="select" label="Use Pre-built DB" help="Use existing pre-built DB. This only works for kraken DBs, that already contain additional bracken DBs. This is the case for DBs downloaded from https://benlangmead.github.io/aws-indexes/k2."> <option value="no">No</option> <option value="yes">Yes</option> </param> <when value="no"> <param name="kmer_len" type="integer" min="8" max="256" value="35" label="K-mer length" help="The K-mer length of the bracken DB should be identical to the K-mer length used to build the kraken2 DB." /> <param name="read_len" type="integer" min="8" max="1000" value="100" label="Read length" help="The read length of the bracken DB should be the same as the length of the reads to be analysis (one read in case of paired reads)." /> </when> <when value="yes"> <param name="read_len" type="select" label="Read length" help="The read length of the bracken DB should be the same as the length of the reads to be analysis (one read in case of paired reads). The prebuilt DBs where built using the same K-mer length as the kraken2 DB."> <option value="50">50</option> <option value="75">75</option> <option value="100" selected="true">100</option> <option value="150">150</option> <option value="200">200</option> <option value="250">250</option> <option value="300">300</option> </param> </when> </conditional> <param name="database_name" type="text" label="Database Name" help="Please add a clear reference to the corresponding kraken2 DB the read length to the name." /> </inputs> <outputs> <data name="out_file" format="data_manager_json" /> </outputs> <tests> <test> <param name="kraken_db" value="test_entry" /> <param name="database_name" value="database" /> <output name="out_file"> <assert_contents> <has_text text="test_db/database100mers.kmer_distrib" /> </assert_contents> </output> </test> </tests> <help> A bracken DB can only be built as an addition to an existing kracken2 DB (see `Bracken docs`_). .. _Bracken docs: https://github.com/jenniferlu717/Bracken?tab=readme-ov-file#step-1-generate-the-bracken-database-file-databasexmerskmer_distrib-1 ====================================== Using prebuilt DBs ====================================== The prebuilt option does use existing bracken DBs, that are shipped with kraken2 DBs. This is the case for DBs downloaded from https://benlangmead.github.io/aws-indexes/k2. All prebuilt databases contain a Kraken 2 database along with Bracken databases built for 50, 75, 100, 150, 200, 250 and 300 read lengths (refering to the lenght of the sequenced reads to be analysis using that database (one read in case of paired reads)). In this case the data manager points to the same DB as the kracken2 DB. **The prebuilt option must not be used for custom kraken2 DBs ! For this the bracken DB needs to be build.** ====================================== Building new DBs ====================================== Use the same K-mer length as the kraken2 DB and choose read lengths that are close to the read length of analysis you want to perform (one read in case of paired reads). </help> <citations> <citation type="doi">10.7717/peerj-cs.104</citation> </citations> </tool>