GT-SELECT(1)

πŸ“¦
version 1.6.6 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸŽ€ GT-SELECT πŸŽ€

okay bestie, so this is gt-select, and it lives in the GenomeTools Manual family πŸ’… it's the lil tool that goes through your GFF3 files and picks out exactly the features you asked for. no cap.


✨ NAME ✨

gt-select β€” select certain features (specified by the used options) from given GFF3 file(s). that's the whole vibe πŸ¦‹


🌈 SYNOPSIS 🌈

gt select [option ...] [GFF3_file ...]

πŸ’– DESCRIPTION πŸ’–

so basically here's every single knob you can turn, and there are a lot of them, and we're gonna go through every one because you deserve the full picture, queen πŸ‘‘

  • -retainids [yes|no] β€” when available, use the original IDs provided in the source file. heads up though: memory consumption is proportional to the input file size(s). (default: no)
  • -seqid [string] β€” select feature with the given sequence ID. oh and psst β€” all comments are selected. (default: undefined)
  • -source [string] β€” select feature with the given source (the source is column 2 in regular GFF3 lines). (default: undefined)
  • -contain [start end] β€” select all features which are contained in the given range. (default: undefined)
  • -overlap [start end] β€” select all features which do overlap with the given range. (default: undefined)
  • -strand [string] β€” select all top-level features (i.e., features without parents) whose strand equals the given one (must be one of +-.?). (default: undefined)
  • -targetstrand [string] β€” select all top-level features (i.e., features without parents) which have exactly one target attribute whose strand equals the given one (must be one of +-.?). (default: undefined)
  • -targetbest [yes|no] β€” if multiple top-level features (i.e., features without parents) with exactly one target attribute have the same target_id, keep only the feature with the best score. If -targetstrand is used at the same time, this option is applied after -targetstrand. Memory consumption is proportional to the input file size(s). (default: no)
  • -hascds [yes|no] β€” select all top-level features which do have a CDS child. (default: no)
  • -maxgenelength [value] β€” select genes up to the given maximum length. (default: undefined)
  • -maxgenenum [value] β€” select the first genes up to the given maximum number. (default: undefined)
  • -mingenescore [value] β€” select genes with the given minimum score. (default: undefined)
  • -maxgenescore [value] β€” select genes with the given maximum score. (default: undefined)
  • -minaveragessp [value] β€” set the minimum average splice site probability. (default: undefined)
  • -rule_files β€” specify Lua filter rule files to be used for selection (terminate list with --)
  • -rule_logic [...] β€” select how multiple Lua files should be combined, choose from AND|OR. (default: AND)
  • -dropped_file [filename] β€” save non-selected features to file. (default: undefined)
  • -v [yes|no] β€” be verbose. (default: no)
  • -o [filename] β€” redirect output to specified file. (default: undefined)
  • -gzip [yes|no] β€” write gzip compressed output file. (default: no)
  • -bzip2 [yes|no] β€” write bzip2 compressed output file. (default: no)
  • -force [yes|no] β€” force writing to output file. (default: no)
  • -help β€” display help and exit
  • -version β€” display version information and exit

🧚 File format for option -rule_files 🧚

okay so this is the fun part, this is where you get to make the rules 🫢

The files supplied to option -rule_files define a function for filtering by user given criteria (see example below):

function filter(gn)
  target = "exon"
  for curnode in gn:children() do
    if (curnode:get_type() == target) then
      return false
    end
  end
  return true
end

The above function iterates over all children of gn and checks whether there is a node of type exon. If there is such a node the function returns false, indicating that the parent node gn will not be sorted out.

NOTE: The function must be named filter and must return false, indicating that the node survived the filtering process. like, it literally has to be called filter, no renaming, that's the rule πŸ’€

πŸ”₯ REPORTING BUGS πŸ”₯

found a bug? don't suffer in silence bestie, Report bugs to <https://github.com/genometools/genometools/issues>. they wanna hear it fr fr πŸ›


and that's the whole page!! this was GenomeTools 1.6.6, dated 11/09/2025 ✨ go select some features and slay, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from