Samantha Chill
10/20/2024, 2:13 PMProcess BASESPACE {
input:
tuple val(meta), path(reads)
output:
tuple val(meta), path("*gz"), emiti reads
script:
def args task.ext.args?: "
def prefix = task.ext.prefix ?: "$(meta.id)"
def sample_id meta.id.split('-')[0]
"""
~/tools/basespace download biosample -n ${prefix}
#Grab R1, R2 names
R1=$(1s ${prefix}*ds*/*R1* | head -n1) R2=$(1s ${prefix}*ds*/*R2* | head -n1)
#Rename output files
mv \$R1 ${sample_id}.R1.fastq.gz mv \$R2 ${sample_id}.R2.fastq.gz
"""
}
I'm going to update the file name sample_id meta.id.split('-')[0] and my question is, can I update the meta.id within this process to match? So the output is:
[[id:Sample1],[/some path/to/reads]]moritz
10/20/2024, 3:48 PMSamantha Chill
10/20/2024, 7:07 PM