Scale Matrix
Apply a user-specified scaling factor to tab-delimited matrix data
This tool typically applies a scaling factor () calculated from ScriptManager's Scaling Factor tool to a CDT/TAB file (), usually from Tag Pileup.
File input (CDT/TAB)
This script does not restrict selection of file inputs because a variety of file extensions may be parsed out for the tab-delimited (numeric) matrix. The tool supports bulk selection and processing of files.
Scaling Factor
File-specific Scaling
If you have multiple files that need to be scaled by different scaling factors (e.g. TagPileup outputs derived from different BAM files), the File-specific scaling method is more convenient to use.
Copy-pasting inputs
You can use the copy and paste features to handle bulk processing of the file-specific scaling. You may consider using Microsoft Excel/Google sheets to organize filenames and scaling factors (you can copy scaling factors output by the Scaling Factor GUI) and paste them into ScriptManager's Scale Matrix GUI using Ctrl-V.
For MacOS users: Make sure you are using the "Control" key and not the Apple "Command" keys.
The input files must be loaded with the file selection tool. The input file column does not support pasting or but can be copied into another application.
Uniform Scaling
If you have multiple files that all need to be scaled by the same value (e.g. TagPileup outputs derived from the same BAM file), the Uniform scaling methood is more convenient to use. When this option is selected, the "Uniform scaling factor" option can be selected while the "Scaling Factor" column is disregarded in the execution of the script.
Select Starting Row/Column
These integers indicate the last header columns or row labels. By default they are set to follow CDT format specifications but can be adjusted if you have some other tab-delimited file format with different header starts.
Output
Each scaled matrix file is written with the _SCALE.cdt suffix appended. For example, SomeMatrixFile.cdt would be scaled and written to SomeMatrixFile_SCALE.cdt.
Output GZip
Toggling this allows the user to write output to a compressed file format using a general compression (gzip) which has the added advantage of speeding up the execution time by shrinking the I/O load (esp for large output). The .gz extension will be appended as appropriate.
Command Line Interface
Usage:
java -jar ScriptManager.jar read-analysis scale-matrix [-hV] [-l=<startCOL>]
[-o=<output>] [-r=<startROW>] [-s=<scale>] <matrix>
Positional Input
This tool takes a single matrix file for input.
Output Options
| Option | Description |
|---|---|
-o, --output=<output> | specify output filename |
-z, --gzip | gzip output (default=false) |
Scale Options
| Option | Description |
|---|---|
-s, --scaling-factor | scaling factor (default=1) |
Coord Start Options
| Option | Description |
|---|---|
-r, --start-row | row to start scaling the matrix (zero indexed) |
-l, --start-col | column to start scaling the matrix (zero indexed) |