# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "remove_redundancy"
description: Remove inter-family (whole families) and/or intra-family (sequence) redundancies through similarity analysis, family merging, and sequence clustering
keywords:
  - filtering
  - redundancy
  - inter-family
  - intra-family
  - clustering
  - merging
  - similarity
  - families
  - sequences
components:
  - extract_family_reps
  - find/concatenate
  - hmmer/hmmsearch
  - identify_redundant_fams
  - merge_families
  - filter_non_redundant_fams
  - mmseqs_fasta_cluster
  - remove_redundant_seqs
  - align_sequences
  - hhsuite/reformat
input:
  - sequences:
      type: file
      description: Input sequences file that might be used for any merged-family re-generation
  - seed_msa:
      type: file
      description: |
        Seed MSA files along with their meta IDs and chunk number
  - full_msa:
      type: file
      description: |
        Full MSA files along with their meta IDs and chunk number
  - fasta:
      type: file
      description: |
        FASTA files along with their meta IDs and chunk number
  - hmm:
      type: file
      description: |
        HMM files along with their meta IDs and chunk number
  - skip_family_redundancy_removal:
      type: boolean
      description: |
        Skip family-level redundancy removal step
  - skip_family_merging:
      type: boolean
      description: |
        Skip merging of similar families
  - hmmsearch_family_redundancy_length_threshold:
      type: number
      description: |
        Length threshold for hmmsearch family redundancy detection (between 0.0 and 1.0)
      minimum: 0.0
      maximum: 1.0
  - hmmsearch_family_similarity_length_threshold:
      type: number
      description: |
        Length threshold for hmmsearch family similarity detection (between 0.0 and 1.0)
        which should be lower than hmmsearch_family_redundancy_length_threshold
      minimum: 0.0
      maximum: 1.0
  - skip_sequence_redundancy_removal:
      type: boolean
      description: |
        Skip sequence-level redundancy removal using strict clustering
  - clustering_tool:
      type: string
      description: |
        Tool to use for sequence clustering
      enum: ["linclust", "cluster"]
  - alignment_tool:
      type: string
      description: |
        Tool to use for multiple sequence alignment
      enum: ["famsa", "mafft"]
  - skip_msa_trimming:
      type: boolean
      description: |
        Skip trimming of multiple sequence alignments with ClipKIT
  - clipkit_out_format:
      type: string
      description: |
        Output format for ClipKIT trimming tool
      default: "clipkit"
  - hmmsearch_write_target:
      type: boolean
      description: |
        Write target sequences in hmmsearch output
  - hmmsearch_write_domain:
      type: boolean
      description: |
        Write domain information in hmmsearch output
  - skip_additional_sequence_recruiting:
      type: boolean
      description: |
        Skip additional sequence recruiting step during merged family rebuilding
  - hmmsearch_query_length_threshold:
      type: number
      description: |
        Query length threshold for hmmsearch during merged family additional sequence recruiting (between 0.0 and 1.0)
      minimum: 0.0
      maximum: 1.0
output:
  - versions:
      type: file
      description: |
        Versions file containing the software versions used in the workflow.
  - fasta:
      type: file
      description: |
        Redundancy-filtered FASTA files after family and/or sequence redundancy removal
authors:
  - "@vagkaratzas"
maintainers:
  - "@vagkaratzas"
