On Fri, Sep 30, 2011 at 10:41 AM, Paniagua, Eric <epani...@cshl.edu> wrote:
> Hi Brent,
>
> I've encountered this behavior too.  I don't know the ultimate reason or 
> purpose, but compressed files (especially zip) are handled in very specific, 
> restricted ways by the upload framework.  The behavior you describe is hard 
> coded into the upload tool.
>
> For example, check out the use of the 'zipfile' module in 
> tools/data_source/upload.py.  That file (tool) will actually try to sniff 
> your file even if you've set the file type in upload.  See the data flow (or 
> data non-flow) through local variable 'ext' in 
> tools/data_source/upload.py:add_file().  Odd and restrictive policy for 
> treatment of compressed files can be seen elsewhere in the codebase too, 
> including 
> test/base/twilltestcase.py:TwillTestCase.verify_dataset_correctness().
>
> My advice (and this is also basically the advice Nate gave me) is to fork 
> your own copy of the upload tool to make a version that works for your files.
>
> Nate may have more to say on the matter.
>
> Best,
> Eric
>


Eric, thanks for pointing me to that file. I just commented out the
unzip section for now and
also changed one section that was causing it to show "...inappropriate
content" and it seems to
be working now.
-Brent



> ________________________________________
> From: galaxy-user-boun...@lists.bx.psu.edu 
> [galaxy-user-boun...@lists.bx.psu.edu] on behalf of Brent Pedersen 
> [bpede...@gmail.com]
> Sent: Friday, September 30, 2011 11:59 AM
> To: galaxy-user@lists.bx.psu.edu
> Subject: [galaxy-user] upload zip file to custom tool
>
> Hi,
> I have followed the wiki and built a custom tool on a local galaxy 
> installation.
> One of the inputs is a zip file. It seems galaxy automatically unpacks
> it and keeps only
> the first file. Is there any way I can tell galaxy not to unzip the file?
> I tried to register .zip as a datatype, but that didn't seem to change
> the behavior.
>
> thanks for any help.
> $tool.xml is below in case it helps.
> -Brent
>
>  <command interpreter="python">charmqc.py $xyszip $output $organism</command>
>  <inputs>
>   <param format="xys.zip" name="xyszip" type="data" label="Zip of
> .xys files"/>
>   <param type="select" name="organism" label="organism">
>       <option value="Human">Human (hg18)</option>
>       <option value="Mouse">Mouse (mm8)</option>
>    </param>
>  </inputs>
>  <outputs>
>   <data format="data" name="output" />
>  </outputs>
> ___________________________________________________________
> The Galaxy User list should be used for the discussion of
> Galaxy analysis and other features on the public server
> at usegalaxy.org.  Please keep all replies on the list by
> using "reply all" in your mail client.  For discussion of
> local Galaxy instances and the Galaxy source code, please
> use the Galaxy Development list:
>
>  http://lists.bx.psu.edu/listinfo/galaxy-dev
>
> To manage your subscriptions to this and other Galaxy lists,
> please use the interface at:
>
>  http://lists.bx.psu.edu/
>

___________________________________________________________
The Galaxy User list should be used for the discussion of
Galaxy analysis and other features on the public server
at usegalaxy.org.  Please keep all replies on the list by
using "reply all" in your mail client.  For discussion of
local Galaxy instances and the Galaxy source code, please
use the Galaxy Development list:

  http://lists.bx.psu.edu/listinfo/galaxy-dev

To manage your subscriptions to this and other Galaxy lists,
please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to