This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I create LASTdb for nr.gz data?

I am trying to do long read alignments for my assembled reads with ncbi protein database. I was trying to use LAST tool available here (http://last.cbrc.jp/doc/last-tutorial.html) using nr.gz database using the command lastdb -cR01 nrdb nr.gz. However, it doesn't seem to work with .gz format. Is there a way I can extract all sequences from nr.gz into fasta format? Or if anyone has better suggestion on what I should be doing to perform this alignment? Thanks for your help in advance.

last alignement

You will need to gunzip nr.gz to get the fasta format file. Based on the tutorial that is what lastdb needs.

Thanks for the helpful comment.

1 answer

You can stream with zcat:

zcat nr.gz | lastdb -cR01 nrdb -

You can also stream a compressed fasta file to lastal:

 zcat query.fa.gz | lastal nrdb > query.maf

Log in to answer this question.