Mercurial > repos > davidvanzessen > vidjil_with_browser
changeset 6:7346cd210a43 draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 12 Feb 2015 09:54:07 -0500 |
parents | b94a4ec63d12 |
children | e55dfd9a8c00 |
files | browser.zip vidjil vidjil.sh vidjil.xml |
diffstat | 4 files changed, 55 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/vidjil.sh Tue Dec 09 04:14:03 2014 -0500 +++ b/vidjil.sh Thu Feb 12 09:54:07 2015 -0500 @@ -1,4 +1,5 @@ #!/bin/bash +set -e inputFile=$1 outputFile=$2 @@ -6,14 +7,15 @@ database=$4 limit_reads=$5 limit_ratio=$6 - +selection=$7 +germline=$8 dir="$(cd "$(dirname "$0")" && pwd)" mkdir $outputDir unzip $dir/browser.zip -d $outputDir/ > $outputDir/unziplog.log -mkdir $outputDir/out +mkdir $outputDir/data if [[ "$database" == "download" ]] ; then echo "Downloading up to date database from IMGT..." @@ -28,10 +30,35 @@ else cd $dir fi -./vidjil $inputFile -y all -r ${limit_reads} -% ${limit_ratio} -b data -o $outputDir +inputFiles=$(echo "$inputFile" | tr "| " "\n") +files_for_config="" +last_file="" +for id_file in $inputFiles +do + tmp=($(echo "${id_file}" | tr ";" "\n")) + id=${tmp[0]} + file=${tmp[1]} + + ./vidjil -G germline/$germline -y all -r ${limit_reads} -% ${limit_ratio} -b $id -o $outputDir/data $file + + if [[ "$files_for_config" != "" ]] ; then + files_for_config="${files_for_config}," + fi + files_for_config="${files_for_config}'${id}.vidjil'" + last_file="${id}.vidjil" +done echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)</center></html>" > $outputFile -cd "$outputDir" +echo -e \ +"var config = {\n" \ +" 'file_menu' : {\n" \ +" 'path' : 'data/',\n" \ +" 'file' : [\n" \ +" ${files_for_config}\n" \ +" ]\n" \ +" },\n" \ +" 'autoload' : 'data/${last_file}'\n" \ +"}" > $outputDir/js/conf.js;
--- a/vidjil.xml Tue Dec 09 04:14:03 2014 -0500 +++ b/vidjil.xml Thu Feb 12 09:54:07 2015 -0500 @@ -1,19 +1,40 @@ <tool id="vidjil_galaxy_wrapper" name="Vidjil" version="1.0"> <description></description> <command interpreter="bash"> - vidjil.sh $in_file $out_file $out_file.files_path $database $limit_reads $limit_ratio + vidjil.sh " +#for $i, $f in enumerate($in_files) +${f.id};${f.in_file}| +#end for +" $out_file $out_file.files_path $database $limit_reads $limit_ratio $selection $germline </command> <inputs> - <param name="in_file" type="data" format="fasta,fastq" label="Data to Process" /> + <repeat name="in_files" title="Input Files" min="1" default="1"> + <param name="in_file" type="data" format="fasta,fastq" label="Data to Process" /> + <param name="id" type="text" label="ID" /> + </repeat> <param name="database" type="select" label="Database"> <option value="current">Germline database from IMGT of 30-9-14</option> <option value="download">Download newest database from IMGT</option> </param> + <param name="selection" type="select" label="Selection"> + <option value="clones">Clones</option> + <option value="windows">Windows</option> + <option value="segment">Segment (Not recommended)</option> + <option value="germlines">Discover all germlines</option> + </param> + <param name="germline" type="select" label="Germline"> + <option value="IGH">IGH</option> + <option value="IGK">IGK</option> + <option value="TRB">TRB</option> + <option value="IGH">IGH</option> + <option value="IGH">IGH</option> + <option value="IGH">IGH</option> + </param> <param name="limit_reads" type="text" label="Minimal number of reads supporting a clone" value='10'/> <param name="limit_ratio" type="text" label="Minimal percentage of reads supporting a clone" value='0'/> </inputs> <outputs> - <data format="html" name="out_file" label="Vidjil on ${in_file.name}"/> + <data format="html" name="out_file" label="Vidjil on blah"/> </outputs> <help> A Galaxy wrapper for Vidijl and the Vidjil browser for analysis and visualization of **FASTA** and **FASTQ** files.