Unverified Commit 678fa5e6 authored by Chris Cheshire's avatar Chris Cheshire Committed by GitHub
Browse files

Merge pull request #18 from luslab/dev

Added additional no IgG testing
parents b3513a2a 5e0266f5
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ on:

jobs:
  test:
    name: Run workflow tests
    name: Run standard pipeline test
    # Only run on push if this is the nf-core dev branch (merged PRs)
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
    runs-on: ubuntu-latest
@@ -33,14 +33,19 @@ jobs:
      - name: Run pipeline with test data
        run: |
          nextflow run ${GITHUB_WORKSPACE} -profile test,docker

  sra_download:
    name: Test downloading of public data
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/rnaseq') }}
# ---------------------------------------------------------------------
  test_no_igg:
    name: Run pipeline test with no IgG
    # Only run on push if this is the nf-core dev branch (merged PRs)
    if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/cutandrun') }}
    runs-on: ubuntu-latest
    env:
      NXF_VER: ${{ matrix.nxf_ver }}
      NXF_ANSI_LOG: false
    strategy:
      matrix:
        # Nextflow versions: check pipeline minimum and current latest
        nxf_ver: ["21.04.0", ""]
    steps:
      - name: Check out pipeline code
        uses: actions/checkout@v2
@@ -50,6 +55,6 @@ jobs:
          wget -qO- get.nextflow.io | bash
          sudo mv nextflow /usr/local/bin/

      - name: Run pipeline to download public data
      - name: Run pipeline with test data
        run: |
          nextflow run ${GITHUB_WORKSPACE} -profile test_sra,docker
          nextflow run ${GITHUB_WORKSPACE} -profile test_no_igg,docker
+4 −4
Original line number Diff line number Diff line
@@ -71,8 +71,8 @@ class Reports:
            frag_base_i = os.path.basename(dt_frag_list[i])
            sample_id = frag_base_i.split(".")[0]
            sample_id_split = sample_id.rsplit("_", 1)
            rep_i = sample_id_split[len(sample_id_split)-1]
            group_i ="_".join(sample_id_split[0:(len(sample_id_split)-1)])
            rep_i = sample_id_split[1]
            group_i = sample_id_split[0]

            # create long forms of fragment histograms
            dt_frag_i_long = np.repeat(dt_frag_i['Size'].values, dt_frag_i['Occurrences'].values)
@@ -134,8 +134,8 @@ class Reports:
            bed_base_i = os.path.basename(seacr_bed_list[i])
            sample_id = bed_base_i.split(".")[0]
            sample_id_split = sample_id.rsplit("_", 1)
            rep_i = sample_id_split[len(sample_id_split)-1]
            group_i ="_".join(sample_id_split[0:(len(sample_id_split)-1)])
            rep_i = sample_id_split[1]
            group_i = sample_id_split[0]
            seacr_bed_i['group'] = np.repeat(group_i, seacr_bed_i.shape[0])
            seacr_bed_i['replicate'] = np.repeat(rep_i, seacr_bed_i.shape[0])

+26 −0
Original line number Diff line number Diff line
/*
========================================================================================
    Nextflow config file for running minimal tests
========================================================================================
    Defines input files and everything required to run a more robust test.

    Use as follows:
        nextflow run nf-core/cutandrun -profile test_hg38_chr7,<docker/singularity>

----------------------------------------------------------------------------------------
*/

params {
  config_profile_name        = 'GSE145187 hg38-chr7'
  config_profile_description = 'Runs on full data for GSE145187 but just on chr7 of hg38 and no IgG control'

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

  genome = 'GRCh38'
  input = 'https://raw.githubusercontent.com/luslab/test-datasets/cutandrun/samplesheet/test-GSE145187-noigg-small.csv'
  fasta = 'https://raw.githubusercontent.com/luslab/test-datasets/cutandrun/reference/genomes/hg38-chr7.fa.gz'
  igg_control = false
}
+6 −2
Original line number Diff line number Diff line
@@ -83,7 +83,9 @@ class WorkflowMain {
    //
    public static String getGenomeAttribute(params, attribute) {
        def val = ''
        if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) {
        if (params.attribute) {
            val = params.attribute
        } else if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) {
            if (params.genomes[ params.genome ].containsKey(attribute)) {
                val = params.genomes[ params.genome ][ attribute ]
            }
@@ -96,7 +98,9 @@ class WorkflowMain {
    //
    public static String getGenomeAttributeSpikeIn(params, attribute) {
        def val = ''
        if (params.genomes && params.spikein_genome && params.genomes.containsKey(params.spikein_genome)) {
        if (params.attribute) {
            val = params.attribute
        } else if (params.genomes && params.spikein_genome && params.genomes.containsKey(params.spikein_genome)) {
            if (params.genomes[ params.spikein_genome ].containsKey(attribute)) {
                val = params.genomes[ params.spikein_genome ][ attribute ]
            }
+11 −7
Original line number Diff line number Diff line
@@ -17,11 +17,13 @@ nextflow.enable.dsl = 2
========================================================================================
*/

params.fasta     = WorkflowMain.getGenomeAttribute(params, 'fasta')
params.gtf       = WorkflowMain.getGenomeAttribute(params, 'gtf')
params.gene_bed  = WorkflowMain.getGenomeAttribute(params, 'bed12')
params.blacklist = WorkflowMain.getGenomeAttribute(params, 'blacklist')
params.bowtie2   = WorkflowMain.getGenomeAttribute(params, 'bowtie2')
if (!params.fasta) {
    params.bowtie2 = params.bowtie2 ?: WorkflowMain.getGenomeAttribute(params, 'bowtie2')
}
params.fasta     = params.fasta     ?: WorkflowMain.getGenomeAttribute(params, 'fasta')
params.gtf       = params.gtf       ?: WorkflowMain.getGenomeAttribute(params, 'gtf')
params.gene_bed  = params.gene_bed  ?: WorkflowMain.getGenomeAttribute(params, 'bed12')
params.blacklist = params.blacklist ?: WorkflowMain.getGenomeAttribute(params, 'blacklist')

/*
========================================================================================
@@ -29,8 +31,10 @@ params.bowtie2 = WorkflowMain.getGenomeAttribute(params, 'bowtie2')
========================================================================================
*/

params.spikein_fasta   = WorkflowMain.getGenomeAttributeSpikeIn(params, 'fasta')
params.spikein_bowtie2 = WorkflowMain.getGenomeAttributeSpikeIn(params, 'bowtie2')
if (!params.spikein_fasta) {
    params.spikein_bowtie2 = params.spikein_bowtie2 ?: WorkflowMain.getGenomeAttributeSpikeIn(params, 'bowtie2')
}
params.spikein_fasta   = params.spikein_fasta ?: WorkflowMain.getGenomeAttributeSpikeIn(params, 'fasta')

/*
========================================================================================
Loading