torognes / vsearch

Versatile open-source tool for microbiome analysis
Other
643 stars 123 forks source link

appending sample names to fasta headers incomplete #519

Closed givdieri closed 1 year ago

givdieri commented 1 year ago

I ran into an issue when generating an OTU table with --otutabout. (vsearch v2.21.1) It produced a table with columns for each fasta header e.g.

OTU ID 000a403b 0018f2b9 001fecc5 0031da00 00349b32 00467f90 006e71b6 00715e7d 0075d2ca

OTU_10 0 0 0 0 0 0 0 0 0 OTU_100 0 0 0 0 0 0 0 0 0 OTU_101 0 0 0 0 0 0 0 0 0

It appears to be an issue with the command: $ vsearch --fastx_filter FILE --sample samplename --fastaout fasta_withname.fa The sample flag adds ;sample=samplename but according to the documentation it should add another semicolon ;sample=FILEname;

After adding the semicolon (with sed), downstream OTU table generating performed as expected.

givdieri commented 1 year ago

Update.

The problem also seemed to originate from spaces and other semicolons in the fasta header.