Adding a Tool for PANAMA

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding a Tool for PANAMA

saketkc
As part of a warmup, I added a tool for perming eQTL analysis using PANAMA(http://ml.sheffield.ac.uk/qtl/panama/).


By default PANAMA writes to stderr and creates a PANAM_results.csv file in the same directory as the input files.

for this.

and thus wrote a new XML : https://gist.github.com/saketkc/5697388


Apparently the above XML runs too, but I dont get back a CSV. Essentially I need to move the PANAMA_results.csv file to output1. Can this be done without using a  wrapper at all , just using the XML files ?

Is there a way to nest the commands in the XML so that I could do a
<move command> after <panama command> , but how would the paths be specified ?

Saket




___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Tool for PANAMA

Peter Cock
On Mon, Jun 3, 2013 at 11:53 AM, Saket Choudhary <[hidden email]> wrote:

> As part of a warmup, I added a tool for perming eQTL analysis using
> PANAMA(http://ml.sheffield.ac.uk/qtl/panama/).
>
>
> By default PANAMA writes to stderr and creates a PANAM_results.csv file in
> the same directory as the input files.
>
> I wrote ... XML : https://gist.github.com/saketkc/5697388
>
> Apparently the above XML runs too, but I dont get back a CSV. Essentially I
> need to move the PANAMA_results.csv file to output1. Can this be done
> without using a  wrapper at all , just using the XML files ?
>
> Is there a way to nest the commands in the XML so that I could do a
> <move command> after <panama command> , but how would the paths be specified
> ?

Hi Saket,

You could try this (two commands in one shell line), but catching error
conditions would be a problem:

<command>panama $expression_data $snp_data; mv PANAMA_results.csv
$output1</command>

In cases like this where the underlying tool is too inflexible to accept an
output filename, I would personally use a wrapper script which can handle
moving things to the desired location, and raising a clear error if the file
was not created.

Peter
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Tool for PANAMA

Ross-2
Hi Saket
If you want to redirect the executable's stdout to a new Galaxy dataset you've defined as $output, something like: 
&gt; '$output'
is a workable idiom for a command line AFAIK - you need to escape the redirection '>' character or you'll confuse the xml parser.
It's often possible to hack a complex command line (or use configfile to write a script!) but as Peter says, it all boils down to personal preference - they all work. 
Use whatever you find most convenient but remember you may need to maintain it :)

On Mon, Jun 3, 2013 at 9:05 PM, Peter Cock <[hidden email]> wrote:
On Mon, Jun 3, 2013 at 11:53 AM, Saket Choudhary <[hidden email]> wrote:
> As part of a warmup, I added a tool for perming eQTL analysis using
> PANAMA(http://ml.sheffield.ac.uk/qtl/panama/).
>
>
> By default PANAMA writes to stderr and creates a PANAM_results.csv file in
> the same directory as the input files.
>
> I wrote ... XML : https://gist.github.com/saketkc/5697388
>
> Apparently the above XML runs too, but I dont get back a CSV. Essentially I
> need to move the PANAMA_results.csv file to output1. Can this be done
> without using a  wrapper at all , just using the XML files ?
>
> Is there a way to nest the commands in the XML so that I could do a
> <move command> after <panama command> , but how would the paths be specified
> ?

Hi Saket,

You could try this (two commands in one shell line), but catching error
conditions would be a problem:

<command>panama $expression_data $snp_data; mv PANAMA_results.csv
$output1</command>

In cases like this where the underlying tool is too inflexible to accept an
output filename, I would personally use a wrapper script which can handle
moving things to the desired location, and raising a clear error if the file
was not created.

Peter


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Tool for PANAMA

saketkc
Thanks Ross and Peter. That worked.

I think I will keep the Python wrapper though, gives me more control :)

Saket


On 3 June 2013 16:48, Ross <[hidden email]> wrote:
Hi Saket
If you want to redirect the executable's stdout to a new Galaxy dataset you've defined as $output, something like: 
&gt; '$output'
is a workable idiom for a command line AFAIK - you need to escape the redirection '>' character or you'll confuse the xml parser.
It's often possible to hack a complex command line (or use configfile to write a script!) but as Peter says, it all boils down to personal preference - they all work. 
Use whatever you find most convenient but remember you may need to maintain it :)

On Mon, Jun 3, 2013 at 9:05 PM, Peter Cock <[hidden email]> wrote:
On Mon, Jun 3, 2013 at 11:53 AM, Saket Choudhary <[hidden email]> wrote:
> As part of a warmup, I added a tool for perming eQTL analysis using
> PANAMA(http://ml.sheffield.ac.uk/qtl/panama/).
>
>
> By default PANAMA writes to stderr and creates a PANAM_results.csv file in
> the same directory as the input files.
>
> I wrote ... XML : https://gist.github.com/saketkc/5697388
>
> Apparently the above XML runs too, but I dont get back a CSV. Essentially I
> need to move the PANAMA_results.csv file to output1. Can this be done
> without using a  wrapper at all , just using the XML files ?
>
> Is there a way to nest the commands in the XML so that I could do a
> <move command> after <panama command> , but how would the paths be specified
> ?

Hi Saket,

You could try this (two commands in one shell line), but catching error
conditions would be a problem:

<command>panama $expression_data $snp_data; mv PANAMA_results.csv
$output1</command>

In cases like this where the underlying tool is too inflexible to accept an
output filename, I would personally use a wrapper script which can handle
moving things to the desired location, and raising a clear error if the file
was not created.

Peter



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Tool for PANAMA

Ross-2
Hi Saket, 
I haven't looked at this but I noticed the following advice on their web site:

If you want to call PANAMA directly from python, just take a look at the PANAMA function inpanama.core.run

Do you have a plan for representing the required incoming expression and snp matrices in Galaxy? 
AFAIK they need to be from the same subjects - so probably need some thought to make it optimal for a biologist user....



On Tue, Jun 4, 2013 at 8:39 PM, Saket Choudhary <[hidden email]> wrote:
Thanks Ross and Peter. That worked.

I think I will keep the Python wrapper though, gives me more control :)

Saket


On 3 June 2013 16:48, Ross <[hidden email]> wrote:
Hi Saket
If you want to redirect the executable's stdout to a new Galaxy dataset you've defined as $output, something like: 
&gt; '$output'
is a workable idiom for a command line AFAIK - you need to escape the redirection '>' character or you'll confuse the xml parser.
It's often possible to hack a complex command line (or use configfile to write a script!) but as Peter says, it all boils down to personal preference - they all work. 
Use whatever you find most convenient but remember you may need to maintain it :)

On Mon, Jun 3, 2013 at 9:05 PM, Peter Cock <[hidden email]> wrote:
On Mon, Jun 3, 2013 at 11:53 AM, Saket Choudhary <[hidden email]> wrote:
> As part of a warmup, I added a tool for perming eQTL analysis using
> PANAMA(http://ml.sheffield.ac.uk/qtl/panama/).
>
>
> By default PANAMA writes to stderr and creates a PANAM_results.csv file in
> the same directory as the input files.
>
> I wrote ... XML : https://gist.github.com/saketkc/5697388
>
> Apparently the above XML runs too, but I dont get back a CSV. Essentially I
> need to move the PANAMA_results.csv file to output1. Can this be done
> without using a  wrapper at all , just using the XML files ?
>
> Is there a way to nest the commands in the XML so that I could do a
> <move command> after <panama command> , but how would the paths be specified
> ?

Hi Saket,

You could try this (two commands in one shell line), but catching error
conditions would be a problem:

<command>panama $expression_data $snp_data; mv PANAMA_results.csv
$output1</command>

In cases like this where the underlying tool is too inflexible to accept an
output filename, I would personally use a wrapper script which can handle
moving things to the desired location, and raising a clear error if the file
was not created.

Peter





--
Ross Lazarus MBBS MPH;
Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Adding a Tool for PANAMA

saketkc
Hi Ross,




On 4 June 2013 16:15, Ross <[hidden email]> wrote:
Hi Saket, 
I haven't looked at this but I noticed the following advice on their web site:

If you want to call PANAMA directly from python, just take a look at the PANAMA function inpanama.core.run

Do you have a plan for representing the required incoming expression and snp matrices in Galaxy? 

Yes, using the API makes more sense. Currently I am relying on the end user to choose the proper set of files to run PANAMA. 

AFAIK they need to be from the same subjects - so probably need some thought to make it optimal for a biologist user....


I think this will possibly require the user to upload the dataset with proper naming. say :
<mydata>_expression.csv
 and <mydata>_snp.csv

Is there a way in Galaxy to restrict this kind of thing ? I am not sure though, that forcing such constraints will make sense, this is just a suggestion. But as you correctly pointed out, there is a need to organise the data to ensure the correct dataset is fed to PANAMA or for that matter the other tools I am working on.


Saket
 


On Tue, Jun 4, 2013 at 8:39 PM, Saket Choudhary <[hidden email]> wrote:
Thanks Ross and Peter. That worked.

I think I will keep the Python wrapper though, gives me more control :)

Saket


On 3 June 2013 16:48, Ross <[hidden email]> wrote:
Hi Saket
If you want to redirect the executable's stdout to a new Galaxy dataset you've defined as $output, something like: 
&gt; '$output'
is a workable idiom for a command line AFAIK - you need to escape the redirection '>' character or you'll confuse the xml parser.
It's often possible to hack a complex command line (or use configfile to write a script!) but as Peter says, it all boils down to personal preference - they all work. 
Use whatever you find most convenient but remember you may need to maintain it :)

On Mon, Jun 3, 2013 at 9:05 PM, Peter Cock <[hidden email]> wrote:
On Mon, Jun 3, 2013 at 11:53 AM, Saket Choudhary <[hidden email]> wrote:
> As part of a warmup, I added a tool for perming eQTL analysis using
> PANAMA(http://ml.sheffield.ac.uk/qtl/panama/).
>
>
> By default PANAMA writes to stderr and creates a PANAM_results.csv file in
> the same directory as the input files.
>
> I wrote ... XML : https://gist.github.com/saketkc/5697388
>
> Apparently the above XML runs too, but I dont get back a CSV. Essentially I
> need to move the PANAMA_results.csv file to output1. Can this be done
> without using a  wrapper at all , just using the XML files ?
>
> Is there a way to nest the commands in the XML so that I could do a
> <move command> after <panama command> , but how would the paths be specified
> ?

Hi Saket,

You could try this (two commands in one shell line), but catching error
conditions would be a problem:

<command>panama $expression_data $snp_data; mv PANAMA_results.csv
$output1</command>

In cases like this where the underlying tool is too inflexible to accept an
output filename, I would personally use a wrapper script which can handle
moving things to the desired location, and raising a clear error if the file
was not created.

Peter





--
Ross Lazarus MBBS MPH;
Head, Medical Bioinformatics, BakerIDI; Tel: <a href="tel:%2B61%20385321444" value="+61385321444" target="_blank">+61 385321444
http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/