UGENE Forum
https://forum.ugene.net/forum/YaBB.pl
General Category >> Help and How-to >> workflow editor: blast sequences and save results
https://forum.ugene.net/forum/YaBB.pl?num=1287748345

Message started by Myckel Habets on Oct 22nd, 2010 at 6:52pm

Title: workflow editor: blast sequences and save results
Post by Myckel Habets on Oct 22nd, 2010 at 6:52pm
I try to obtain the following:

Read protein sequences from file -> BLAST -> protein name of 1st hit + sequence to a (fasta) file.

I have a Read sequence block connected to a Request remote Database block and that one connected to a write to fasta block. However this does not work.

The sequence is read, blast is performed and only the sequence is saved to the file (in a same way as it is read). The field FASTA header can only be set to <empty> and Source URL (by read sequence).

What am I doing wrong?

Title: Re: workflow editor: blast sequences and save results
Post by Mikhail Fursov on Oct 22nd, 2010 at 11:21pm

Myckel Habets wrote on Oct 22nd, 2010 at 6:52pm:
I try to obtain the following:

Read protein sequences from file -> BLAST -> protein name of 1st hit + sequence to a (fasta) file.

I have a Read sequence block connected to a Request remote Database block and that one connected to a write to fasta block. However this does not work.

The sequence is read, blast is performed and only the sequence is saved to the file (in a same way as it is read). The field FASTA header can only be set to <empty> and Source URL (by read sequence).

What am I doing wrong?


Request remote database worker as well as local blast worker produces annotations as the result to the search sequence.

Fasta file stores sequences only, but not annotations. So your workflows reads sequences, search annotations for them and stores original sequences back without any annotations.

You should use :

A) Genbank file format to store both original sequence & annotations obtained from blast over the sequences

or

B) Extract annotated regions to extract sequences under annotations (blast results) and save them separately.

If neither of methods is not convenient for you, please propose new one and we will discuss if it's possible to implement it in UGENE.

Title: Re: workflow editor: blast sequences and save results
Post by Myckel Habets on Oct 27th, 2010 at 11:21pm
Ah.. That worked (change to genbank file).

Another question, is it possible to separate the sequences based on result?

Lets say that I have 10 sequences and blast them. If the blast says that it is for example a kinase (results string says "kinase" somewhere) the sequence goes to kinases.gb and else to other.gb. Is that possible? I can't seem to find "objects" to do this.

Title: Re: workflow editor: blast sequences and save results
Post by Myckel Habets on Oct 27th, 2010 at 11:47pm
I also noticed that all blasts are performed before writing to file.
Is it possible to read 1st sequence -> blast -> write -> read 2nd -> blast -> write 2nd -> read 3rd -> etc.?

Title: Re: workflow editor: blast sequences and save results
Post by Mikhail Fursov on Oct 28th, 2010 at 6:33pm

Myckel Habets wrote on Oct 27th, 2010 at 11:21pm:
Ah.. That worked (change to genbank file).

Another question, is it possible to separate the sequences based on result?

Lets say that I have 10 sequences and blast them. If the blast says that it is for example a kinase (results string says "kinase" somewhere) the sequence goes to kinases.gb and else to other.gb. Is that possible? I can't seem to find "objects" to do this.


Yes this is possible. In this case you should create a custom script based block that will construct a file name (and this file name will be registered as output of the block) from BLAST result ( that is annotations) and pass the file name to "Write Genbank" block. In this case you can build any file-name even adding sequence parts, e-valus to it.

Please tell if you need help here, so we can write a sample for you.

Title: Re: workflow editor: blast sequences and save results
Post by Mikhail Fursov on Oct 28th, 2010 at 6:37pm

Myckel Habets wrote on Oct 27th, 2010 at 11:47pm:
I also noticed that all blasts are performed before writing to file.
Is it possible to read 1st sequence -> blast -> write -> read 2nd -> blast -> write 2nd -> read 3rd -> etc.?


Yes it is possible. Set "Accumulate objects" to 'false' for Genbank Writer in parameters. Note that in this case the file will be rewritten every time new result is found, so you need also set "Existing file" parameter to "Append". In this case you will have N+ separate Genbank files written (appended) into a single file.

Title: Re: workflow editor: blast sequences and save results
Post by Myckel Habets on Oct 28th, 2010 at 7:08pm
Thank you for the quick reply. I'm going to check it out.

The custom script, in what language does it need to be? Seems to be javascript. Or are other languages also possible?

Title: Re: workflow editor: blast sequences and save results
Post by Mikhail Fursov on Oct 28th, 2010 at 8:39pm

Myckel Habets wrote on Oct 28th, 2010 at 7:08pm:
Thank you for the quick reply. I'm going to check it out.

The custom script, in what language does it need to be? Seems to be javascript. Or are other languages also possible?


The language is QtScript (http://en.wikipedia.org/wiki/QtScript) that is used the same syntax with JavaScript but have different object/functions libraries.

Please check this page for details on how to create custom workflow processing block: http://ugene.unipro.ru/documentation/manual/plugins/workflow_designer/custom_workflow_elements.html

The functions set is neither complete nor stable right now, it's still  in experimental form, but we have a great plans about this part of WD :)

UGENE Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.