name: "gffread"
version: "add_sgdemux"
authors:
- name: "Emma Rousseau"
  roles:
  - "author"
  - "maintainer"
  info:
    links:
      email: "emma@data-intuitive.com"
      github: "emmarousseau"
      linkedin: "emmarousseau1"
    organizations:
    - name: "Data Intuitive"
      href: "https://www.data-intuitive.com"
      role: "Bioinformatician"
argument_groups:
- name: "Inputs"
  arguments:
  - type: "file"
    name: "--input"
    description: "A reference file in either the GFF3, GFF2 or GTF format.\n"
    info: null
    example:
    - "annotation.gff"
    must_exist: true
    create_parent: true
    required: true
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--chr_mapping"
    alternatives:
    - "-m"
    description: "<chr_replace> is a name mapping table for converting reference sequence\
      \ names, \nhaving this 2-column format: <original_ref_ID> <new_ref_ID>.\n"
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--seq_info"
    alternatives:
    - "-s"
    description: "<seq_info.fsize> is a tab-delimited file providing this info for\
      \ each of the mapped \nsequences: <seq-name> <seq-length> <seq-description>\
      \ (useful for --description option with \nmRNA/EST/protein mappings).\n"
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--genome"
    alternatives:
    - "-g"
    description: "Full path to a multi-fasta file with the genomic sequences for all\
      \ input mappings, \nOR a directory with single-fasta files (one per genomic\
      \ sequence, with file names \nmatching sequence names).\n"
    info: null
    example:
    - "genome.fa"
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
- name: "Outputs"
  arguments:
  - type: "file"
    name: "--outfile"
    alternatives:
    - "-o"
    description: "Write the output records into <outfile>.\n"
    info: null
    example:
    - "output.gff"
    must_exist: true
    create_parent: true
    required: true
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--force_exons"
    description: "Make sure that the lowest level GFF features are considered \"exon\"\
      \ features.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--gene2exon"
    description: "For single-line genes not parenting any transcripts, add an exon\
      \ feature spanning \nthe entire gene (treat it as a transcript).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--t_adopt"
    description: "Try to find a parent gene overlapping/containing a transcript that\
      \ does not have \nany explicit gene Parent.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--decode"
    alternatives:
    - "-D"
    description: "Decode url encoded characters within attributes.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--merge_exons"
    alternatives:
    - "-Z"
    description: "Merge very close exons into a single exon (when intron size<4).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--junctions"
    alternatives:
    - "-j"
    description: "Output the junctions and the corresponding transcripts.\n"
    info: null
    direction: "input"
  - type: "file"
    name: "--spliced_exons"
    alternatives:
    - "-w"
    description: "Write a fasta file with spliced exons for each transcript.\n"
    info: null
    example:
    - "exons.fa"
    must_exist: false
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "integer"
    name: "--w_add"
    description: "For the --spliced_exons option, extract additional <N> bases both\
      \ upstream and \ndownstream of the transcript boundaries.\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--w_nocds"
    description: "For --spliced_exons, disable the output of CDS info in the FASTA\
      \ file.\n"
    info: null
    direction: "input"
  - type: "file"
    name: "--spliced_cds"
    alternatives:
    - "-x"
    description: "Write a fasta file with spliced CDS for each GFF transcript.\n"
    info: null
    example:
    - "cds.fa"
    must_exist: false
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--tr_cds"
    alternatives:
    - "-y"
    description: "Write a protein fasta file with the translation of CDS for each\
      \ record.\n"
    info: null
    example:
    - "tr_cds.fa"
    must_exist: false
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--w_coords"
    alternatives:
    - "-W"
    description: "For --spliced_exons, --spliced_cds and -tr_cds options, write in\
      \ the FASTA defline \nall the exon coordinates projected onto the spliced sequence.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--stop_dot"
    alternatives:
    - "-S"
    description: "For --tr_cds option, use '*' instead of '.' as stop codon translation.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--id_version"
    alternatives:
    - "-L"
    description: "Ensembl GTF to GFF3 conversion, adds version to IDs.\n"
    info: null
    direction: "input"
  - type: "string"
    name: "--trackname"
    alternatives:
    - "-t"
    description: "Use <trackname> in the 2nd column of each GFF/GTF output line.\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--gtf_output"
    alternatives:
    - "-T"
    description: "Main output will be GTF instead of GFF3.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--bed"
    description: "Output records in BED format instead of default GFF3.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--tlf"
    description: "Output \"transcript line format\" which is like GFF but with exons\
      \ and CDS related \nfeatures stored as GFF attributes in the transcript feature\
      \ line, like this:\n  exoncount=N;exons=<exons>;CDSphase=<N>;CDS=<CDScoords>\n\
      <exons> is a comma-delimited list of exon_start-exon_end coordinates;\n<CDScoords>\
      \ is CDS_start:CDS_end coordinates or a list like <exons>.\n"
    info: null
    direction: "input"
  - type: "string"
    name: "--table"
    description: "Output a simple tab delimited format instead of GFF, with columns\
      \ having the values \nof GFF attributes given in <attrlist>; special pseudo-attributes\
      \ (prefixed by @) are \nrecognized:\n  @id, @geneid, @chr, @start, @end, @strand,\
      \ @numexons, @exons, @cds, @covlen, @cdslen\nIf any of --spliced_exons/--tr_cds/--spliced_cds\
      \ FASTA output files are enabled, the \nsame fields (excluding @id) are appended\
      \ to the definition line of corresponding FASTA\nrecords.\n"
    info: null
    required: false
    direction: "input"
    multiple: true
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--expose_dups"
    alternatives:
    - "-E"
    - "-v"
    description: "Expose (warn about) duplicate transcript IDs and other potential\
      \ problems with the \ngiven GFF/GTF records.\n"
    info: null
    direction: "input"
- name: "Options"
  arguments:
  - type: "file"
    name: "--ids"
    description: "Discard records/transcripts if their IDs are not listed in <IDs.lst>.\n"
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--nids"
    description: "Discard records/transcripts if their IDs are listed in <IDs.lst>.\n"
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "integer"
    name: "--maxintron"
    alternatives:
    - "-i"
    description: "Discard transcripts having an intron larger than <maxintron>.\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "integer"
    name: "--minlen"
    alternatives:
    - "-l"
    description: "Discard transcripts shorter than <minlen> bases.\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "string"
    name: "--range"
    alternatives:
    - "-r"
    description: "Only show transcripts overlapping coordinate range <start>..<end>\
      \ (on chromosome/contig \n<chr>, strand <strand> if provided).\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--strict_range"
    alternatives:
    - "-R"
    description: "For --range option, discard all transcripts that are not fully contained\
      \ within the given \nrange.\n"
    info: null
    direction: "input"
  - type: "string"
    name: "--jmatch"
    description: "Only output transcripts matching the given junction.\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--no_single_exon"
    alternatives:
    - "-U"
    description: "Discard single-exon transcripts.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--coding"
    alternatives:
    - "-C"
    description: "Coding only: discard mRNAs that have no CDS features.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--nc"
    description: "Non-coding only: discard mRNAs that have CDS features.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--ignore_locus"
    description: "Discard locus features and attributes found in the input.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--description"
    alternatives:
    - "-A"
    description: "Use the description field from <seq_info.fsize> and add it as the\
      \ value for a 'descr' \nattribute to the GFF record.\n"
    info: null
    direction: "input"
- name: "Sorting"
  arguments:
  - type: "boolean_true"
    name: "--sort_alpha"
    description: "Chromosomes (reference sequences) are sorted alphabetically.\n"
    info: null
    direction: "input"
  - type: "file"
    name: "--sort_by"
    description: "Sort the reference sequences by the order in which their names are\
      \ given in the \n<refseq.lst> file.\n"
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
- name: "Misc options"
  arguments:
  - type: "boolean_true"
    name: "--keep_attrs"
    alternatives:
    - "-F"
    description: "Keep all GFF attributes (for non-exon features).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--keep_exon_attrs"
    description: "For -F option, do not attempt to reduce redundant exon/CDS attributes.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--no_exon_attrs"
    alternatives:
    - "-G"
    description: "Do not keep exon attributes, move them to the transcript feature\
      \ (for GFF3 output).\n"
    info: null
    direction: "input"
  - type: "string"
    name: "--attrs"
    description: "Only output the GTF/GFF attributes listed in <attr-list> which is\
      \ a comma delimited \nlist of attribute names to.\n"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--keep_genes"
    description: "In transcript-only mode (default), also preserve gene records.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--keep_comments"
    description: "For GFF3 input/output, try to preserve comments.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--process_other"
    alternatives:
    - "-O"
    description: "process other non-transcript GFF records (by default non-transcript\
      \ records are ignored).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--rm_stop_codons"
    alternatives:
    - "-V"
    description: "Discard any mRNAs with CDS having in-frame stop codons (requires\
      \ --genome).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--adj_cds_start"
    alternatives:
    - "-H"
    description: "For --rm_stop_codons option, check and adjust the starting CDS phase\
      \ if the original phase\nleads to a translation with an in-frame stop codon.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--opposite_strand"
    alternatives:
    - "-B"
    description: "For -V option, single-exon transcripts are also checked on the opposite\
      \ strand (requires \n--genome).  \n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--coding_status"
    alternatives:
    - "-P"
    description: "Add transcript level GFF attributes about the coding status of each\
      \ transcript, including \npartialness or in-frame stop codons (requires --genome).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--add_hasCDS"
    description: "Add a \"hasCDS\" attribute with value \"true\" for transcripts that\
      \ have CDS features. \n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--adj_stop"
    description: "Stop codon adjustment: enables --coding_status and performs automatic\
      \ adjustment of the CDS stop \ncoordinate if premature or downstream.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--rm_noncanon"
    alternatives:
    - "-N"
    description: "Discard multi-exon mRNAs that have any intron with a non-canonical\
      \ splice site consensus \n(i.e. not GT-AG, GC-AG or AT-AC).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--complete_cds"
    alternatives:
    - "-J"
    description: "Discard any mRNAs that either lack initial START codon or the terminal\
      \ STOP codon, or \nhave an in-frame stop codon (i.e. only print mRNAs with a\
      \ complete CDS).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--no_pseudo"
    description: "Filter out records matching the 'pseudo' keyword.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--in_bed"
    description: "Input should be parsed as BED format (automatic if the input filename\
      \ ends with .bed*).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--in_tlf"
    description: "Input GFF-like one-line-per-transcript format without exon/CDS features\
      \ (see --tlf option \nbelow); automatic if the input filename ends with .tlf).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--stream"
    description: "Fast processing of input GFF/BED transcripts as they are received\
      \ (no sorting, exons must \nbe grouped by transcript in the input data).\n"
    info: null
    direction: "input"
- name: "Clustering"
  arguments:
  - type: "boolean_true"
    name: "--merge"
    alternatives:
    - "-M"
    description: "Cluster the input transcripts into loci, discarding \"redundant\"\
      \ transcripts (those with \nthe same exact introns and fully contained or equal\
      \ boundaries).\n"
    info: null
    direction: "input"
  - type: "file"
    name: "--dupinfo"
    alternatives:
    - "-d"
    description: "For --merge option, write duplication info to file <dupinfo>.\n"
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--cluster_only"
    description: "Same as --merge but without discarding any of the \"duplicate\"\
      \ transcripts, only create \n\"locus\" features.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--rm_redundant"
    alternatives:
    - "-K"
    description: "For --merge option: also discard as redundant the shorter, fully\
      \ contained transcripts (intron \nchains matching a part of the container).\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--no_boundary"
    alternatives:
    - "-Q"
    description: "For --merge option, no longer require boundary containment when\
      \ assessing redundancy (can be \ncombined with --rm_redundant); only introns\
      \ have to match for multi-exon transcripts, and >=80%\noverlap for single-exon\
      \ transcripts.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--no_overlap"
    alternatives:
    - "-Y"
    description: "For --merge option, enforce --no_boundary but also discard overlapping\
      \ single-exon transcripts,\neven on the opposite strand (can be combined with\
      \ --rm_redudant).\n"
    info: null
    direction: "input"
resources:
- type: "bash_script"
  path: "script.sh"
  is_executable: true
description: "Validate, filter, convert and perform various other operations on GFF\
  \ files."
test_resources:
- type: "bash_script"
  path: "test.sh"
  is_executable: true
- type: "file"
  path: "test_data"
info: null
status: "enabled"
requirements:
  commands:
  - "ps"
keywords:
- "gff"
- "conversion"
- "validation"
- "filtering"
license: "MIT"
references:
  doi:
  - "10.12688/f1000research.23297.2"
links:
  repository: "https://github.com/gpertea/gffread"
  homepage: "https://ccb.jhu.edu/software/stringtie/gff.shtml#gffread"
  documentation: "https://ccb.jhu.edu/software/stringtie/gff.shtml#gffread"
runners:
- type: "executable"
  id: "executable"
  docker_setup_strategy: "ifneedbepullelsecachedbuild"
- type: "nextflow"
  id: "nextflow"
  directives:
    tag: "$id"
  auto:
    simplifyInput: true
    simplifyOutput: false
    transcript: false
    publish: false
  config:
    labels:
      mem1gb: "memory = 1000000000.B"
      mem2gb: "memory = 2000000000.B"
      mem5gb: "memory = 5000000000.B"
      mem10gb: "memory = 10000000000.B"
      mem20gb: "memory = 20000000000.B"
      mem50gb: "memory = 50000000000.B"
      mem100gb: "memory = 100000000000.B"
      mem200gb: "memory = 200000000000.B"
      mem500gb: "memory = 500000000000.B"
      mem1tb: "memory = 1000000000000.B"
      mem2tb: "memory = 2000000000000.B"
      mem5tb: "memory = 5000000000000.B"
      mem10tb: "memory = 10000000000000.B"
      mem20tb: "memory = 20000000000000.B"
      mem50tb: "memory = 50000000000000.B"
      mem100tb: "memory = 100000000000000.B"
      mem200tb: "memory = 200000000000000.B"
      mem500tb: "memory = 500000000000000.B"
      mem1gib: "memory = 1073741824.B"
      mem2gib: "memory = 2147483648.B"
      mem4gib: "memory = 4294967296.B"
      mem8gib: "memory = 8589934592.B"
      mem16gib: "memory = 17179869184.B"
      mem32gib: "memory = 34359738368.B"
      mem64gib: "memory = 68719476736.B"
      mem128gib: "memory = 137438953472.B"
      mem256gib: "memory = 274877906944.B"
      mem512gib: "memory = 549755813888.B"
      mem1tib: "memory = 1099511627776.B"
      mem2tib: "memory = 2199023255552.B"
      mem4tib: "memory = 4398046511104.B"
      mem8tib: "memory = 8796093022208.B"
      mem16tib: "memory = 17592186044416.B"
      mem32tib: "memory = 35184372088832.B"
      mem64tib: "memory = 70368744177664.B"
      mem128tib: "memory = 140737488355328.B"
      mem256tib: "memory = 281474976710656.B"
      mem512tib: "memory = 562949953421312.B"
      cpu1: "cpus = 1"
      cpu2: "cpus = 2"
      cpu5: "cpus = 5"
      cpu10: "cpus = 10"
      cpu20: "cpus = 20"
      cpu50: "cpus = 50"
      cpu100: "cpus = 100"
      cpu200: "cpus = 200"
      cpu500: "cpus = 500"
      cpu1000: "cpus = 1000"
  debug: false
  container: "docker"
engines:
- type: "docker"
  id: "docker"
  image: "quay.io/biocontainers/gffread:0.12.7--hdcf5f25_3"
  target_registry: "images.viash-hub.com"
  target_tag: "add_sgdemux"
  namespace_separator: "/"
  setup:
  - type: "docker"
    run:
    - "echo \"gffread: \\\"$(gffread --version 2>&1)\\\"\" > /var/software_versions.txt\n"
  entrypoint: []
  cmd: null
- type: "native"
  id: "native"
build_info:
  config: "src/gffread/config.vsh.yaml"
  runner: "executable"
  engine: "docker|native"
  output: "target/executable/gffread"
  executable: "target/executable/gffread/gffread"
  viash_version: "0.9.0"
  git_commit: "402ad6a813c0d0b141bbf8f9a3aab9c270a74812"
  git_remote: "https://x-access-token:ghs_VWGBwCOTHxXRJ07uVE94xFn8UJ2FmS0FLhmc@github.com/viash-hub/biobox"
  git_tag: "v0.2.0-27-g402ad6a"
package_config:
  name: "biobox"
  version: "add_sgdemux"
  description: "A collection of bioinformatics tools for working with sequence data.\n"
  info: null
  viash_version: "0.9.0"
  source: "src"
  target: "target"
  config_mods:
  - ".requirements.commands := ['ps']\n"
  - ".engines += { type: \"native\" }"
  - ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
  - ".engines[.type == 'docker'].target_tag := 'add_sgdemux'"
  keywords:
  - "bioinformatics"
  - "modules"
  - "sequencing"
  license: "MIT"
  organization: "vsh"
  links:
    repository: "https://github.com/viash-hub/biobox"
    issue_tracker: "https://github.com/viash-hub/biobox/issues"
