These are chat archives for nextflow-io/nextflow

31st
Mar 2018
Daniel E Cook
@danielecook
Mar 31 2018 15:09
Anyone have any idea why I can't seem to cache this process?
process annotate_vcf {

    cpus params.cores

    tag { chrom }

    cache 'deep'

    input:
        set val(chrom), file("${chrom}.soft-filter.vcf.gz"), file("${chrom}.soft-filter.vcf.gz.csi"), file("gene.pkl"), file("ce.gff3.gz") from soft_filtered_vcf.spread(gene_pkl_snpindel).spread(ce_gff3)

    output:
        file("${chrom}.soft-annotated.vcf.gz") into soft_annotated_vcf
        file("snpeff_out.csv") into snpeff_multiqc


    """
        # bcftools csq
        bcftools view --threads=${task.cpus-1} -O v ${chrom}.soft-filter.vcf.gz | \\
        bcftools csq -O v --fasta-ref ${reference_handle} \\
                     --gff-annot ce.gff3.gz \\
                     --phase a | \\
        snpEff eff -csvStats snpeff_out.csv \\
        -no-downstream \\
        -no-intergenic \\
        -no-upstream \\
        -dataDir ${workflow.projectDir}/snpeff \\
        -config ${workflow.projectDir}/snpeff/snpEff.config \\
        ${params.annotation_reference} | \\
        bcftools view -O v | \\
        fix_snpeff_names.py - | \\
        bcftools view --threads=${task.cpus-1} -O z > ${chrom}.soft-annotated.vcf.gz
        bcftools index --threads=${task.cpus} ${chrom}.soft-annotated.vcf.gz
    """

}
One thought is the use of the workflow projectdir? But I am not sure
Paolo Di Tommaso
@pditommaso
Mar 31 2018 15:16
that may be cause
any file should be declared properly as an input
add a file 'snpeff' from file("$baseDir/snpeff")
Daniel E Cook
@danielecook
Mar 31 2018 17:36
ok i'll give that a try - thanks