GT-SELECT(1)
π 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 sametarget_id, keep only the feature with the best score. If-targetstrandis 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 fromAND|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 namedfilterand must returnfalse, indicating that the node survived the filtering process. like, it literally has to be calledfilter, 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
- ubuntu resolute: genometools 1.6.6+ds-2
- ubuntu stonking: genometools 1.6.6+ds-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms