Hi all. I'm making a custom bowtie tool, because the current bowtie tool only accepts FASTQ files and outputs sam files; my lab needs a bowtie tool that accepts FASTA files and outputs map files. However, I'm running into an issue with the way bowtie reads indexes and the way Galaxy stores data.
I'm trying to combine the index building and mapping into one tool the way the current bowtie tool does, but I'm having trouble saving the index output to a temporary directory to then be called by bowtie. I get the following error:
Error: Could not locate a Bowtie index corresponding to basename "indexes/index"
The code I currently have is as follows:
<tool id="bowtie" name="FASTA Bowtie Mapper"> <command> /Users/vanopijn/Desktop/Tn-Seq/bowtie/bowtie-build $genome indexes/index | /Users/vanopijn/galaxy/scripts/stderr_wrapper.py /Users/vanopijn/Desktop/Tn-Seq/bowtie/bowtie -f #if $discard.multi == "yes": -m 1 #end if -n $mismatches --best -k 1 -y -p 2 #if $show.unmatched == "yes": --un $output2 #end if #if $show.unmatched == "yes": --un $output2 #end if indexes/index $input > $output </command> <inputs> <param name="input" type="data" label="Reads to map" /> <param name="genome" type="data" label="Genome to which to map (fasta file)"/> <conditional name="discard"> <param name="multi" type="select" label="Discard reads mapped to multiple locations?"> <option value="no">No</option> <option value="yes">Yes</option> </param> </conditional> <conditional name="show"> <param name="unmatched" type="select" label="Send unmatched reads to an output file?"> <option value="no">No</option> <option value="yes">Yes</option> </param> </conditional> <param name="mismatches" type="float" value="1" label="Number of mismatches allowed"/> </inputs> <outputs> <data format="map" name="output" /> <data format="fasta" name="output2" /> </outputs> <help> </help> </tool>
The way I see it I can either do this - combining the index building and mapping - or make indexes first then use them as input for the bowtie tool. However, either way I need a way to make a temporary "directory" for the bowtie tool to use. Does anyone have any experience making a temporary directory with the xml file (as I'm trying to do above) or with history files? Any ideas on getting around all this would be appreciated as well, although I definitely can't use the in-built mapping tool because of its output format.