Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ script:
# Lint the pipeline code
- nf-core lint ${TRAVIS_BUILD_DIR}
# Run the basic pipeline with the test profile
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --saveReference
# Run the basic pipeline with single end data (pretending its single end actually)
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --singleEnd
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --singleEnd --bwa_index results/reference_genome/bwa_index/
# Run the same pipeline testing optional step: fastp, complexity
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --complexity_filter
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --complexity_filter --bwa_index results/reference_genome/bwa_index/
# Test BAM Trimming
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --trim_bam
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --trim_bam --bwa_index results/reference_genome/bwa_index/
# Test running with CircularMapper
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --circularmapper --circulartarget 'NC_007596.2'
# Test running with BWA Mem
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --bwamem
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker --pairedEnd --bwamem --bwa_index results/reference_genome/bwa_index/
# Test basic pipeline with Conda too
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,conda --pairedEnd
- travis_wait 25 nextflow run ${TRAVIS_BUILD_DIR} -profile test,conda --pairedEnd --bwa_index results/reference_genome/bwa_index/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## unpublished

### `Added`
* [#80](https://github.com/nf-core/eager/pull/80) - BWA Index file handling
* [#77](https://github.com/nf-core/eager/pull/77) - Lots of documentation updates by [@jfy133](https://github.com/jfy133)

## [2.0.2] - 2018-11-03

Expand Down
44 changes: 22 additions & 22 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ channels:
- bioconda
- conda-forge
dependencies:
- openjdk=8.0.152
- fastqc=0.11.8
- adapterremoval=2.2.2
- adapterremovalfixprefix=0.0.4
- bwa=0.7.17
- picard=2.18.15
- samtools=1.9
- dedup=0.12.3
- angsd=0.923
- circularmapper=1.93.4
- gatk4=4.0.11.0
- qualimap=2.2.2b
- vcf2genome=0.91
- damageprofiler=0.3.11
- multiqc=1.6
- pmdtools=0.60
- r-rmarkdown=1.10
- libiconv=1.15
- sequencetools=1.2.2
- preseq=2.0.3
- fastp=0.19.4
- bamutil=1.0.14
- anaconda::openjdk=8.0.152
- bioconda::fastqc=0.11.8
- bioconda::adapterremoval=2.2.2
- bioconda::adapterremovalfixprefix=0.0.4
- bioconda::bwa=0.7.17
- bioconda::picard=2.18.15
- bioconda::samtools=1.9
- bioconda::dedup=0.12.3
- bioconda::angsd=0.923
- bioconda::circularmapper=1.93.4
- bioconda::gatk4=4.0.11.0
- bioconda::qualimap=2.2.2b
- bioconda::vcf2genome=0.91
- bioconda::damageprofiler=0.3.11
- bioconda::multiqc=1.6
- bioconda::pmdtools=0.60
- conda-forge::r-rmarkdown=1.10
- conda-forge::libiconv=1.15
- bioconda::sequencetools=1.2.2
- bioconda::preseq=2.0.3
- bioconda::fastp=0.19.4
- bioconda::bamutil=1.0.14
#Missing Schmutzi,snpAD
28 changes: 22 additions & 6 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,24 @@ wherearemyfiles = file("$baseDir/assets/where_are_my_files.txt")

// Validate inputs
Channel.fromPath("${params.fasta}")
.ifEmpty { exit 1, "No genome specified! Please specify one with --fasta or --bwa_index"}
.ifEmpty { exit 1, "No genome specified! Please specify one with --fasta"}
.into {ch_fasta_for_bwa_indexing;ch_fasta_for_faidx_indexing;ch_fasta_for_dict_indexing; ch_fasta_for_bwa_mapping; ch_fasta_for_damageprofiler; ch_fasta_for_qualimap; ch_fasta_for_pmdtools; ch_fasta_for_circularmapper; ch_fasta_for_circularmapper_index;ch_fasta_for_bwamem_mapping}

//Index files provided? Then check whether they are correct and complete
if (params.aligner != 'bwa' && !params.circularmapper && !params.bwamem){
exit 1, "Invalid aligner option. Default is bwa, but specify --circularmapper or --bwamem to use these."
}
if( params.bwa_index && (params.aligner == 'bwa' | params.bwamem)){
bwa_index = Channel
.fromPath("${params.bwa_index}/**.*")
.ifEmpty { exit 1, "BWA index not found: ${params.bwa_index}" }
.into{ch_bwa_index_existing;ch_bwa_index_bwamem_existing}
} else {
//Create empty channels to make sure later mix() does not fail
ch_bwa_index_existing = Channel.empty()
ch_bwa_index_bwamem_existing = Channel.empty()
}

//Validate that either pairedEnd or singleEnd has been specified by the user!
if( params.singleEnd || params.pairedEnd ){
} else {
Expand Down Expand Up @@ -280,6 +295,7 @@ summary['Pipeline Version'] = workflow.manifest.version
summary['Run Name'] = custom_runName ?: workflow.runName
summary['Reads'] = params.reads
summary['Fasta Ref'] = params.fasta
if(params.bwa_index) summary['BWA Index'] = params.bwa_index
summary['Data Type'] = params.singleEnd ? 'Single-End' : 'Paired-End'
summary['Max Memory'] = params.max_memory
summary['Max CPUs'] = params.max_cpus
Expand Down Expand Up @@ -364,7 +380,7 @@ process makeBWAIndex {
else null
}

when: !params.bwa_index && params.fasta && params.aligner == 'bwa'
when: !params.bwa_index && params.fasta && (params.aligner == 'bwa' || params.bwamem)

input:
file fasta from ch_fasta_for_bwa_indexing
Expand Down Expand Up @@ -561,7 +577,7 @@ process bwa {

input:
file(reads) from ch_clipped_reads
file "*" from ch_bwa_index
file "*" from ch_bwa_index.mix(ch_bwa_index_existing).collect()
file fasta from ch_fasta_for_bwa_mapping

output:
Expand Down Expand Up @@ -638,7 +654,7 @@ process bwamem {

input:
file(reads) from ch_clipped_reads_bwamem
file "*" from ch_bwa_index_bwamem
file "*" from ch_bwa_index_bwamem.mix(ch_bwa_index_bwamem_existing).collect()
file fasta from ch_fasta_for_bwamem_mapping

output:
Expand Down Expand Up @@ -868,10 +884,10 @@ process markDup{
}

//If no deduplication runs, the input is mixed directly from samtools filter, if it runs either markdup or dedup is used thus mixed from these two channels
ch_dedup_for_pmdtools = Channel.create()
ch_dedup_for_pmdtools = Channel.empty()

//Bamutils TrimBam Channel
ch_for_bamutils = Channel.create()
ch_for_bamutils = Channel.empty()

if(!params.skip_deduplication){
ch_dedup_for_pmdtools.mix(ch_markdup_bam,ch_dedup_bam).into {ch_for_pmdtools;ch_for_bamutils}
Expand Down