FILTER(1)

πŸ’– FILTER(1) πŸ’–

welcome to the FILTER(1) page bestie, straight out of the User Contributed Perl Documentation shelf 🫢 this one lives in section 1 and it's about a little script called filter.pl and honestly it eats πŸ’…


✨ NAME ✨

filter.pl β€” filters output from murasaki based on various filters 🌸

like, that's the whole vibe. murasaki spits stuff out, filter.pl decides what stays. periodt.


🌈 SYNOPSIS 🌈

filter.pl [options] <detailed murasaki ailgnment file> [output file]

(yes it says ailgnment, we don't fix it, we respect it πŸ’€)


πŸ‘‘ OPTIONS πŸ‘‘

πŸ” Filtering options

you can filter on length, hits, tfidf, or score ✨ and you filter by setting either a min or a max πŸ’…

  • fr fr example: --minlength 50 filters out any anchors with an average length shorter than 50. and why average length? because an anchor may be different sizes on different sequences 🧚
  • filters can also use the average(x), standard deviation(s), variance(v), or anchor count(a) in an expression to set a filter 🌈
  • so like, --minscore=2x sets the minimum score threshold to twice the average score. and --minlength=x+s/2 sets the minimum length threshold to the average length plus half a standard deviation πŸ’«

πŸ› οΈ Input modification

  • --widen=500 β€” extends each anchor 500 bases in both directions 🌸
  • --randomwiden=500 β€” extends each anchor 500 bases at random (ie: to compare to --widen) πŸ™ˆ

πŸ“€ Output options

  • --statdump β€” dump all available stats into 1 file with a header row πŸ‘‘
  • --dumpstats tfidf,length β€” dumps stats tfidf and length to separate files, one line per anchor πŸ“
  • --dumpstats β€” assumes --dumpstats all ✨

πŸ“ˆ Plot options

filter.pl can plot any or all of the statistics gathered by using the --plot option πŸŽ€

examples, bestie:

  • --plot hits,length β€” plots both hits and length
  • --plot β€” assumes --plot all

--plotopts allows setting of various gnuplot and special plot options πŸ’… different statistics can be targeted separately by prefixing the setting name with the statistic(s) of your choice followed by a .

for example:

  • --plotopts hits,length.flatx β€” disables the log scale on the x axis of the hits and length plots only
  • --plotopts with=points β€” uses points instead of bars on all plots
  • --plotopts <gnuplot option>=<value> β€” can be used to set arbitrary gnuplot options of the form set <gnuplot option> <value>

more plot knobs, no cap:

  • --bins β€” can be used to specify the number of bins πŸ“
  • --nobins β€” turns off binning and plots a raw (likely bumpy) histogram 😭
  • --showall=crop β€” sends all data to gnuplot even on logscale plots (by default for logscale plots values <=1 at the extreme right end are chopped off because they don't show up in gnuplot (1 is the baseline) but they do affect the visible range, and thus causes some scrunching) 😀
  • --showall=scale β€” manually sets to the X and Y ranges to the range of the data (so 1's are visibly different from 0's) πŸ‘€
  • --showall=<anything else> β€” disables scaling/cropping πŸ’€

also the Gnuplot commands for generating the plots are also dumped to <something>.<stat-type>.plot and can be run interactively in gnuplot by typing:

load "<something>.<stat-type>.plot"

πŸ“Š Statistical Options

  • --all/--quick β€” standard deviation calculations require a second pass through the data, and as histogram plots are generally much more useful than a standard deviation statistic (especially considering not all of these statistics may be gaussian), so unless one of your constraints calls for standard deviation, this calculation is skipped. It can be forced by applying --all. (--quick is the default) 🫢
  • --nodetails β€” disables reconstruction of term indicies (this will disable tfidf stats) πŸ™ˆ
  • --tags β€” enables reading of annotation. This produces "good, miss, shuffle" stats (which can also be plotted) and specificity/sensitivity information 🌈
  • --notags β€” disables reading of annotation (by default) πŸ’€

🧬 COG/KOG Statistics

at any rate:

  • --kogfile=path/to/kog β€” enables kog-based alignment πŸ”₯
  • --kogmap 3=hsa β€” forces sequence 3 (note: sequences are 0 indexed) to be assigned to the "hsa" kog. If the file name includes one of the kog species abbreviations, it is assumed to belong to that kog 🧚

πŸ› Debugging

  • --linear β€” forces linear scans for CDS's instead of binary searches (if this returns different results, it means something is very wrong) 😭

πŸ“ [output file]

if the input filename is of the form <something>.anchors.details, then the [output file] defaults to <something>.filtered ✨

incidentally, if you don't provide a <something>.anchors.details file, it probably won't work anyway... πŸ’€

🌸 DESCRIPTION 🌸

Filters murasaki alignments based on various statistics. Various statistics can be plotted using --plot. Annotation data is processed from input files using BioPerl πŸ’–

ROC data can be calculated using KOG data (which is much more reliable than just gene names). To do so you need to specify a KOG data file which can be downloaded from the COG database at:

http://www.ncbi.nlm.nih.gov/COG/

You'll be looking for either the "whog" file for COGs or the "kog" file on the KOG side. KOG locus naming sometimes differs from GBK file to file, and locus names are sometimes missing, so KOG based assessment is currently best effort (capitalization is ignored, locii which don't appear in the annotation are ignored, and domain-specific _x endings are ignored) πŸ™ˆ


that's the whole page bestie, you ate it πŸ‘‘ this was perl v5.40.1, dated 2026-08-12 β€” go filter some anchors, ily πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from