# Main See the NOTICE file distributed with this work for additional information regarding copyright ownership. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. REPEAT ANNOTATION PIPELINE This workflow performs comprehensive repeat annotation on genome assemblies using RepeatModeler for library generation and RepeatMasker/DustMasker/TRF for repeat identification. Pipeline Stages: 1. FETCH_GENOME - Download genome assemblies from NCBI 2. FETCH_REPEAT_MODEL - Check for existing RepeatModeler libraries 3a. GENERATE_REPEATMODELER_LIBRARY - Generate de novo libraries for genomes without existing ones 3b. CHECK_AND_DOWNLOAD_RMLIBRARY - Download pre-computed libraries when available 4. RUN_REPEATMASKER - Identify and mask repeats using combined libraries 5. RUN_RED - Identify repetitive regions using RED 6. RUN_DUST - Identify repetitive regions using DUST 7. RUN_TRF - Identify repetitive regions using TRF 8. UPLOAD_REPEATS_INTO_FTP - Upload RepeatModeler libraries and RepeatMasker results to Ensembl FTP server 9. COLLECT_SOFTWARE_VERSIONS - Collect software versions from all processes and merge them into a single file Input: CSV file with columns: species_name, GCA_accession Output: - Downloaded genome assemblies - RepeatModeler libraries (generated or downloaded) - RepeatMasker annotation results (masked sequences, GTF files, statistics) MAIN WORKFLOW ENTRY WORKFLOW ## Overview This workflow invokes **7** modules. ## Modules | Order | Module | |------:|--------| | 1 | `RUN_REPEATMASKER` | | 2 | `RUN_RED` | | 3 | `RUN_DUST` | | 4 | `RUN_TRF` | | 5 | `UPLOAD_REPEATS_INTO_FTP` | | 6 | `COLLECT_SOFTWARE_VERSIONS` | | 7 | `REPEAT_ANNOTATION` | ## Workflow Diagram ```mermaid flowchart TD RUN_REPEATMASKER[RUN_REPEATMASKER] RUN_RED[RUN_RED] RUN_REPEATMASKER --> RUN_RED RUN_DUST[RUN_DUST] RUN_RED --> RUN_DUST RUN_TRF[RUN_TRF] RUN_DUST --> RUN_TRF UPLOAD_REPEATS_INTO_FTP[UPLOAD_REPEATS_INTO_FTP] RUN_TRF --> UPLOAD_REPEATS_INTO_FTP COLLECT_SOFTWARE_VERSIONS[COLLECT_SOFTWARE_VERSIONS] UPLOAD_REPEATS_INTO_FTP --> COLLECT_SOFTWARE_VERSIONS REPEAT_ANNOTATION[REPEAT_ANNOTATION] COLLECT_SOFTWARE_VERSIONS --> REPEAT_ANNOTATION ``` ## Source `/home/runner/work/ensembl-genes-nf/ensembl-genes-nf/pipelines/repeat/main.nf`