This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Usearch error "Zero length sequence not allowed"

Hi all,

I'm trying to dereplicate fasta sequences in a 15 GB fasta file using usearch -derep_fulllength with this kind of command:

usearch -derep_fulllength input.fasta -output uniques.fasta -sizeout

but I got the error message: "Zero length sequence not allowed". Anybody knows what it means? Does it mean that there is a fasta sequence in my file that does not contain a sequence (i.e. contains only the > part)?

The next question would be, how to check if I have such zero length sequence in my file?

Thank you for your inputs.

dereplication software-error usearch

1 answer

Using Heng Li's bioawk, the command

bioawk -c fastx ' len($seq)==0 { print $name }' <inFile.fasta

should help you find if your file has any zero length sequences.

Thanks again! I'll check it out.

Sorry to bother you again. I got this error when I tried the above command:

syntax error at source line 1
 context is
     >>>  len($seq)= <<< 0 { print $name }

Got it. It should have been

length($seq)==0

I apologize for the typo. It should've been ==. I've updated it now.

Log in to answer this question.