qiime2 / q2-types

BSD 3-Clause "New" or "Revised" License
17 stars 41 forks source link

Importing manifest v1 without sample names produce unclear error #229

Open ChrisKeefe opened 5 years ago

ChrisKeefe commented 5 years ago

Bug Description When users attempt to import fastq files, but fail to include sample ids, the following error is generated:

There was a problem importing Manifest.csv: Missing one or more files for SingleLanePerSampleSingleEndFastqDirFmt: '.+_.+_L[0-9][0-9][0-9]_R[12]_001.fastq.gz

Steps to reproduce the behavior

  1. Activate QIIME 2 2019.4
  2. Create a manifest file without sample IDs (see forum post for details)
  3. Import: e.g.
    qiime tools import \
    --type SampleData[SequencesWithQuality] \
    --input-path ./Manifest.csv \
    --output-path single-end-demux.qza \
    --input-format SingleEndFastqManifestPhred33

    Expected behavior This should render a more user-friendly error message.

Computation Environment

Questions

  1. Does this only impact manifest imports?

References

  1. forum x-ref
thermokarst commented 5 years ago

Hey @ChrisKeefe, this kind of behavior wouldn't surprise me for this format, we had a few issues around the V1 manifest formats. Luckily we have replaced these with the new V2 formats (V1 formats are "deprecated," although we don't have plans to remove the V1 formats just yet), and I think the V2 error raised for your case above makes a little more sense here, although it could be cleaned up a bit, too:

echo "id\tabsolute-filepath\npeanut.fastq.gz" > manifest.tsv
qiime tools import \
  --type 'SampleData[SequencesWithQuality]' \
  --input-path manifest.tsv \
  --output-path single-end-demux.qza \
  --input-format SingleEndFastqManifestPhred33V2
There was a problem importing manifest.tsv:

  manifest.tsv is not a(n) SingleEndFastqManifestPhred33V2 file:

  'absolute-filepath' is not a column in the metadata. Available columns: