#! /usr/bin/env nextflow

r_script_path = "${workflow.projectDir}/bin/R"

// Generated reference genome base name
ref_dir = file(params.reference).baseName

process PLOT_CIRCOS {

    publishDir "${params.data_dir}/${ref_dir}_${params.sra_run}_png", mode: 'copy', enabled: true

    container "tegreedy/rtools:1.0.0"

    input:
    path read_interaction_table
    path genome_lenght

    output:
    path "*.png"

    script:
    """
    Rscript "${r_script_path}/plot_family_pairs.R" ${read_interaction_table} ${genome_lenght} 
    """
}
