Provided by: murasaki-common_1.68.6-13build3_all bug

NAME

       filter.pl - filters output from murasaki based on various filters

SYNOPSIS

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

OPTIONS

        Filtering options:
       Filtering can be performed on "length", "hits", "tfidf", or "score".
       You can filter by either setting either a "min" or "max".
       For example: "--minlength 50" filters out any anchors with an average
       length shorter than 50. (average length is used 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.
       For example: "--minscore=2x" sets the minimum score threshold to
       twice the average score. "--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:
        "--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>"

        "--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

       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).