TravisWheelerLab / nail

Nail is an Alignment Inference tooL
BSD 3-Clause "New" or "Revised" License
41 stars 2 forks source link

unwrap on None() in seed.rs #7

Closed wwood closed 5 months ago

wwood commented 5 months ago

Hi,

I tried nail after installing from cargo, running in a conda env with hmmer 3.4 and mmseqs2 15.6f452, but ran into this. Any ideas? I created the .sto with mafft and seqmagick.

Small input data: issue.tar.gz

$ ~/bioinfo/nail/bin/nail search S3.2.head.aln.faa.sto tail.faa
thread 'main' panicked at /home/woodcrob/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nail-0.1.0/src/pipeline/seed.rs:161:63:
called `Option::unwrap()` on a `None` value
jackroddy commented 5 months ago

This is happening because the stockholm file doesn't have an ID field in the header. The problem is that MMseqs and hmmbuild default to different naming strategies when the ID isn't present, which gets in the way of mapping between the output of the two tools.

If you were to add an ID, it should work properly. For example:

# STOCKHOLM 1.0
#=GF ID msa_name_here
#=GF SQ 50
ribosomal_protein_L3_rplC~RK3_TRICV -KYLKEFRVN-NPEEFKVGQVVNVESLSTGQFIDVTGKSSGKGFSGLQKRHNFTRGPMTHG-SKNHRAPGSIGMGTTPGRVLP--
#=GS ribosomal_protein_L3_rplC~RK3_TRICV AC ribosomal_protein_L3_rplC~RK3_TRICV
...

This should no longer be a problem in the next release of nail.

wwood commented 5 months ago

Ah, right, thanks.