Skip to content

4.8.2 smORF filter

Function

smorf_filter filters candidate ORFs generated by smorf_scanner.

It can filter ORFs by start codon, peptide length, ORF category, antisense status, primary/secondary priority, completeness, and Kozak-context evidence. Kozak scoring can use annotated ORFs, built-in models, an external PWM, or aligned Kozak-context sequences.

Input files

Input Required Description
Scanner message table Yes, except with --list-builtin-kozak *.message.txt generated by smorf_scanner.
Custom Kozak PWM Required only for --kozak-mode pwm External PWM matrix file.
Kozak sequence file Required only for --kozak-mode sequence Aligned Kozak-context sequences used to build a PWM.

Parameters

Parameter Required Description
-i, --input Yes Input ORF message table generated by smorf_scanner. Required unless --list-builtin-kozak is used.
-o, --out-prefix Yes Prefix of output files. Default: ORF.filtered.
-s, --keep-start-codons No Comma-separated start codons retained in the output. Default: ATG,CTG,GTG,TTG.
-m, --min-aa No Minimum ORF peptide length to keep. Default: 8.
-M, --max-aa No Maximum ORF peptide length to keep. Default: 10000.
-c, --keep-categories No Comma-separated ORF categories retained before filtering. Default: Multiple smORF categories.
-r, --remove-categories No Comma-separated ORF categories removed before filtering. Default: same_frame_iORF,antisense_ORF.
-A, --keep-antisense No Keep antisense ORFs. Without this option, sense ORFs are required. Default: False.
-S, --keep-secondary No Keep secondary or lower-priority overlapping ORFs. Without this option, primary ORFs are required. Default: False.
-P, --keep-partial No Keep incomplete ORFs without a complete start-stop structure. Default: False.
-k, --kozak-mode No Kozak model source: none, annotated, builtin, pwm, or sequence. Default: annotated.
-b, --builtin-kozak No Built-in Kozak PWM used when --kozak-mode builtin. Default: plant.
-p, --kozak-pwm Conditional Custom Kozak PWM matrix file. Required when --kozak-mode pwm.
-q, --kozak-seq Conditional Aligned Kozak sequence file. Required when --kozak-mode sequence.
-C, --annotated-categories No ORF categories used to build an annotated ORF Kozak PWM. Default: annotated_ORF.
-n, --min-annotated-kozak No Minimum number of annotated Kozak sequences required to build an annotated PWM. Default: 100.
-B, --fallback-builtin-kozak No Built-in Kozak PWM used when annotated PWM construction fails. Default: plant.
-F, --no-kozak-fallback No Disable fallback to built-in PWM if annotated PWM construction fails. Default: False.
-w, --min-kozak-pwm-score No Minimum normalized Kozak PWM score required to pass. Default: 0.0.
-e, --export-kozak-pwm No Export the loaded or constructed Kozak PWM to this file.
-L, --list-builtin-kozak No List available built-in Kozak PWM models and exit. Default: False.

Output files

Assuming -o smorf.filtered, the command writes:

Output Description
smorf.filtered.passed.message.txt ORFs that passed all filters. This is the main input for smorf_evidence.
smorf.filtered.removed.message.txt ORFs removed by filtering.
smorf.filtered.all.message.txt All input ORFs with added filtering/Kozak fields.
Custom PWM output Optional file produced by --export-kozak-pwm.

Examples

Use the default annotated Kozak mode

smorf_filter \
  -i smorf.raw.message.txt \
  -o smorf.filtered \
  -s ATG,CTG,GTG,TTG \
  -m 8 \
  -M 1000 \
  -k annotated \
  -C annotated_ORF \
  -n 100

Use a built-in Kozak model

smorf_filter \
  -i smorf.raw.message.txt \
  -o smorf.filtered.plant \
  -k builtin \
  -b plant \
  -w 0.2

List built-in Kozak models

smorf_filter --list-builtin-kozak

Notes

  • --kozak-mode annotated builds a species-specific PWM from categories specified by --annotated-categories.
  • If there are not enough annotated ORFs to build a PWM, the command falls back to --fallback-builtin-kozak unless --no-kozak-fallback is used.
  • The default --remove-categories removes same_frame_iORF and antisense_ORF. Use --keep-antisense if antisense candidates should be retained.
  • The output file is named *.removed.message.txt, not *.failed.message.txt.