Question: I am trying to run blastn through biopython with NCBIWWW.  

I am using the qblast function on a given sample file.  

I have a few methods defined and everything works like a charm when my fasta contains sequences that are long enough. The only case where it fails it is when I need to blast reads coming from Illumina sequencing that are too short. So I would say it is probably due to the fact that there no automatic redefinition of blasting parameters when submitting the work.

I tried everything I could to come close to blastn-short conditions (see table C2 from [here](http://www.ncbi.nlm.nih.gov/books/NBK1763/)) without any success.

It looks like I am not capable to feed in the correct parameters.

The closer I think I came to working situation is with the following :

```
result_handle = NCBIWWW.qblast("blastn", "nr",
                                fastaSequence,
                                word_size=7,
                                gapcosts='5 2',
                                nucl_reward=1,
                                nucl_penalty='-3',
                                expect=1000)

```

Thank you for any tip / advice to make it work.

My sample fasta read is the following one :

```
>TEST 1-211670
AGACTGCGATCCGAACTGAGAAC

```

The error that I get is the following one :

```
>ValueError: Error message from NCBI: Message ID#24 Error: Failed to read the Blast query: Protein FASTA provided for nucleotide sequence

```

And when I look at [this page](http://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/new/node98.html), it seems that my problem is about fixing the threshold but obviously I didn't manage to make it work so far.

Thank you for any help.

Answer: 
You did not assign the results of the `deleteWhitespace()` operation to anything. Your two strings will therefore remain unchanged.

Store the result like so, before printing it:

`s4 = StringUtils.deleteWhitespace(s4);`
The method StringUtils.deleteWhitespace(s4) does not change the String referenced by s4 ([Strings are immutable](http://en.wikipedia.org/wiki/Immutable_object#Java)) but returns a new string.

If you do the following code:

```
s3 = StringUtils.deleteWhitespace(s3);
s4 = StringUtils.deleteWhitespace(s4);

if (s4.equals(s3)) {
    System.out.println("Text Match");'      
}

```

Then you will see that the two strings are really equal and the "Text Match" is printed.