Entering edit mode
2.4 years ago
rohitsatyam102
▴
920
Hi Everyone!!
I am trying to alter the reference fasta files with the vcfs that I have. For that I wrote the following nextflow script. It runs successfully but the output fasta files are empty
nextflow.enable.dsl=2
params.raw = "results/06_gatkresults/vcfs/*.vcf.gz"
params.ref = "$baseDir/results/00_indexes/bwaidx/sequence.fasta"
params.outdir="results/07_assembly"
params.bed="$baseDir/results/05_lowcoverageBed"
process COV{
publishDir "$params.outdir"
input:
tuple val(sid), path(vcf)
output:
file "*.fa"
file "*.fasta"
script:
"""
echo ${sid}
bcftools consensus -f ${params.ref} ${vcf} | sed 's/NC_045512.2/${sid}/' > ${sid}.fa
bedtools maskfasta -fi ${sid}.fa -bed ${params.bed}/${sid}.bed -fo ${sid}.fasta
"""
}
reads_ch = Channel.fromPath(params.raw).map { file -> tuple(file.simpleName, file) }
workflow {
COV(reads_ch)
}
All the files are of zero bytes. How to find out what's wrong?
N E X T F L O W ~ version 21.10.6
Launching `07_assembly.nf` [curious_swartz] - revision: 684fccf78d
executor > local (12)
[8f/141386] process > COV (4) [100%] 12 of 12 ✔
and what's the content of
also, retry with
.command.sh
can be found in the process folder in the work directory. You will need to navigate to the right folder. In the initial post this would bework/8f/141386...
. It's a hidden file so you will need something likels -la
to see it.