Hi everyone. I've been trying to copy and rename files created by a pipeline executed in nextflow. I have implemented a qiime2 workflow and got the taxonomy (.qza) and biom files (see image below). Wen I run qiime tools export
qiime2 creates a directory containing the tsv and/or biom file . The entire pipeline is executed in container = quay.io/qiime2/core:2023.7
with runOptions = -u $(id -u):$(id -g)
.
The process which exports the taxonomy is the following:
process taxonomy{
publishDir params.outdir, mode:'copy'
input:
path "table-denoised.qza"
path "vsearch-taxonomyITS.qza"
path "blast-taxonomyITS.qza"
path "sklearn-taxonomyITS.qza"
output:
path "feature-table", emit: feature_table
path "vsearch-taxonomy", emit: vsearch_taxonomy
path "blast-taxonomy", emit: blast_taxonomy
path "sklearn-taxonomy", emit: sklearn_taxonomy
script:
"""
qiime tools export \
--input-path table-denoised.qza \
--output-path feature-table
qiime tools export \
--input-path vsearch-taxonomyITS.qza \
--output-path vsearch-taxonomy
qiime tools export \
--input-path blast-taxonomyITS.qza \
--output-path blast-taxonomy
qiime tools export \
--input-path sklearn-taxonomyITS.qza \
--output-path sklearn-taxonomy
"""
}
Now I need to copy and rename the tsv files. I've tried:
process replace_header{
publishDir params.outdir, mode:'copy'
input:
path "vsearch-taxonomy/taxonomy.tsv"
output:
path "taxonomy.tsv"
script:
"""
cp vsearch-taxonomy/taxonomy.tsv taxonomy.tsv
"""
}
Any idea?
please validate/comment the answers to your previous questions: How to install non conda software ; Age nodes in R
Please use the formatting bar (especially the
code
option) to present your post better. You can use backticks for inline code (`text` becomestext
), or select a chunk of text and use the highlighted button to format it as a code block. If your code has long lines with a single command, break those lines into multiple lines with proper escape sequences so they're easier to read and still run when copy-pasted. I've done it for you this time.