Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bowtie index issue #317

Merged
merged 11 commits into from
Feb 21, 2024
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- "test"
- "test_no_genome"
- "test_umi"
- "test_index"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4
Expand Down
35 changes: 35 additions & 0 deletions conf/test_index.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run nf-core/smrnaseq -profile test_index,<docker/singularity> --outdir <OUTDIR>

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

params {
config_profile_name = 'Test index profile'
config_profile_description = 'Minimal test dataset to check pipeline function with bowtie index'

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

// Input data

input = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/samplesheet/v2.0/samplesheet.csv'
fasta = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/genome.fa'
bowtie_index = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/'

mirtrace_species = 'hsa'
protocol = 'illumina'
skip_mirdeep = true
save_merged = false
save_aligned_mirna_quant = false

cleanup = true //Otherwise tests dont run through properly.
}
6 changes: 3 additions & 3 deletions conf/test_no_genome.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ params {

// Input data
input = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/samplesheet/v2.0/samplesheet.csv'
mature = 'https://github.com/nf-core/test-datasets/raw/smrnaseq-better-input/reference/mature.fa'
hairpin = 'https://github.com/nf-core/test-datasets/raw/smrnaseq-better-input/reference/hairpin.fa'
mirna_gtf = 'https://github.com/nf-core/test-datasets/raw/smrnaseq-better-input/reference/hsa.gff3'
mature = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/mature.fa'
hairpin = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/hairpin.fa'
mirna_gtf = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/reference/hsa.gff3'
mirtrace_species = 'hsa'
skip_mirdeep = true
protocol = 'illumina'
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ profiles {
test_umi { includeConfig 'conf/test_umi.config' }
test_no_genome { includeConfig 'conf/test_no_genome.config' }
test_full { includeConfig 'conf/test_full.config' }
test_index { includeConfig 'conf/test_index.config' }
}

// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile
Expand Down
4 changes: 2 additions & 2 deletions workflows/smrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ workflow SMRNASEQ {
)
ch_versions = ch_versions.mix(FASTQ_FASTQC_UMITOOLS_FASTP.out.versions)

ch_fasta = params.fasta ? file(params.fasta): []
ch_fasta = params.fasta ? file(params.fasta) : []
ch_reads_for_mirna = FASTQ_FASTQC_UMITOOLS_FASTP.out.reads

// even if bowtie index is specified, there still needs to be a fasta.
Expand All @@ -162,7 +162,7 @@ workflow SMRNASEQ {
//Prepare bowtie index, unless specified
//This needs to be done here as the index is used by GENOME_QUANT
if(params.bowtie_index) {
ch_bowtie_index = Channel.fromPath("${index}**ebwt", checkIfExists: true).ifEmpty { error "Bowtie1 index directory not found: ${index}" }
Channel.fromPath("${params.bowtie_index}**ebwt", checkIfExists: true).ifEmpty{ error "Bowtie1 index directory not found: ${index}" }.set { ch_bowtie_index }
} else {
INDEX_GENOME ( [ [:], ch_fasta ] )
ch_versions = ch_versions.mix(INDEX_GENOME.out.versions)
Expand Down