diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a54c5d7d11d173b292452f3906efd258c4b0582b..db68b44edf999757dae2d41471f6101fab4c6f36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,12 @@ before_script: - module add python/3.6.1-2-anaconda - pip install --user pytest-pythonpath pytest-cov - - module load nextflow/0.31.0 + - module load nextflow/0.31.0 - ln -s /work/BICF/s163035/chipseq/*fastq.gz test_data/ stages: - unit + - astrocyte - single - multiple @@ -15,6 +16,18 @@ user_configuration: - pytest -m unit - pytest -m unit --cov=./workflow/scripts +astrocyte: + stage: astrocyte + script: + - module load astrocyte/0.1.0 + - module unload nextflow + - cd .. + - astrocyte_cli validate chipseq_analysis + - astrocyte_cli test chipseq_analysis + - pytest -m singleend + artifacts: + expire_in: 2 days + single_end_mouse: stage: single script: diff --git a/astrocyte_pkg.yml b/astrocyte_pkg.yml index 929e2316a228ee29b6cd6f8f23627d382b9de224..1388f66111dfc262566f7a2e4fb0c1ce745ec762 100644 --- a/astrocyte_pkg.yml +++ b/astrocyte_pkg.yml @@ -11,7 +11,7 @@ name: 'chipseq_analysis_bicf' # Who wrote this? author: 'Beibei Chen and Venkat Malladi' # A contact email address for questions -email: 'biohpc-help@utsouthwestern.edu' +email: 'bicf@utsouthwestern.edu' # A more informative title for the workflow package title: 'BICF ChIP-seq Analysis Workflow' # A summary of the workflow package in plain text @@ -27,7 +27,7 @@ description: | # web interface. These files are in the 'docs' subdirectory. The first file # listed will be used as a documentation index and is index.md by convention documentation_files: - - ['index.md', 'chipseq-analysis'] + - 'index.md' # ----------------------------------------------------------------------------- # NEXTFLOW WORKFLOW CONFIGURATION @@ -42,15 +42,16 @@ workflow_modules: - 'python/3.6.1-2-anaconda' - 'trimgalore/0.4.1' - 'bwa/intel/0.7.12' + - 'samtools/1.6' - 'sambamba/0.6.6' - 'bedtools/2.26.0' - 'deeptools/2.5.0.1' - 'phantompeakqualtools/1.2' - 'macs/2.1.0-20151222' - 'UCSC_userApps/v317' - - 'R/3.4.1-gccmkl' + - 'R/3.3.2-gccmkl' - 'meme/4.11.1-gcc-openmpi' - - 'python/2.7.x-anaconda' + # A list of parameters used by the workflow, defining how to present them, # options etc in the web interface. For each parameter: @@ -93,6 +94,7 @@ workflow_parameters: One or more input FASTQ files from a ChIP-seq expereiment and a design file with the link bewetwen the same file name and sample id regex: ".*(fastq|fq)*" + min: 2 - id: pairedEnd type: select @@ -117,14 +119,23 @@ workflow_parameters: - id: genome type: select + required: true choices: - [ 'GRCh38', 'Human GRCh38'] - [ 'GRCh37', 'Human GRCh37'] - [ 'GRCm38', 'Mouse GRCm38'] - required: true description: | Reference species and genome used for alignment and subsequent analysis. + - id: astrocyte + type: select + required: true + choices: + - [ 'true', 'True'] + default: 'true' + description: | + Ensure configuraton for astrocyte + # ----------------------------------------------------------------------------- # SHINY APP CONFIGURATION @@ -145,7 +156,6 @@ vizapp_cran_packages: # List of any Bioconductor packages, not provided by the modules, # that must be made available to the vizapp vizapp_bioc_packages: - - qusage -# - ballgown + vizapp_github_packages: - js229/Vennerable diff --git a/env.md b/env.md deleted file mode 100644 index 54176d86aa83a2fd8cf7825ad2fee7643c6234d3..0000000000000000000000000000000000000000 --- a/env.md +++ /dev/null @@ -1,17 +0,0 @@ -## Create new env in specific folder -```shell -conda create -p /project/shared/bicf_workflow_ref/chipseq_bchen4/ -c r r-essentials -#Add channels -conda config --add channels conda-forge -conda config --add channels r -conda config --add channels bioconda -pip install --user twobitreader -conda install -c r r-xml -``` - -Install bioconductor in R console: -```R -source("http://bioconductor.org/biocLite.R") -biocLite() -biocLite(c("DiffBind","ChIPseeker")) -``` \ No newline at end of file diff --git a/workflow/main.nf b/workflow/main.nf index 6b59b778e7502c808743977a75c457f696bcfc23..8196b54bbf6659d628a5dd125abd046e25dc851a 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -5,19 +5,33 @@ // Define Input variables params.reads = "$baseDir/../test_data/*.fastq.gz" -params.pairedEnd = false +params.pairedEnd = 'false' params.designFile = "$baseDir/../test_data/design_ENCSR238SGC_SE.txt" -params.genome = 'GRCm38' -params.genomes = [] -params.bwaIndex = params.genome ? params.genomes[ params.genome ].bwa ?: false : false -params.genomeSize = params.genome ? params.genomes[ params.genome ].genomesize ?: false : false -params.chromSizes = params.genome ? params.genomes[ params.genome ].chromsizes ?: false : false -params.fasta = params.genome ? params.genomes[ params.genome ].fasta ?: false : false params.cutoffRatio = 1.2 params.outDir= "$baseDir/output" params.extendReadsLen = 100 params.topPeakCount = 600 +// Assign variables if astrocyte +params.genome = 'GRCm38' +if (params.astrocyte == 'false') { + params.bwaIndex = params.genome ? params.genomes[ params.genome ].bwa ?: false : false + params.genomeSize = params.genome ? params.genomes[ params.genome ].genomesize ?: false : false + params.chromSizes = params.genome ? params.genomes[ params.genome ].chromsizes ?: false : false + params.fasta = params.genome ? params.genomes[ params.genome ].fasta ?: false : false +} else if (params.astrocyte == 'true') { + referenceLocation = "/project/shared/bicf_workflow_ref" + params.bwaIndex = "$referenceLocation/$genome" + params.chromSizes = "$referenceLocation/$genome/genomefile.txt" + params.fasta = "$referenceLocation/$genome/genome.fa.txt" + if (params.genome == 'GRCh37' || params.genome == 'GRCh38') { + params.chromSizes = 'hs' + } else if (params.chromSizes == 'GRCm38') { + params.chromSizes = 'mm' + } +} + + // Check inputs if( params.bwaIndex ){ bwaIndex = Channel @@ -35,7 +49,6 @@ readsList = Channel .collectFile( name: 'fileList.tsv', newLine: true ) // Define regular variables -pairedEnd = params.pairedEnd designFile = params.designFile genomeSize = params.genomeSize genome = params.genome @@ -46,6 +59,12 @@ outDir = params.outDir extendReadsLen = params.extendReadsLen topPeakCount = params.topPeakCount +if (params.pairedEnd == 'false'){ + pairedEnd = false +} else { + pairedEnd = true +} + // Check design file for errors process checkDesignFile {