On Mon, Aug 26, 2013 at 12:27 PM, Carlos Borroto
<carlos.borr...@gmail.com> wrote:
> Hi,
>
> I'm interested in developing a tool that would allow easy interaction
> with the Galaxy API. I started coding and this[1] is what I have so
> far.
>
> [1]https://github.com/cjav/galaxy-api-tools
>

Second effort session on this project. The first time around I somehow
missed Bioblend python library, I made sure this is not the case this
time around. Bioblend is making development quite easy and is opening
a bunch of possibilities I didn't even know were possible.

The project is now also on pypi, all you need to install it is:
$ pip install galaxy-api-tools

This is a use case fully supported currently.

- List all workflows available to you:

$ galaxy-api-tools get-workflows
[   {   u'id': u'f597429621d6eb2b',
        u'model_class': u'StoredWorkflow',
        u'name': u'Map and Variant Calling',
        u'published': False,
        u'tags': [],
        u'url': u'/api/workflows/f597429621d6eb2b'},
    {   u'id': u'f2db41e1fa331b3e',
        u'model_class': u'StoredWorkflow',
        u'name': u'Combine and Split',
        u'published': False,
        u'tags': [],
        u'url': u'/api/workflows/f2db41e1fa331b3e'}]

- Show workflow details so you can clearly see what to expect and what
you need to provide:

$ galaxy-api-tools show-workflow name="Combine and Split"
{   u'id': u'f2db41e1fa331b3e',
    u'inputs': {   u'5': {   u'label': u'FASTA', u'value': u''},
                   u'6': {   u'label': u'QUAL', u'value': u''},
                   u'7': {   u'label': u'BARCODE_INDEX', u'value': u''}},
    u'model_class': u'StoredWorkflow',
    u'name': u'Combine and Split',
    u'published': False,
    u'steps': {   u'5': {   u'id': 5,
                            u'input_steps': {   },
                            u'tool_id': None,
                            u'type': u'data_input'},
                  u'6': {   u'id': 6,
                            u'input_steps': {   },
                            u'tool_id': None,
                            u'type': u'data_input'},
                  u'7': {   u'id': 7,
                            u'input_steps': {   },
                            u'tool_id': None,
                            u'type': u'data_input'},
                  u'8': {   u'id': 8,
                            u'input_steps': {   u'fasta_file': {
u'source_step': 5,

u'step_output': u'output'},
                                                u'qual_file': {
u'source_step': 6,

u'step_output': u'output'}},
                            u'tool_id': u'fastq_combiner',
                            u'type': u'tool'},
                  u'9': {   u'id': 9,
                            u'input_steps': {   u'barcode_index': {
u'source_step': 7,

u'step_output': u'output'},

u'input_format|inputs_0|input': {   u'source_step': 8,

             u'step_output': u'output_file'}},
                            u'tool_id': u'ngs-tools_split_by_barcode',
                            u'type': u'tool'}},
    u'tags': [],
    u'url': u'/api/workflows/f2db41e1fa331b3e'}

- Upload two pairs of FNA/QUAL files from a 454 run and run the
previous workflow for combining them into a FASTQ file and split them
by barcode:

$ galaxy-api-tools upload --library name="API Imports" --upload-method
galaxy_filesystem \
  --genome hg19 --folder "Run 20130918" --workflow name="Combine and Split" \
  --add-file .qual=qual454=QUAL --workflow-input
BARCODE_INDEX=1cd8e2f6b131e891=ldda  \
  --workflow-param ngs-tools_split_by_barcode=barcodes=RL001,RL002 \
  /local/seq_data/R_2013_09_18/1.fna /local/seq_data/R_2013_09_18/2.fna
{   u'history': u'0c5ffef6d88a1e97',
    u'outputs': [u'1a5b83933dc4bf08', u'aebaa141e7243ebf']}
{   u'history': u'911dde3ddb677bcd',
    u'outputs': [u'07a38ebd55a6989d', u'56fc5a09f8ae2546']}

There are a few issues I need to workout. Also, a lot of code
refactoring and commenting needs to happen if a seriously want other
people to join this effort. Ideally something like this could be built
inside Bioblend.

I hope someone else finds it useful,
Carlos
___________________________________________________________
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 via email to