This project is read-only.

Ncbi Blast Parameters

Sep 5, 2014 at 2:40 AM
How I can use the parameter n u m _ a l i g n m e n t s in BlastParameters on .NETBio?

Sep 5, 2014 at 6:27 AM
The BlastParameters class stores the params as a dictionary. There is a method called Add which should allow you to deal with it:

public void Add(
string parameterName,
string parameterValue

You will find some use of this in the cookbook example here:
or in more detail in part 7 of the training material (downloadable here: )

Sep 5, 2014 at 11:54 AM
Hi jh,

I not found more parameter in , how I can see params as a dictionary.
I have this code:

ISequence sequence = new Sequence(alph, rawData, false);
        BlastParameters blastParameters = new BlastParameters();
        blastParameters.Add("Database", databaseText.Text);
        blastParameters.Add("Program", programText.Text);
        blastParameters.Add("Expect", "0.000001");
        blastParameters.Add("Filter", "F");
       // blastParameters.Add("Max", "20"); ???
Thanks, Best,
Sep 5, 2014 at 6:16 PM
I'm not sure what you mean - every BLAST service has slightly different parameters, and the requirements are generally also different. So it's a free-form dictionary which allows you to add key + value just as you are doing. These are passed as-is to the service, so you need to verify what each parameter format should be prior to calling it.

What are you wanting to do?

Sep 5, 2014 at 6:59 PM
Hi Mark,

I need parameter for limiting the number of alignments returned (Max target sequences).

blastParameters.Add("Max_target", "20"); ?????

Sep 5, 2014 at 7:40 PM
From this:

I think you want:

blastParameters.Add("ALIGNMENTS", "20");

By the way, it appears you are using the older .NET Bio toolkit support for BLAST, the V2 code looks slightly different - it's what Jim referenced in his original answer. It's fine, but I just wanted to point that out.

Sep 5, 2014 at 8:49 PM
Thanks Mark,

Now worked!!!