bokulich-lab / q2-assembly

QIIME 2 plugin for (meta)genome assembly.
BSD 3-Clause "New" or "Revised" License
4 stars 12 forks source link

invalid sample name assumption causes failure in `evaluate-contigs` #37

Closed gregcaporaso closed 1 year ago

gregcaporaso commented 1 year ago

I am testing with samples that have underscores in their identifiers, and am running into a failure due to an assumption that only the text before the _ is the sample identifier. This looks to be traceable to this line.

Note that QIIME 2 does allow for underscores in identifiers (see the documentation here).

Is there a different way to get the sample ids from the filenames in this case? Based on a quick look at the files in the data artifact, it looks like you could change line 113 to:

return os.path.basename(fp.replace('_contigs.fa', ''))

I recommend adding a test of this function that includes a sample id with an underscore in it.