Is it possible to specify sample name when importing EMP format sequences

Hello, I wonder if it is possible to specify the filenames for forward, reverse and barcode files when importing as an EMP format. Currently, in the tutorial, you can provide a directory name as the input_path. But it seems it only accepts the fixed filename within that directory, i.e. forward.fastq.gz, reverse.fastq.gz, barcods.fastq.gz. Is it possible to import the files without having to rename the sequences.

I am not a big fan of renaming files because it could easily loose track.

Thanks!

Hi @wangj50 --- unfortunately for now, some formats (like the EMP formats) have strict naming requirements. One option for you, so that you don't have to rename your files, is to create hard links:

$ tree
.
└── original-sequences
    ├── index-reads-ldh203u.fastq.gz
    └── my-seqs-lasdfj.fastq.gz
$ mkdir q2-import
$ ln original-sequences/index-reads-ldh203u.fastq.gz q2-import/barcodes.fastq.gz
$ ln original-sequences/my-seqs-lasdfj.fastq.gz q2-import/sequences.fastq.gz
$ tree
.
├── emp-single-end-sequences.qza
├── original-sequences
│   ├── index-reads-ldh203u.fastq.gz
│   └── my-seqs-lasdfj.fastq.gz
└── q2-import
    ├── barcodes.fastq.gz
    └── sequences.fastq.gz
$ qiime tools import \
  --type EMPSingleEndSequences \
  --input-path q2-import \
  --output-path emp-single-end-sequences.qza
$ rm -rf q2-import

Because you are linking, the data isn't duplicated on disk, it just adds new references to the same inode (kind of like a desktop shortcut for an application, for example):

$ md5 original-sequences/index-reads-ldh203u.fastq.gz
MD5 (original-sequences/index-reads-ldh203u.fastq.gz) = e238c2bac12c901b7161e3db4977db85
$ md5 q2-import/barcodes.fastq.gz
MD5 (q2-import/barcodes.fastq.gz) = e238c2bac12c901b7161e3db4977db85

Hope that helps! Let us know if you have any questions! :t_rex:

PS -

Have you had a chance to check out provenance in QIIME 2?

@thermokarst Thanks a lot! This could work. And yes, I checked the provenance feature, and maybe that is the solution.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.