Export to current directory

Hi,

Is there a way to export to current directory? Command, for instance:

qiime tools export taxonomy.qza --output-dir exported-files

I see from the post here:

That you all are just coping from the output directory to the current directory. I guess mv would work too so not to have duplicate copies. But, it would be great to just export to the current directory if possible in one step.

Thanks!

Sure! You have a bunch of options:

  • Explicitly specify your current directory: qiime tools export taxa.qza --output-dir /path/to/my/dir (this one is my favorite, because it is pretty explicit)
  • Use shell expansion: qiime tools export taxa.qza --output-dir .
  • Use an environment variable: qiime tools export taxa.qza --output-dir $PWD
  • Use a subshell: qiime tools export taxa.qza --output-dir $(pwd)

None of these options have anything to do with QIIME 2, they are all just general command line options available on most linux/unix systems.

Let us know if you need any more help! :t_rex:

2 Likes

Thanks!

One other quick question. Is there a way to specify the name of file that is being exported?

Not right now - the example you are looking at has a single file contained within the Artifact, but generally speaking QIIME 2 Artifacts can contain many files within them (for example, demultiplexed sequences will have one file per sample, saved within the Artifact). Because of that possibility, it is pretty difficult to come up with rules to generally describe renaming (as well, the demuxed seqs is just an example of homogeneous data — you could imagine a heterogeneous collection of files). Again, you could lean on general linux/unix command line patterns to rename the file, after they have been exported.

Also worth noting, QIIME 2 Artifacts are just ZIP files, so there is no requirement that you use QIIME 2 to export these data, you could also just open the file in your favorite ZIP utility.

1 Like

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