Commit 60627a6a authored by Chris Cheshire's avatar Chris Cheshire
Browse files

Added support for missing genome blacklist files

parent b6a78e36
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
params {
    config_profile_name        = 'Test profile'
    config_profile_description = 'Minimal test dataset to check pipeline function with custom genome files except fasta and bt index'

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

    // Input data
    input = 'https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/samplesheet/test-GSE145187-small.csv'

    // Genome references
    fasta              = 'https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20.fa.gz'
    bowtie2            = 'https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-bowtie2.tar.gz'
    spikein_fasta      = 'https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.fa.gz'
    spikein_bowtie2    = 'https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/e_coli_U00096_3.tar.gz'

    minimum_alignment_q_score = 10
}
 No newline at end of file
+8 −0
Original line number Diff line number Diff line
@@ -122,4 +122,12 @@ class WorkflowCutandrun {
            "==================================================================================="
    }

    //
    // Print a warning if not blacklist detected
    //
    private static void blacklistWarn(log) {
        log.warn "=============================================================================\n" +
            "  No genome blacklist file specified, switching to dummy empty file...\n" +
            "==================================================================================="
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ profiles {

    local           { includeConfig "conf/local.config"           } // Sets up compute resources for local computing run
    test            { includeConfig "conf/test.config"            } // Runs a single sample with an IgG control
    test_fasta_only { includeConfig "conf/test_fasta_only.config" } // Runs a single sample with an IgG control but with no extra genome files just as bed files and black lists
    test_tech_reps  { includeConfig "conf/test_tech_reps.config"  } // Runs a single sample with two technical replicates and an IgG control
    test_full_small { includeConfig "conf/test_full_small.config" } // Runs a full experimental configuration but with a small dataset
    test_no_igg     { includeConfig "conf/test_no_igg.config"     } // Runs a single sample with NO IgG control
+13 −0
Original line number Diff line number Diff line
- name: test_param_check_custom_genome_blacklist
  command: nextflow run main.nf -profile docker,test_fasta_only --only_input true --gtf https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.gtf.gz --blacklist ./assets/blacklists/GRCh37-blacklist.bed -c tests/config/nextflow.config
  tags:
    - params
    - params_customgenome
    - params_customgenome_blacklist

- name: test_param_check_custom_genome_noblacklist
  command: nextflow run main.nf -profile docker,test_fasta_only --only_input true --gtf https://raw.githubusercontent.com/nf-core/test-datasets/cutandrun/reference/genomes/hg38-chr20-genes.gtf.gz -c tests/config/nextflow.config
  tags:
    - params
    - params_customgenome
    - params_customgenome_noblacklist
 No newline at end of file
+9 −1
Original line number Diff line number Diff line
@@ -24,7 +24,15 @@ for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true

// Check mandatory parameters that cannot be checked in the groovy lib as we want a channel for them
if (params.input)     { ch_input     = file(params.input)     } else { exit 1, "Input samplesheet not specified!"     }
if (params.blacklist) { ch_blacklist = file(params.blacklist) } else { exit 1, "Genome blacklist file not specified!" }

ch_blacklist = Channel.empty()
if (params.blacklist) {
    ch_blacklist = file(params.blacklist)
}
else {
    ch_blacklist = file("$projectDir/assets/dummy_file.txt", checkIfExists: true)
    WorkflowCutandrun.blacklistWarn(log)
}

// Save AWS IGenomes file containing annotation version
def anno_readme = params.genomes[ params.genome ]?.readme