/*
 * -------------------------------------------------
 *  Nextflow config file for running tests
 * -------------------------------------------------
 * Defines bundled input files and everything required
 * to run a fast and simple test. Use as follows:
 *   nextflow run nf-core/airrflow -profile <docker/singularity> -c conf/test_no-umi.config
 */

params {
    config_profile_name = 'Test profile without UMIs'
    config_profile_description = 'Test dataset without UMIs to check pipeline function.'

    // Limit resources so that this can run on GitHub Actions
    max_cpus = 2
    max_memory = 6.GB
    max_time = 6.h

    mode = 'fastq'

    cprimer_position = 'R1'
    library_generation_method = 'specific_pcr'
    cprimer_start = 4
    vprimer_start = 4
    primer_revpr = true
    umi_length = 0
    isotype_column = 'c_primer'

    // Input data
    input = pipelines_testdata_base_path + 'testdata-no-umi/Metadata_test-no-umi_airr.tsv'
    cprimers = pipelines_testdata_base_path + 'testdata-no-umi/Greiff2014_CPrimers.fasta'
    vprimers = pipelines_testdata_base_path + 'testdata-no-umi/Greiff2014_VPrimers.fasta'
    reference_fasta = pipelines_testdata_base_path + 'database-cache/imgtdb_base.zip'
    reference_igblast = pipelines_testdata_base_path + 'database-cache/igblast_base.zip'


}
process {
    // When not using UMIs, set the coord parameter based on source (e.g., sra or illumina)
    withName: PRESTO_ASSEMBLEPAIRS_SANS_UMI {
            ext.args = '--rc tail --coord sra --maxerror 0.3'
    }
    withName:"DEFINE_CLONES*"{
        ext.args = ['outname':'', 'model':'hierarchical',
                    'method':'nt', 'linkage':'single',
                    'outputby':'sample_id', 'min_n':10]
    }
}

