├── .dockerignore ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── circle.yml ├── conda.yml ├── data └── ggal │ ├── ggal_1_48850000_49020000.Ggal71.500bpflank.fa │ ├── ggal_1_48850000_49020000.bed.gff │ ├── ggal_gut_1.fq │ ├── ggal_gut_2.fq │ ├── ggal_liver_1.fq │ ├── ggal_liver_2.fq │ ├── ggal_lung_1.fq │ ├── ggal_lung_2.fq │ ├── transcriptome_1.fa │ └── transcriptome_2.fa ├── docker ├── Docker.s3 ├── Dockerfile └── Makefile ├── fun-library.nf ├── main.nf ├── main1.nf ├── main10.nf ├── main11.nf ├── main12.nf ├── main13.nf ├── main14.nf ├── main15.nf ├── main2.nf ├── main3.nf ├── main4.nf ├── main6.nf ├── main7.nf ├── main8.nf ├── main9.nf ├── multiqc ├── logo.png └── multiqc_config.yaml ├── nextflow.config ├── reads.yml ├── rnaseq-analysis-2.nf ├── rnaseq-analysis.nf ├── rnaseq-processes-2.nf └── rnaseq-processes.nf /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .nextflow* 3 | data 4 | work 5 | nextflow 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .nextflow* 2 | work/* 3 | results -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | jdk: 3 | - openjdk8 4 | services: 5 | - docker 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - sudo apt-get -qq update 11 | - sudo apt-get -qq -y install graphviz realpath 12 | script: 13 | - curl -fsSL get.nextflow.io | bash 14 | - ./nextflow run . -with-docker -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 2 | 3 | This tutorial shows how convert the basic [rnaseq-nf](https://github.com/nextflow-io/rnaseq-nf) pipeline to Nextflow DSL-2. 4 | 5 | ## Get started 6 | 7 | Clone this repository in your computer, then change in the repo directory 8 | 9 | https://github.com/nextflow-io/nfcamp-tutorial.git \ 10 | && cd nfcamp-tutorial 11 | 12 | 13 | Pull the required container: 14 | 15 | docker pull nextflow/rnaseq-nf:latest 16 | 17 | Change the standard profile in the `nextflow.config` as follow: 18 | 19 | standard { 20 | process.container = 'nextflow/rnaseq-nf:latest' 21 | docker.enabled = true 22 | resume = true 23 | } 24 | 25 | Run the following script checking the differences each others. 26 | 27 | ## Step 1 - Use of `path` and `tuple` input/output qualifier 28 | 29 | nextflow run main1.nf 30 | 31 | ## Step 2 - Show use of yaml file 32 | 33 | nextflow run main2.nf -params-file reads.yml 34 | 35 | ## Step 3 - Show DLS-2 process and workflow 36 | 37 | nextflow run main3.nf 38 | 39 | ## Step 4 - Multiple use of the same channel 40 | 41 | nextflow run main4.nf 42 | 43 | ## Step 5 - Creation of a module files: 44 | 45 | save the process to the file `rnaseq-processes.nf` 46 | 47 | ## Step 6 - Inclusion of module file 48 | 49 | nextflow run main6.nf 50 | 51 | ## Step 7 - Selection process inclusion 52 | 53 | include index from './rnaseq-processes' params(params) 54 | include quant from './rnaseq-processes' params(params) 55 | include fastqc from './rnaseq-processes' params(params) 56 | include multiqc from './rnaseq-processes' params(params) 57 | 58 | ## Step 8 - Create a sub-workflow module file named: `rnaseq-analysis.nf` 59 | 60 | workflow rnaseq_analysis { 61 | get: 62 | transcriptome 63 | read_pairs_ch 64 | 65 | main: 66 | index( transcriptome ) 67 | 68 | quant( index.out, read_pairs_ch ) 69 | 70 | fastqc( read_pairs_ch ) 71 | 72 | multiqc( 73 | quant.out.mix(fastqc.out).collect(), 74 | params.multiqc ) 75 | 76 | } 77 | 78 | 79 | ## Step 9 - Create two sub-workflows in the main script and use `-entry` to execute them 80 | 81 | workflow rnaseqForTranscrip1 { 82 | rnaseq_analysis ( 83 | params.transcriptome, 84 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 85 | } 86 | 87 | workflow rnaseqForTranscrip2 { 88 | rnaseq_analysis ( 89 | params.transcriptome, 90 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 91 | } 92 | 93 | 94 | 95 | nextflow run main9.nf -entry rnaseqForTranscrip1 96 | nextflow run main9.nf -entry rnaseqForTranscrip2 97 | 98 | ## Step 10 - Use two different genome files 99 | 100 | params.transcript1 = "$baseDir/data/ggal/transcriptome_1.fa" 101 | params.transcript2 = "$baseDir/data/ggal/transcriptome_2.fa" 102 | 103 | 104 | invoke both 105 | 106 | workflow { 107 | rnaseqForTranscrip1() 108 | rnaseqForTranscrip2() 109 | } 110 | 111 | ## Step 11 - Use of the fork operator 112 | 113 | 114 | workflow { 115 | reads = Channel .fromFilePairs( 'data/ggal/ggal_*_{1,2}.fq' ) 116 | transcripts = Channel.fromPath('data/ggal/transcriptome_*.fa') 117 | transcripts 118 | .combine( reads ) 119 | .fork { tuple -> 120 | trascript: tuple[0] 121 | reads: [ tuple[1], tuple[2] ] 122 | } 123 | .set { fork_out } 124 | 125 | rnaseq_analysis(fork_out) 126 | } 127 | 128 | ## Step 12 - Use of pipes 129 | 130 | 131 | workflow { 132 | 133 | Channel .fromFilePairs( 'data/ggal/ggal_*_{1,2}.fq' ).set {reads} 134 | Channel.fromPath('data/ggal/transcriptome_*.fa') \ 135 | | combine( reads ) \ 136 | | fork { tuple -> 137 | trascript: tuple[0] 138 | reads: [ tuple[1], tuple[2] ] 139 | } \ 140 | | rnaseq_analysis 141 | 142 | } 143 | 144 | 145 | ## Step 13 - Use of forkCriteria 146 | 147 | workflow { 148 | separateTranscriptFromReads = forkCriteria({ tuple -> 149 | trascript: tuple[0] 150 | reads: [ tuple[1], tuple[2] ] 151 | }) 152 | 153 | Channel.fromFilePairs( 'data/ggal/ggal_*_{1,2}.fq' ).set {reads} 154 | Channel.fromPath('data/ggal/transcriptome_*.fa') \ 155 | | combine( reads ) \ 156 | | fork(separateTranscriptFromReads) \ 157 | | rnaseq_analysis 158 | } 159 | 160 | ## Step 14 - Use a custom function 161 | 162 | def getInputForRnaseq( transcriptsPath, readsPath ) { 163 | 164 | def separateTranscriptFromReads = forkCriteria({ tuple -> 165 | trascript: tuple[0] 166 | reads: [ tuple[1], tuple[2] ] 167 | }) 168 | 169 | def reads = Channel.fromFilePairs(readsPath) 170 | Channel.fromPath(transcriptsPath) \ 171 | | combine( reads ) \ 172 | | fork(separateTranscriptFromReads) 173 | 174 | } 175 | 176 | workflow { 177 | getInputForRnaseq(params.transcripts, params.reads) | rnaseq_analysis 178 | } 179 | 180 | ## Step 15 - Use of workflow publish 181 | 182 | * Remove publishDir from processes 183 | * Add emit/out to rnaseq_analysis 184 | * Add publish to the main workflow 185 | 186 | workflow { 187 | main: 188 | getInputForRnaseq(params.transcripts, params.reads) | rnaseq_analysis 189 | publish: 190 | rnaseq_analysis.out.fastqc to: 'results/fastqc_files' 191 | rnaseq_analysis.out.quant to: 'results/quant_files' 192 | rnaseq_analysis.out.multiqc to: 'results/multiqc_report' 193 | } -------------------------------------------------------------------------------- /circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | java: 3 | version: openjdk8 4 | services: 5 | - docker 6 | 7 | test: 8 | override: 9 | - curl -fsSL get.nextflow.io | bash 10 | - ./nextflow run . -with-docker 11 | -------------------------------------------------------------------------------- /conda.yml: -------------------------------------------------------------------------------- 1 | name: rnaseq-nf 2 | channels: 3 | - defaults 4 | - bioconda 5 | - conda-forge 6 | dependencies: 7 | # Default bismark 8 | - salmon=0.8.2 9 | - fastqc=0.11.5 10 | - multiqc=1.5 11 | -------------------------------------------------------------------------------- /data/ggal/ggal_1_48850000_49020000.bed.gff: -------------------------------------------------------------------------------- 1 | 1 protein_coding exon 9363 9365 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "1"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000304601"; 2 | 1 protein_coding CDS 9363 9365 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "1"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 3 | 1 protein_coding start_codon 9363 9365 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "1"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; 4 | 1 protein_coding exon 9492 9629 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "2"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128217"; 5 | 1 protein_coding CDS 9492 9629 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "2"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 6 | 1 protein_coding exon 9807 9899 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "3"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128207"; 7 | 1 protein_coding CDS 9807 9899 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "3"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 8 | 1 protein_coding exon 17513 17627 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "4"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128214"; 9 | 1 protein_coding CDS 17513 17627 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "4"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 10 | 1 protein_coding exon 25466 25515 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "5"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128206"; 11 | 1 protein_coding CDS 25466 25515 . + 2 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "5"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 12 | 1 protein_coding exon 26906 27051 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "6"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128212"; 13 | 1 protein_coding CDS 26906 27051 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "6"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 14 | 1 protein_coding exon 28318 28489 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "7"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128210"; 15 | 1 protein_coding CDS 28318 28489 . + 1 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "7"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 16 | 1 protein_coding exon 28902 28976 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "8"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128202"; 17 | 1 protein_coding CDS 28902 28976 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "8"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 18 | 1 protein_coding exon 30102 30204 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "9"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128218"; 19 | 1 protein_coding CDS 30102 30204 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "9"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 20 | 1 protein_coding exon 32102 32157 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "10"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128203"; 21 | 1 protein_coding CDS 32102 32157 . + 2 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "10"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 22 | 1 protein_coding exon 33998 34051 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "11"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128215"; 23 | 1 protein_coding CDS 33998 34051 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "11"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 24 | 1 protein_coding exon 34472 34535 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "12"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128204"; 25 | 1 protein_coding CDS 34472 34535 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "12"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 26 | 1 protein_coding exon 39445 39533 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "13"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128213"; 27 | 1 protein_coding CDS 39445 39533 . + 2 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "13"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 28 | 1 protein_coding exon 44828 44911 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "14"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128211"; 29 | 1 protein_coding CDS 44828 44911 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "14"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 30 | 1 protein_coding exon 46449 46518 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "15"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128219"; 31 | 1 protein_coding CDS 46449 46518 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "15"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 32 | 1 protein_coding exon 48688 48794 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "16"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128205"; 33 | 1 protein_coding CDS 48688 48794 . + 2 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "16"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 34 | 1 protein_coding exon 52850 52983 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "17"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000128221"; 35 | 1 protein_coding CDS 52850 52983 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "17"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 36 | 1 protein_coding exon 54245 54379 . + . gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "18"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; exon_id "ENSGALE00000307910"; 37 | 1 protein_coding CDS 54245 54353 . + 1 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "18"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; protein_id "ENSGALP00000019304"; 38 | 1 protein_coding stop_codon 54354 54356 . + 0 gene_id "ENSGALG00000011847"; transcript_id "ENSGALT00000019330"; exon_number "18"; gene_name "TTC26"; gene_biotype "protein_coding"; transcript_name "TTC26-201"; 39 | 1 protein_coding exon 67033 67073 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "1"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000287083"; 40 | 1 protein_coding CDS 67033 67073 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "1"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 41 | 1 protein_coding start_codon 67033 67035 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "1"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; 42 | 1 protein_coding exon 67259 67616 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "2"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128246"; 43 | 1 protein_coding CDS 67259 67616 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "2"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 44 | 1 protein_coding exon 71917 72009 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "3"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128244"; 45 | 1 protein_coding CDS 71917 72009 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "3"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 46 | 1 protein_coding exon 77548 77649 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "4"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128251"; 47 | 1 protein_coding CDS 77548 77649 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "4"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 48 | 1 protein_coding exon 89127 89264 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "5"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128258"; 49 | 1 protein_coding CDS 89127 89264 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "5"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 50 | 1 protein_coding exon 90317 90429 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "6"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128248"; 51 | 1 protein_coding CDS 90317 90429 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "6"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 52 | 1 protein_coding exon 91255 91753 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "7"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128255"; 53 | 1 protein_coding CDS 91255 91753 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "7"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 54 | 1 protein_coding exon 95137 95207 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "8"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128250"; 55 | 1 protein_coding CDS 95137 95207 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "8"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 56 | 1 protein_coding exon 95937 96066 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "9"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128253"; 57 | 1 protein_coding CDS 95937 96066 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "9"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 58 | 1 protein_coding exon 97416 97534 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "10"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128256"; 59 | 1 protein_coding CDS 97416 97534 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "10"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 60 | 1 protein_coding exon 98166 98279 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "11"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128260"; 61 | 1 protein_coding CDS 98166 98279 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "11"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 62 | 1 protein_coding exon 99699 99842 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "12"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128257"; 63 | 1 protein_coding CDS 99699 99842 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "12"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 64 | 1 protein_coding exon 105181 105231 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "13"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128245"; 65 | 1 protein_coding CDS 105181 105231 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "13"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 66 | 1 protein_coding exon 106560 106602 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "14"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128247"; 67 | 1 protein_coding CDS 106560 106602 . + 1 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "14"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 68 | 1 protein_coding exon 107138 108673 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "15"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128259"; 69 | 1 protein_coding CDS 107138 108673 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "15"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 70 | 1 protein_coding exon 112436 112682 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "16"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128252"; 71 | 1 protein_coding CDS 112436 112682 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "16"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 72 | 1 protein_coding exon 113405 113494 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "17"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000128249"; 73 | 1 protein_coding CDS 113405 113494 . + 2 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "17"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 74 | 1 protein_coding exon 114631 114680 . + . gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "18"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; exon_id "ENSGALE00000307389"; 75 | 1 protein_coding CDS 114631 114677 . + 2 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "18"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; protein_id "ENSGALP00000019313"; 76 | 1 protein_coding stop_codon 114678 114680 . + 0 gene_id "ENSGALG00000011854"; transcript_id "ENSGALT00000019339"; exon_number "18"; gene_name "UBN2"; gene_biotype "protein_coding"; transcript_name "UBN2-201"; 77 | 1 protein_coding exon 123889 123999 . + . gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "1"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; exon_id "ENSGALE00000295599"; 78 | 1 protein_coding exon 124324 124872 . + . gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "2"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; exon_id "ENSGALE00000128271"; 79 | 1 protein_coding CDS 124744 124872 . + 0 gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "2"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; protein_id "ENSGALP00000019317"; 80 | 1 protein_coding start_codon 124744 124746 . + 0 gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "2"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; 81 | 1 protein_coding exon 124965 125213 . + . gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "3"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; exon_id "ENSGALE00000128270"; 82 | 1 protein_coding CDS 124965 125156 . + 0 gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "3"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; protein_id "ENSGALP00000019317"; 83 | 1 protein_coding stop_codon 125157 125159 . + 0 gene_id "ENSGALG00000011856"; transcript_id "ENSGALT00000019343"; exon_number "3"; gene_name "C7ORF55"; gene_biotype "protein_coding"; transcript_name "C7ORF55-201"; 84 | 1 protein_coding exon 128066 128393 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "1"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000288455"; 85 | 1 protein_coding CDS 128333 128393 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "1"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 86 | 1 protein_coding start_codon 128333 128335 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "1"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; 87 | 1 protein_coding exon 136408 136502 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "2"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000195481"; 88 | 1 protein_coding CDS 136408 136502 . + 2 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "2"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 89 | 1 protein_coding exon 145684 145782 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "3"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128274"; 90 | 1 protein_coding CDS 145684 145782 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "3"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 91 | 1 protein_coding exon 146627 146737 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "4"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128279"; 92 | 1 protein_coding CDS 146627 146737 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "4"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 93 | 1 protein_coding exon 147215 147358 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "5"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128280"; 94 | 1 protein_coding CDS 147215 147358 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "5"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 95 | 1 protein_coding exon 148372 148548 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "6"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128275"; 96 | 1 protein_coding CDS 148372 148548 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "6"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 97 | 1 protein_coding exon 150722 150813 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "7"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128281"; 98 | 1 protein_coding CDS 150722 150813 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "7"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 99 | 1 protein_coding exon 151683 151712 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "8"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000195480"; 100 | 1 protein_coding CDS 151683 151712 . + 1 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "8"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 101 | 1 protein_coding exon 152519 152713 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "9"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128277"; 102 | 1 protein_coding CDS 152519 152713 . + 1 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "9"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 103 | 1 protein_coding exon 158405 159323 . + . gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "10"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; exon_id "ENSGALE00000128282"; 104 | 1 protein_coding CDS 158405 158594 . + 1 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "10"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; protein_id "ENSGALP00000019318"; 105 | 1 protein_coding stop_codon 158595 158597 . + 0 gene_id "ENSGALG00000011857"; transcript_id "ENSGALT00000019344"; exon_number "10"; gene_name "LUC7L2"; gene_biotype "protein_coding"; transcript_name "LUC7L2-201"; 106 | 1 protein_coding exon 167819 167913 . - . gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "1"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; exon_id "ENSGALE00000248984"; 107 | 1 protein_coding CDS 167819 167913 . - 0 gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "1"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; protein_id "ENSGALP00000019321"; 108 | 1 protein_coding start_codon 167911 167913 . - 0 gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "1"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; 109 | 1 protein_coding exon 165545 165776 . - . gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "2"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; exon_id "ENSGALE00000128296"; 110 | 1 protein_coding CDS 165545 165776 . - 1 gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "2"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; protein_id "ENSGALP00000019321"; 111 | 1 protein_coding exon 163981 164109 . - . gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "3"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; exon_id "ENSGALE00000128297"; 112 | 1 protein_coding CDS 163984 164109 . - 0 gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "3"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; protein_id "ENSGALP00000019321"; 113 | 1 protein_coding stop_codon 163981 163983 . - 0 gene_id "ENSGALG00000011859"; transcript_id "ENSGALT00000019347"; exon_number "3"; gene_name "GBE"; gene_biotype "protein_coding"; transcript_name "GBE-201"; 114 | -------------------------------------------------------------------------------- /docker/Docker.s3: -------------------------------------------------------------------------------- 1 | FROM nextflow/rnaseq-nf:latest 2 | 3 | RUN conda install -y awscli -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM continuumio/miniconda 2 | MAINTAINER Paolo Di Tommaso 3 | 4 | RUN apt-get -y install ttf-dejavu 5 | 6 | COPY conda.yml . 7 | RUN \ 8 | conda env update -n root -f conda.yml \ 9 | && conda clean -a 10 | -------------------------------------------------------------------------------- /docker/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | cp ../conda.yml . 3 | docker build -t nextflow/rnaseq-nf:latest . 4 | -------------------------------------------------------------------------------- /fun-library.nf: -------------------------------------------------------------------------------- 1 | def getInputForRnaseq( transcriptsPath, readsPath ) { 2 | 3 | def separateTranscriptFromReads = forkCriteria({ tuple -> 4 | trascript: tuple[0] 5 | reads: [ tuple[1], tuple[2] ] 6 | }) 7 | 8 | def reads = Channel.fromFilePairs(readsPath) 9 | Channel.fromPath(transcriptsPath) \ 10 | | combine( reads ) \ 11 | | fork(separateTranscriptFromReads) 12 | 13 | } -------------------------------------------------------------------------------- /main.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | 43 | transcriptome_file = file(params.transcriptome) 44 | multiqc_file = file(params.multiqc) 45 | 46 | 47 | Channel 48 | .fromFilePairs( params.reads, checkExists:true ) 49 | .into { read_pairs_ch; read_pairs2_ch } 50 | 51 | 52 | process index { 53 | tag "$transcriptome.simpleName" 54 | 55 | input: 56 | file transcriptome from transcriptome_file 57 | 58 | output: 59 | file 'index' into index_ch 60 | 61 | script: 62 | """ 63 | salmon index --threads $task.cpus -t $transcriptome -i index 64 | """ 65 | } 66 | 67 | 68 | process quant { 69 | tag "$pair_id" 70 | 71 | input: 72 | file index from index_ch 73 | set pair_id, file(reads) from read_pairs_ch 74 | 75 | output: 76 | file(pair_id) into quant_ch 77 | 78 | script: 79 | """ 80 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 81 | """ 82 | } 83 | 84 | process fastqc { 85 | tag "FASTQC on $sample_id" 86 | publishDir params.outdir 87 | 88 | input: 89 | set sample_id, file(reads) from read_pairs2_ch 90 | 91 | output: 92 | file("fastqc_${sample_id}_logs") into fastqc_ch 93 | 94 | 95 | script: 96 | """ 97 | mkdir fastqc_${sample_id}_logs 98 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 99 | """ 100 | } 101 | 102 | 103 | process multiqc { 104 | publishDir params.outdir, mode:'copy' 105 | 106 | input: 107 | file('data*/*') from quant_ch.mix(fastqc_ch).collect() 108 | file(config) from multiqc_file 109 | 110 | output: 111 | file('multiqc_report.html') optional true 112 | 113 | script: 114 | """ 115 | cp $config/* . 116 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 117 | multiqc -v . 118 | """ 119 | } 120 | 121 | workflow.onComplete { 122 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 123 | } 124 | -------------------------------------------------------------------------------- /main1.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | 43 | Channel 44 | .fromFilePairs( params.reads, checkExists:true ) 45 | .into { read_pairs_ch; read_pairs2_ch } 46 | 47 | 48 | process index { 49 | tag "$transcriptome.simpleName" 50 | 51 | input: 52 | path transcriptome from params.transcriptome 53 | 54 | output: 55 | path 'index' into index_ch 56 | 57 | script: 58 | """ 59 | salmon index --threads $task.cpus -t $transcriptome -i index 60 | """ 61 | } 62 | 63 | 64 | process quant { 65 | tag "$pair_id" 66 | 67 | input: 68 | path index from index_ch 69 | tuple pair_id, path(reads) from read_pairs_ch 70 | 71 | output: 72 | path pair_id into quant_ch 73 | 74 | script: 75 | """ 76 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 77 | """ 78 | } 79 | 80 | process fastqc { 81 | tag "FASTQC on $sample_id" 82 | publishDir params.outdir 83 | 84 | input: 85 | tuple sample_id, path(reads) from read_pairs2_ch 86 | 87 | output: 88 | path "fastqc_${sample_id}_logs" into fastqc_ch 89 | 90 | 91 | script: 92 | """ 93 | mkdir fastqc_${sample_id}_logs 94 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 95 | """ 96 | } 97 | 98 | 99 | process multiqc { 100 | publishDir params.outdir, mode:'copy' 101 | 102 | input: 103 | path 'data*/*' from quant_ch.mix(fastqc_ch).collect() 104 | path config from params.multiqc 105 | 106 | output: 107 | path 'multiqc_report.html' 108 | 109 | script: 110 | """ 111 | cp $config/* . 112 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 113 | multiqc -v . 114 | """ 115 | } 116 | 117 | workflow.onComplete { 118 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 119 | } 120 | -------------------------------------------------------------------------------- /main10.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcript1 = "$baseDir/data/ggal/transcriptome_1.fa" 31 | params.transcript2 = "$baseDir/data/ggal/transcriptome_2.fa" 32 | params.outdir = "results" 33 | params.multiqc = "$baseDir/multiqc" 34 | 35 | log.info """\ 36 | R N A S E Q - N F P I P E L I N E 37 | =================================== 38 | transcript1 : ${params.transcript1} 39 | transcript2 : ${params.transcript2} 40 | reads : ${params.reads} 41 | outdir : ${params.outdir} 42 | """ 43 | 44 | include './rnaseq-analysis' params(params) 45 | 46 | workflow rnaseqForTranscrip1 { 47 | rnaseq_analysis ( 48 | params.transcript1, 49 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 50 | } 51 | 52 | workflow rnaseqForTranscrip2 { 53 | rnaseq_analysis ( 54 | params.transcript2, 55 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 56 | } 57 | 58 | workflow { 59 | rnaseqForTranscrip1() 60 | rnaseqForTranscrip2() 61 | } 62 | 63 | workflow.onComplete { 64 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 65 | } 66 | -------------------------------------------------------------------------------- /main11.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcript1 = "$baseDir/data/ggal/transcriptome_1.fa" 31 | params.transcript2 = "$baseDir/data/ggal/transcriptome_2.fa" 32 | params.outdir = "results" 33 | params.multiqc = "$baseDir/multiqc" 34 | 35 | log.info """\ 36 | R N A S E Q - N F P I P E L I N E 37 | =================================== 38 | transcript1 : ${params.transcript1} 39 | transcript2 : ${params.transcript2} 40 | reads : ${params.reads} 41 | outdir : ${params.outdir} 42 | """ 43 | 44 | include './rnaseq-analysis' params(params) 45 | 46 | 47 | workflow { 48 | reads = Channel .fromFilePairs( 'data/ggal/ggal_*_{1,2}.fq' ) 49 | transcripts = Channel.fromPath('data/ggal/transcriptome_*.fa') 50 | transcripts 51 | .combine( reads ) 52 | .fork { tuple -> 53 | trascript: tuple[0] 54 | reads: [ tuple[1], tuple[2] ] 55 | } 56 | .set { fork_out } 57 | 58 | rnaseq_analysis(fork_out) 59 | } 60 | 61 | workflow.onComplete { 62 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 63 | } 64 | -------------------------------------------------------------------------------- /main12.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcript1 = "$baseDir/data/ggal/transcriptome_1.fa" 31 | params.transcript2 = "$baseDir/data/ggal/transcriptome_2.fa" 32 | params.outdir = "results" 33 | params.multiqc = "$baseDir/multiqc" 34 | 35 | log.info """\ 36 | R N A S E Q - N F P I P E L I N E 37 | =================================== 38 | transcript1 : ${params.transcript1} 39 | transcript2 : ${params.transcript2} 40 | reads : ${params.reads} 41 | outdir : ${params.outdir} 42 | """ 43 | 44 | include './rnaseq-analysis' params(params) 45 | 46 | 47 | workflow { 48 | 49 | Channel .fromFilePairs( 'data/ggal/ggal_*_{1,2}.fq' ).set {reads} 50 | Channel.fromPath('data/ggal/transcriptome_*.fa') \ 51 | | combine( reads ) \ 52 | | fork { tuple -> 53 | trascript: tuple[0] 54 | reads: [ tuple[1], tuple[2] ] 55 | } \ 56 | | rnaseq_analysis 57 | 58 | 59 | } 60 | 61 | workflow.onComplete { 62 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 63 | } 64 | -------------------------------------------------------------------------------- /main13.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcript1 = "$baseDir/data/ggal/transcriptome_1.fa" 31 | params.transcript2 = "$baseDir/data/ggal/transcriptome_2.fa" 32 | params.outdir = "results" 33 | params.multiqc = "$baseDir/multiqc" 34 | 35 | log.info """\ 36 | R N A S E Q - N F P I P E L I N E 37 | =================================== 38 | transcript1 : ${params.transcript1} 39 | transcript2 : ${params.transcript2} 40 | reads : ${params.reads} 41 | outdir : ${params.outdir} 42 | """ 43 | 44 | include './rnaseq-analysis' params(params) 45 | 46 | 47 | 48 | workflow { 49 | 50 | separateTranscriptFromReads = forkCriteria({ tuple -> 51 | trascript: tuple[0] 52 | reads: [ tuple[1], tuple[2] ] 53 | }) 54 | 55 | Channel.fromFilePairs( 'data/ggal/ggal_*_{1,2}.fq' ).set {reads} 56 | Channel.fromPath('data/ggal/transcriptome_*.fa') \ 57 | | combine( reads ) \ 58 | | fork(separateTranscriptFromReads) \ 59 | | rnaseq_analysis 60 | 61 | } 62 | 63 | workflow.onComplete { 64 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 65 | } 66 | -------------------------------------------------------------------------------- /main14.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcripts = "$baseDir/data/ggal/transcriptome_*.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcript1 : ${params.transcript1} 38 | transcript2 : ${params.transcript2} 39 | reads : ${params.reads} 40 | outdir : ${params.outdir} 41 | """ 42 | 43 | include './rnaseq-analysis' params(params) 44 | 45 | 46 | def getInputForRnaseq( transcriptsPath, readsPath ) { 47 | 48 | def separateTranscriptFromReads = forkCriteria({ tuple -> 49 | trascript: tuple[0] 50 | reads: [ tuple[1], tuple[2] ] 51 | }) 52 | 53 | def reads = Channel.fromFilePairs(readsPath) 54 | Channel.fromPath(transcriptsPath) \ 55 | | combine( reads ) \ 56 | | fork(separateTranscriptFromReads) 57 | 58 | } 59 | 60 | workflow { 61 | getInputForRnaseq(params.transcripts, params.reads) | rnaseq_analysis 62 | } 63 | 64 | workflow.onComplete { 65 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 66 | } 67 | -------------------------------------------------------------------------------- /main15.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcripts = "$baseDir/data/ggal/transcriptome_*.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcript1 : ${params.transcript1} 38 | transcript2 : ${params.transcript2} 39 | reads : ${params.reads} 40 | outdir : ${params.outdir} 41 | """ 42 | 43 | include './rnaseq-analysis-2' params(params) 44 | include './fun-library' 45 | 46 | workflow { 47 | main: 48 | getInputForRnaseq(params.transcripts, params.reads) | rnaseq_analysis 49 | publish: 50 | rnaseq_analysis.out.fastqc to: 'results/fastqc_files' 51 | rnaseq_analysis.out.quant to: 'results/quant_files' 52 | rnaseq_analysis.out.multiqc to: 'results/multiqc_report' 53 | } 54 | 55 | workflow.onComplete { 56 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 57 | } 58 | -------------------------------------------------------------------------------- /main2.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | 43 | Channel 44 | .from( params.reads ) 45 | .into { read_pairs_ch; read_pairs2_ch } 46 | 47 | 48 | process index { 49 | tag "$transcriptome.simpleName" 50 | 51 | input: 52 | path transcriptome from params.transcriptome 53 | 54 | output: 55 | path 'index' into index_ch 56 | 57 | script: 58 | """ 59 | salmon index --threads $task.cpus -t $transcriptome -i index 60 | """ 61 | } 62 | 63 | 64 | process quant { 65 | tag "$pair_id" 66 | 67 | input: 68 | path index from index_ch 69 | tuple pair_id, path(reads) from read_pairs_ch 70 | 71 | output: 72 | path pair_id into quant_ch 73 | 74 | script: 75 | """ 76 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 77 | """ 78 | } 79 | 80 | process fastqc { 81 | tag "FASTQC on $sample_id" 82 | publishDir params.outdir 83 | 84 | input: 85 | tuple sample_id, path(reads) from read_pairs2_ch 86 | 87 | output: 88 | path "fastqc_${sample_id}_logs" into fastqc_ch 89 | 90 | 91 | script: 92 | """ 93 | mkdir fastqc_${sample_id}_logs 94 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 95 | """ 96 | } 97 | 98 | 99 | process multiqc { 100 | publishDir params.outdir, mode:'copy' 101 | 102 | input: 103 | path 'data*/*' from quant_ch.mix(fastqc_ch).collect() 104 | path config from params.multiqc 105 | 106 | output: 107 | path 'multiqc_report.html' 108 | 109 | script: 110 | """ 111 | cp $config/* . 112 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 113 | multiqc -v . 114 | """ 115 | } 116 | 117 | workflow.onComplete { 118 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 119 | } 120 | -------------------------------------------------------------------------------- /main3.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | 43 | Channel 44 | .fromFilePairs( params.reads, checkExists:true ) 45 | .set{ read_pairs_ch } 46 | 47 | 48 | process index { 49 | tag "$transcriptome.simpleName" 50 | 51 | input: 52 | path transcriptome 53 | 54 | output: 55 | path 'index' 56 | 57 | script: 58 | """ 59 | salmon index --threads $task.cpus -t $transcriptome -i index 60 | """ 61 | } 62 | 63 | 64 | process quant { 65 | tag "$pair_id" 66 | 67 | input: 68 | path index 69 | tuple pair_id, path(reads) 70 | 71 | output: 72 | path pair_id 73 | 74 | script: 75 | """ 76 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 77 | """ 78 | } 79 | 80 | process fastqc { 81 | tag "FASTQC on $sample_id" 82 | publishDir params.outdir 83 | 84 | input: 85 | tuple sample_id, path(reads) 86 | 87 | output: 88 | path "fastqc_${sample_id}_logs" 89 | 90 | 91 | script: 92 | """ 93 | mkdir fastqc_${sample_id}_logs 94 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 95 | """ 96 | } 97 | 98 | 99 | process multiqc { 100 | publishDir params.outdir, mode:'copy' 101 | 102 | input: 103 | path 'data*/*' 104 | path config 105 | 106 | output: 107 | path 'multiqc_report.html' 108 | 109 | script: 110 | """ 111 | cp $config/* . 112 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 113 | multiqc -v . 114 | """ 115 | } 116 | 117 | workflow { 118 | index(params.transcriptome) 119 | } 120 | 121 | workflow.onComplete { 122 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 123 | } 124 | -------------------------------------------------------------------------------- /main4.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | 43 | Channel 44 | .fromFilePairs( params.reads, checkExists:true ) 45 | .set{ read_pairs_ch } 46 | 47 | 48 | process index { 49 | tag "$transcriptome.simpleName" 50 | 51 | input: 52 | path transcriptome 53 | 54 | output: 55 | path 'index' 56 | 57 | script: 58 | """ 59 | salmon index --threads $task.cpus -t $transcriptome -i index 60 | """ 61 | } 62 | 63 | 64 | process quant { 65 | tag "$pair_id" 66 | 67 | input: 68 | path index 69 | tuple pair_id, path(reads) 70 | 71 | output: 72 | path pair_id 73 | 74 | script: 75 | """ 76 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 77 | """ 78 | } 79 | 80 | process fastqc { 81 | tag "FASTQC on $sample_id" 82 | publishDir params.outdir 83 | 84 | input: 85 | tuple sample_id, path(reads) 86 | 87 | output: 88 | path "fastqc_${sample_id}_logs" 89 | 90 | 91 | script: 92 | """ 93 | mkdir fastqc_${sample_id}_logs 94 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 95 | """ 96 | } 97 | 98 | 99 | process multiqc { 100 | publishDir params.outdir, mode:'copy' 101 | 102 | input: 103 | path 'data*/*' 104 | path config 105 | 106 | output: 107 | path 'multiqc_report.html' 108 | 109 | script: 110 | """ 111 | cp $config/* . 112 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 113 | multiqc -v . 114 | """ 115 | } 116 | 117 | workflow { 118 | index( params.transcriptome ) 119 | 120 | quant( index.out, read_pairs_ch ) 121 | 122 | fastqc( read_pairs_ch ) 123 | 124 | multiqc( 125 | quant.out.mix(fastqc.out).collect(), 126 | params.multiqc ) 127 | } 128 | 129 | workflow.onComplete { 130 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 131 | } 132 | -------------------------------------------------------------------------------- /main6.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | include './rnaseq-processes' params(params) 43 | 44 | Channel 45 | .fromFilePairs( params.reads, checkExists: true ) 46 | .set { read_pairs_ch } 47 | 48 | 49 | 50 | workflow { 51 | index( params.transcriptome ) 52 | 53 | quant( index.out, read_pairs_ch ) 54 | 55 | fastqc( read_pairs_ch ) 56 | 57 | multiqc( 58 | quant.out.mix(fastqc.out).collect(), 59 | params.multiqc ) 60 | } 61 | 62 | workflow.onComplete { 63 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 64 | } 65 | -------------------------------------------------------------------------------- /main7.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | include index from './rnaseq-processes' params(params) 43 | include quant from './rnaseq-processes' params(params) 44 | include fastqc from './rnaseq-processes' params(params) 45 | include multiqc from './rnaseq-processes' params(params) 46 | 47 | Channel 48 | .fromFilePairs( params.reads, checkExists: true ) 49 | .set { read_pairs_ch } 50 | 51 | 52 | 53 | workflow { 54 | index( params.transcriptome ) 55 | 56 | quant( index.out, read_pairs_ch ) 57 | 58 | fastqc( read_pairs_ch ) 59 | 60 | multiqc( 61 | quant.out.mix(fastqc.out).collect(), 62 | params.multiqc ) 63 | } 64 | 65 | workflow.onComplete { 66 | log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 67 | } 68 | -------------------------------------------------------------------------------- /main8.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | include './rnaseq-analysis' params(params) 43 | 44 | 45 | workflow { 46 | rnaseq_analysis ( 47 | params.transcriptome, 48 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 49 | } 50 | 51 | // workflow.onComplete { 52 | // log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 53 | // } 54 | -------------------------------------------------------------------------------- /main9.nf: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | 14 | /* 15 | * Proof of concept of a RNAseq pipeline implemented with Nextflow 16 | * 17 | * Authors: 18 | * - Paolo Di Tommaso 19 | * - Emilio Palumbo 20 | * - Evan Floden 21 | */ 22 | nextflow.preview.dsl=2 23 | 24 | /* 25 | * Default pipeline parameters. They can be overriden on the command line eg. 26 | * given `params.foo` specify on the run command line `--foo some_value`. 27 | */ 28 | 29 | params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" 30 | params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" 31 | params.outdir = "results" 32 | params.multiqc = "$baseDir/multiqc" 33 | 34 | log.info """\ 35 | R N A S E Q - N F P I P E L I N E 36 | =================================== 37 | transcriptome: ${params.transcriptome} 38 | reads : ${params.reads} 39 | outdir : ${params.outdir} 40 | """ 41 | 42 | include './rnaseq-analysis' params(params) 43 | 44 | workflow rnaseqForTranscrip1 { 45 | rnaseq_analysis ( 46 | params.transcriptome, 47 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 48 | } 49 | 50 | workflow rnaseqForTranscrip2 { 51 | rnaseq_analysis ( 52 | params.transcriptome, 53 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 54 | } 55 | 56 | workflow { 57 | rnaseq_analysis ( 58 | params.transcriptome, 59 | Channel .fromFilePairs( params.reads, checkExists: true ) ) 60 | } 61 | 62 | // workflow.onComplete { 63 | // log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) 64 | // } 65 | -------------------------------------------------------------------------------- /multiqc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextflow-io/nfcamp-tutorial/58914e235b715a63cc31a520b2d5028467a39adf/multiqc/logo.png -------------------------------------------------------------------------------- /multiqc/multiqc_config.yaml: -------------------------------------------------------------------------------- 1 | title: "Nextflow RNA-seq demo" 2 | subtitle: "A pipeline for quantification of genomic features from short read data" 3 | 4 | report_header_info: 5 | - Contact E-mail: 'paolo.ditommaso@gmail.com' 6 | - Application Type: 'RNA-seq' 7 | - Project Type: 'Nextflow demo' 8 | 9 | custom_logo_url: 'https://www.nextflow.io' 10 | custom_logo_title: 'Center for Genomic Regulation' 11 | 12 | -------------------------------------------------------------------------------- /nextflow.config: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | * This Source Code Form is "Incompatible With Secondary Licenses", as 9 | * defined by the Mozilla Public License, v. 2.0. 10 | * 11 | */ 12 | 13 | manifest { 14 | description = 'Proof of concept of a RNA-seq pipeline implemented with Nextflow' 15 | author = 'Paolo Di Tommaso' 16 | } 17 | 18 | /* 19 | * defines execution profiles for different environments 20 | */ 21 | 22 | profiles { 23 | standard { 24 | process.container = 'nextflow/rnaseq-nf:latest' 25 | } 26 | 27 | slurm { 28 | process.container = 'nextflow/rnaseq-nf:latest' 29 | process.executor = 'slurm' 30 | singularity.enabled = true 31 | } 32 | 33 | batch { 34 | params.reads = 's3://cbcrg-eu/ggal/lung_{1,2}.fq' 35 | params.transcriptome = 's3://cbcrg-eu/ggal/transcriptome.fa' 36 | 37 | workDir = 's3://cbcrg-eu/work' 38 | process.container = 'nextflow/rnaseq-nf:latest' 39 | process.executor = 'awsbatch' 40 | process.queue = 'demo' 41 | executor.awscli = '/home/ec2-user/miniconda/bin/aws' 42 | 43 | aws.region = 'eu-west-1' 44 | } 45 | 46 | gcp { 47 | workDir = 'gs://nf-demo/work' 48 | params.transcriptome = 'gs://nf-demo/rnaseq/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa' 49 | params.reads = 'gs://nf-demo/rnaseq/data/ggal/*_{1,2}.fq' 50 | params.multiqc = 'gs://nf-demo/rnaseq/multiqc' 51 | docker.enabled = true 52 | } 53 | 54 | conda { 55 | process.conda = "$baseDir/conda.yml" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /reads.yml: -------------------------------------------------------------------------------- 1 | reads: 2 | - - gut 3 | - ['/Users/pditommaso/Projects/nfcamp-tutorial/data/ggal/ggal_gut_1.fq', '/Users/pditommaso/Projects/nfcamp-tutorial/data/ggal/ggal_gut_2.fq' ] 4 | - - liver 5 | - ['/Users/pditommaso/Projects/nfcamp-tutorial/data/ggal/ggal_liver_1.fq', '/Users/pditommaso/Projects/nfcamp-tutorial/data/ggal/ggal_liver_2.fq' ] 6 | - - lung 7 | - ['/Users/pditommaso/Projects/nfcamp-tutorial/data/ggal/ggal_lung_1.fq', '/Users/pditommaso/Projects/nfcamp-tutorial/data/ggal/ggal_lung_2.fq' ] 8 | -------------------------------------------------------------------------------- /rnaseq-analysis-2.nf: -------------------------------------------------------------------------------- 1 | nextflow.preview.dsl=2 2 | 3 | include index from './rnaseq-processes-2' params(params) 4 | include quant from './rnaseq-processes-2' params(params) 5 | include fastqc from './rnaseq-processes-2' params(params) 6 | include multiqc from './rnaseq-processes-2' params(params) 7 | 8 | 9 | workflow rnaseq_analysis { 10 | get: 11 | transcriptome 12 | read_pairs_ch 13 | 14 | main: 15 | index( transcriptome ) 16 | 17 | quant( index.out, read_pairs_ch ) 18 | 19 | fastqc( read_pairs_ch ) 20 | 21 | multiqc( 22 | quant.out.mix(fastqc.out).collect(), 23 | params.multiqc ) 24 | 25 | emit: 26 | quant = quant.out 27 | fastqc = fastqc.out 28 | multiqc = multiqc.out 29 | } 30 | 31 | -------------------------------------------------------------------------------- /rnaseq-analysis.nf: -------------------------------------------------------------------------------- 1 | nextflow.preview.dsl=2 2 | 3 | include index from './rnaseq-processes' params(params) 4 | include quant from './rnaseq-processes' params(params) 5 | include fastqc from './rnaseq-processes' params(params) 6 | include multiqc from './rnaseq-processes' params(params) 7 | 8 | 9 | workflow rnaseq_analysis { 10 | get: 11 | transcriptome 12 | read_pairs_ch 13 | 14 | main: 15 | index( transcriptome ) 16 | 17 | quant( index.out, read_pairs_ch ) 18 | 19 | fastqc( read_pairs_ch ) 20 | 21 | multiqc( 22 | quant.out.mix(fastqc.out).collect(), 23 | params.multiqc ) 24 | } 25 | -------------------------------------------------------------------------------- /rnaseq-processes-2.nf: -------------------------------------------------------------------------------- 1 | process index { 2 | tag "$transcriptome.simpleName" 3 | 4 | input: 5 | path transcriptome 6 | 7 | output: 8 | path 'index' 9 | 10 | script: 11 | """ 12 | salmon index --threads $task.cpus -t $transcriptome -i index 13 | """ 14 | } 15 | 16 | 17 | process quant { 18 | tag "$pair_id" 19 | 20 | input: 21 | path index 22 | tuple pair_id, path(reads) 23 | 24 | output: 25 | path pair_id 26 | 27 | script: 28 | """ 29 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 30 | """ 31 | } 32 | 33 | process fastqc { 34 | tag "FASTQC on $sample_id" 35 | 36 | input: 37 | tuple sample_id, path(reads) 38 | 39 | output: 40 | path "fastqc_${sample_id}_logs" 41 | 42 | 43 | script: 44 | """ 45 | mkdir fastqc_${sample_id}_logs 46 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 47 | """ 48 | } 49 | 50 | 51 | process multiqc { 52 | errorStrategy 'ignore' 53 | input: 54 | path 'data*/*' 55 | path config 56 | 57 | output: 58 | path 'multiqc_report.html' 59 | 60 | script: 61 | """ 62 | cp $config/* . 63 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 64 | multiqc -v . 65 | """ 66 | } -------------------------------------------------------------------------------- /rnaseq-processes.nf: -------------------------------------------------------------------------------- 1 | process index { 2 | tag "$transcriptome.simpleName" 3 | 4 | input: 5 | path transcriptome 6 | 7 | output: 8 | path 'index' 9 | 10 | script: 11 | """ 12 | salmon index --threads $task.cpus -t $transcriptome -i index 13 | """ 14 | } 15 | 16 | 17 | process quant { 18 | tag "$pair_id" 19 | 20 | input: 21 | path index 22 | tuple pair_id, path(reads) 23 | 24 | output: 25 | path pair_id 26 | 27 | script: 28 | """ 29 | salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id 30 | """ 31 | } 32 | 33 | process fastqc { 34 | tag "FASTQC on $sample_id" 35 | publishDir params.outdir 36 | 37 | input: 38 | tuple sample_id, path(reads) 39 | 40 | output: 41 | path "fastqc_${sample_id}_logs" 42 | 43 | 44 | script: 45 | """ 46 | mkdir fastqc_${sample_id}_logs 47 | fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} 48 | """ 49 | } 50 | 51 | 52 | process multiqc { 53 | publishDir params.outdir, mode:'copy' 54 | errorStrategy 'ignore' 55 | input: 56 | path 'data*/*' 57 | path config 58 | 59 | output: 60 | path 'multiqc_report.html' 61 | 62 | script: 63 | """ 64 | cp $config/* . 65 | echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml 66 | multiqc -v . 67 | """ 68 | } --------------------------------------------------------------------------------