nRnYqfrb5pJuTP5YAohj

nextflow.config

Jan 26th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.07 KB | None | 0 0
  1. /*
  2. * -------------------------------------------------
  3. * nf-core/rnaseq Nextflow config file
  4. * -------------------------------------------------
  5. * Default config options for all environments.
  6. */
  7.  
  8. // Global default params, used in configs
  9. params {
  10.  
  11. // Pipeline Options
  12. // Workflow flags
  13. genome = false
  14. reads = "data/*.fastq.gz"
  15. singleEnd = false
  16.  
  17. // References
  18. genome = false
  19. salmon_index = false
  20. transcript_fasta = false
  21. splicesites = false
  22. saveReference = false
  23. gencode = false
  24. compressedReference = false
  25.  
  26. // Strandedness
  27. forwardStranded = false
  28. reverseStranded = false
  29. unStranded = false
  30.  
  31. // Trimming
  32. skipTrimming = false
  33. clip_r1 = 0
  34. clip_r2 = 0
  35. three_prime_clip_r1 = 0
  36. three_prime_clip_r2 = 0
  37. trim_nextseq = 0
  38. pico = false
  39. saveTrimmed = false
  40.  
  41. // Ribosomal RNA removal
  42. removeRiboRNA = false
  43. save_nonrRNA_reads = false
  44. rRNA_database_manifest = false
  45.  
  46. // Alignment
  47. aligner = 'star'
  48. pseudo_aligner = false
  49. stringTieIgnoreGTF = false
  50. seq_center = false
  51. saveAlignedIntermediates = false
  52. skipAlignment = false
  53. saveUnaligned = false
  54.  
  55. // Read Counting
  56. fc_extra_attributes = 'gene_name'
  57. fc_group_features = 'gene_id'
  58. fc_count_type = 'exon'
  59. fc_group_features_type = 'gene_biotype'
  60. sampleLevel = false
  61. // See https://bit.ly/3p8fhiN for setting below error with GRCh38
  62. skipBiotypeQC = true
  63.  
  64. // QC
  65. skipQC = false
  66. skipFastQC = false
  67. skipPreseq = false
  68. skipDupRadar = false
  69. skipQualimap = false
  70. skipRseQC = false
  71. skipEdgeR = false
  72. skipMultiQC = false
  73.  
  74. // Defaults
  75. project = false
  76. markdup_java_options = '"-Xms4000m -Xmx7g"' //Established values for markDuplicate memory consumption, see issue PR #689 (in Sarek) for details
  77. hisat_build_memory = 200 // Required amount of memory in GB to build HISAT2 index with splice sites
  78. readPaths = null
  79. star_memory = false // Cluster specific param required for hebbe
  80. rRNA_database_manifest = "$baseDir/assets/rrna-db-defaults.txt"
  81.  
  82. // Boilerplate options
  83. clusterOptions = false
  84. outdir = './results'
  85. name = false
  86. multiqc_config = "$baseDir/assets/multiqc_config.yaml"
  87. email = false
  88. email_on_fail = false
  89. max_multiqc_email_size = 25.MB
  90. plaintext_email = false
  91. monochrome_logs = false
  92. help = false
  93. //igenomes_base = "./iGenomes"
  94. igenomes_base = '/ceph01/projects/reference-databases'
  95. tracedir = "${params.outdir}/pipeline_info"
  96. awsqueue = false
  97. awsregion = 'eu-west-1'
  98. igenomesIgnore = false
  99. custom_config_version = 'master'
  100. custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
  101. hostnames = false
  102. config_profile_description = false
  103. config_profile_contact = false
  104. config_profile_url = false
  105. }
  106.  
  107. // Container slug. Stable releases should specify release tag!
  108. // Developmental code should specify :dev
  109. process.container = 'nfcore/rnaseq:1.4.2'
  110.  
  111. // Load base.config by default for all pipelines
  112. includeConfig 'conf/base.config'
  113.  
  114. // Load nf-core custom profiles from different Institutions
  115. try {
  116. includeConfig "${params.custom_config_base}/nfcore_custom.config"
  117. } catch (Exception e) {
  118. System.err.println("WARNING: Could not load nf-core/config profiles: ${params.custom_config_base}/nfcore_custom.config")
  119. }
  120.  
  121. profiles {
  122. awsbatch { includeConfig 'conf/awsbatch.config' }
  123. conda { process.conda = "$baseDir/environment.yml" }
  124. debug { process.beforeScript = 'echo $HOSTNAME' }
  125. docker { docker.enabled = true }
  126. singularity { singularity.enabled = true
  127. singularity.autoMounts = true }
  128. test { includeConfig 'conf/test.config' }
  129. cuba { includeConfig 'conf/cuba.config' }
  130. test_gz { includeConfig 'conf/test_gz.config' }
  131. cluster { includeConfig 'conf/cluster.config' }
  132. }
  133.  
  134. // Avoid this error:
  135. // WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
  136. // Testing this in nf-core after discussion here https://github.com/nf-core/tools/pull/351, once this is established and works well, nextflow might implement this behavior as new default.
  137. docker.runOptions = '-u \$(id -u):\$(id -g)'
  138.  
  139. // Load igenomes.config if required
  140. if (!params.igenomesIgnore) {
  141. includeConfig 'conf/igenomes.config'
  142. }
  143.  
  144. // Capture exit codes from upstream processes when piping
  145. process.shell = ['/bin/bash', '-euo', 'pipefail']
  146.  
  147. timeline {
  148. enabled = true
  149. file = "${params.tracedir}/execution_timeline.html"
  150. }
  151. report {
  152. enabled = true
  153. file = "${params.tracedir}/execution_report.html"
  154. }
  155. trace {
  156. enabled = true
  157. file = "${params.tracedir}/execution_trace.txt"
  158. }
  159. dag {
  160. enabled = true
  161. file = "${params.tracedir}/pipeline_dag.svg"
  162. }
  163.  
  164. manifest {
  165. name = 'nf-core/rnaseq'
  166. author = 'Phil Ewels, Rickard Hammarén'
  167. homePage = 'https://github.com/nf-core/rnaseq'
  168. description = 'Nextflow RNA-Seq analysis pipeline, part of the nf-core community.'
  169. mainScript = 'main.nf'
  170. nextflowVersion = '>=19.04.0'
  171. version = '1.4.2'
  172. }
  173.  
  174. // Function to ensure that resource requirements don't go beyond
  175. // a maximum limit
  176. def check_max(obj, type) {
  177. if (type == 'memory') {
  178. try {
  179. if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
  180. return params.max_memory as nextflow.util.MemoryUnit
  181. else
  182. return obj
  183. } catch (all) {
  184. println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj"
  185. return obj
  186. }
  187. } else if (type == 'time') {
  188. try {
  189. if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
  190. return params.max_time as nextflow.util.Duration
  191. else
  192. return obj
  193. } catch (all) {
  194. println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
  195. return obj
  196. }
  197. } else if (type == 'cpus') {
  198. try {
  199. return Math.min( obj, params.max_cpus as int )
  200. } catch (all) {
  201. println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
  202. return obj
  203. }
  204. }
  205. }
  206.  
Add Comment
Please, Sign In to add comment