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>
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 ________________________________________ From: galaxy-user-bounces@lists.bx.psu.edu [galaxy-user-bounces@lists.bx.psu.edu] on behalf of Brent Pedersen [bpederse@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/
On Fri, Sep 30, 2011 at 10:41 AM, Paniagua, Eric <epaniagu@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-bounces@lists.bx.psu.edu [galaxy-user-bounces@lists.bx.psu.edu] on behalf of Brent Pedersen [bpederse@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:
Hi Brent Glad to help. The only further thing I'd say is do a lot testing. Galaxy is a large, complex piece of software with some bits hard coded, some bits configurable, and there are decentralized policies or behaviors. So just be sure making a change in one place, like commenting out that section, doesn't negatively impact some other functionality you or your users may want. Best of luck, Eric ________________________________________ From: Brent Pedersen [bpederse@gmail.com] Sent: Friday, September 30, 2011 1:15 PM To: Paniagua, Eric Cc: galaxy-user@lists.bx.psu.edu Subject: Re: [galaxy-user] upload zip file to custom tool On Fri, Sep 30, 2011 at 10:41 AM, Paniagua, Eric <epaniagu@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-bounces@lists.bx.psu.edu [galaxy-user-bounces@lists.bx.psu.edu] on behalf of Brent Pedersen [bpederse@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:
Hi, I mapped two illumina runs using TopHat (they are from same RNA sample). Then tried to use the BAM merge tool to make this into one BAM file for further processes. But it returned an empty file. Is this not possible? Maybe I am not understanding the purpose/use of BAM merge? Rich
Hi Rich, Are you using a local instance or the main public instance at http://usegalaxy.org? There was a bug fix to this tool on the public instance right around the time this error was reported. Please try the job again. If it fails, it may be that the files are too large, although an error would be expected. If after the re-run, the same thing occurs, please share a link to the history and we can take a look. Use "Options -> Share or Publish", generate the link, and send directly to me (not the list). Best, Jen Galaxy team On 9/30/11 9:43 AM, Richard Mark White wrote:
Hi, I mapped two illumina runs using TopHat (they are from same RNA sample). Then tried to use the BAM merge tool to make this into one BAM file for further processes. But it returned an empty file. Is this not possible? Maybe I am not understanding the purpose/use of BAM merge?
Rich
___________________________________________________________ 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:
-- Jennifer Jackson http://usegalaxy.org http://galaxyproject.org/Support
participants (4)
-
Brent Pedersen
-
Jennifer Jackson
-
Paniagua, Eric
-
Richard Mark White