User Tools

Site Tools


jvs:fscan:manual:chapter2:table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jvs:fscan:manual:chapter2:table [2014/01/24 22:27]
voyvodic [Table -- Manipulate data tables]
jvs:fscan:manual:chapter2:table [2023/02/23 18:43] (current)
Line 3: Line 3:
 ===== Table -- Manipulate data tables ===== ===== Table -- Manipulate data tables =====
 **usage:**\\ **usage:**\\
-  * **-table [file] TABLENAME [FLAG] FILENAME**\\ 
   * **-table [show]**\\   * **-table [show]**\\
-  * **-table [show] TABLENAME [FLAG][FILENAME]**\\ 
-  * **-table query TABLENAME [FLAG] NEWNAME COL [VALUE1] [VALUE2]**\\ 
-  * **-table delete TABLENAME [FLAG] [COL] [VALUE1] [VALUE2]**\\ 
   * **-table TABLENAME**\\   * **-table TABLENAME**\\
-  * **-table [reference] TABLENAME [FLAG] REFNAME**\\ +  * **[[jvs:fscan:manual:chapter2:tablefile|-table [file] TABLENAME [FLAG] FILENAME]]**\\ 
-  * **-table [glossary] TABLENAME [FLAG] GLOSSARYNAME**\\ +  * **[[jvs:fscan:manual:chapter2:tableshow|-table [show] TABLENAME [FLAG] [ROW] [NROWS] [FILENAME] ]]**\\ 
-  * **-table dataset TABLENAME [FLAG]**\\ +  * **[[jvs:fscan:manual:chapter2:tableset|-table set TABLENAME VALUE COL [ROW] [NROWS] ]]**\\ 
-  * **-table window TABLENAME [FLAG]**\\ +  * **[[jvs:fscan:manual:chapter2:tablequery|-table query TABLENAME [FLAG] NEWNAME COL [VALUE1] [VALUE2] ]]**\\ 
-  * **-table directory TBLNAME [FLAG] DIRNAME [MATCHSTRING [TBL2NAME]]**\\ +  * **[[jvs:fscan:manual:chapter2:tabledelete|-table delete TABLENAME [FLAG] [COL] [VALUE1] [VALUE2] ]]**\\ 
-  * **-table configure TBLNAME [FLAG] COLNAME [TYPE] [COLNUM] [COLNAME [TYPE] [COLNUM]] ...**\\ +  * **[[jvs:fscan:manual:chapter2:tableref|-table [reference] TABLENAME [FLAG] REFNAME]]**\\ 
-  * **-table copy TBLNAME [FLAG] NEWNAME [nrows NROWS] ]**\\ +  * **[[jvs:fscan:manual:chapter2:tableglossary|-table [glossary] TABLENAME [FLAG] GLOSSARYNAME]]**\\ 
-  * **-table sort TBLNAME FLAG SORTCOL**\\ +  * **[[jvs:fscan:manual:chapter2:tabledataset|-table dataset TABLENAME [FLAG] ]]**\\ 
-  * **-table merge TBLNAME FLAG TBL2NAME MERGECOL**\\ +  * **[[jvs:fscan:manual:chapter2:tablewindow|-table window TABLENAME [FLAG] ]]**\\ 
-  * **-table printf TBLNAME FLAG FORMATSTR [OUTFILE]**\\ +  * **[[jvs:fscan:manual:chapter2:tabledir|-table directory TBLNAME [FLAG] DIRNAME [MATCHSTRING[TBL2NAME]]**\\ 
-  * **-table invivo TBLNAME FLAG NAME**\\+  * **[[jvs:fscan:manual:chapter2:tableconfig|-table configure TBLNAME [FLAG] COLNAME [TYPE] [COLNUM] ... [COLNAME TYPE COLNUM] ]]**\\ 
 +  * **[[jvs:fscan:manual:chapter2:tablecopy|-table copy TBLNAME [FLAG] NEWNAME [nrows NROWS]]**\\ 
 +  * **[[jvs:fscan:manual:chapter2:tablesort|-table sort TBLNAME FLAG SORTCOL]]**\\ 
 +  * **[[jvs:fscan:manual:chapter2:tablemerge|-table merge TBLNAME FLAG TBL2NAME MERGECOL]]**\\ 
 +  * **[[jvs:fscan:manual:chapter2:tableprintf|-table printf TBLNAME FLAG FORMATSTR [OUTFILE] ]]**\\ 
 +  * **[[jvs:fscan:manual:chapter2:tablecmd|-table command TBLNAME FLAG [PATH] CMD [DATACOL] [CMDCOL] [ARGCOL] ]]**\\ 
 +  * **[[jvs:fscan:manual:chapter2:invivo|-table invivo TBLNAME FLAG NAME]]**\\
  
 The TABLE command is used for loading, querying, and displaying tables. Tables are multi-column data sets where each column can contain either text strings or number values. Tables can be loaded from text files, or by extracting information from different internal data lists (e.g. data set names, window names, reference time course condition names, glossary names). When loading tables, the type of data source can be identified explicitly using the first argument (e.g. file, reference, glossary, dataset, window) or implicitly using the FILENAME/REFNAME/GLOSSARYNAME argument (if the argument is unrecognized, "file" is assumed).  The TABLE command is used for loading, querying, and displaying tables. Tables are multi-column data sets where each column can contain either text strings or number values. Tables can be loaded from text files, or by extracting information from different internal data lists (e.g. data set names, window names, reference time course condition names, glossary names). When loading tables, the type of data source can be identified explicitly using the first argument (e.g. file, reference, glossary, dataset, window) or implicitly using the FILENAME/REFNAME/GLOSSARYNAME argument (if the argument is unrecognized, "file" is assumed). 
Line 66: Line 68:
   * 040 - tab separated columns   * 040 - tab separated columns
   * 0100 - only show up to 10 rows of data   * 0100 - only show up to 10 rows of data
-  * 0200 - show no data, only header +  * 0200 - replace missing values with '0' 
-  * 0400 - show row sorting index if available+  * 0400 - show no data, only header 
 +  * 01000 - show row sorting index if available
 ====Configuring a table==== ====Configuring a table====
 The CONFIGURE option can be used to re-configure an existing table (or create a new empty table). It is intended for adding column names, adding whole columns, moving existing columns, or removing columns. Columns to be modified are specified as triplets of "name type colnum" (of these only the name is required). Multiple column specifications can be combined in a single command. The CONFIGURE option can be used to re-configure an existing table (or create a new empty table). It is intended for adding column names, adding whole columns, moving existing columns, or removing columns. Columns to be modified are specified as triplets of "name type colnum" (of these only the name is required). Multiple column specifications can be combined in a single command.
Line 93: Line 96:
  
 ====Performing a table query==== ====Performing a table query====
-Query+ **Usage:** -table query TBLNAME FLAG NEWNAME COL [VALUE1] [VALUE2]\\ 
 + 
 +NEWNAME is where to store the results if FLAG & 3, or if NEWNAME is not a column name in TBLNAME.
  
 COL can be a column index number (1-NCols) or a column name. COL can be a column index number (1-NCols) or a column name.
 +(To find column index from column name, use FLAG 16.)
  
-ROW can be a row index (1-NRows) to select a particular cell within COL, or it can be a value to search for in COL (FLAG 8: find rows NOT matching; FLAG 16: only 1st match is found).+VALUE1 is the value to search for in COL, or if FLAG&4 VALUE1 is the index number (1-NRows) of the row to return. Note: you can also find the value for a single table cell using the syntax "$tblname(col,row)" where COL and ROW indices, 1-NCols and 1-NRows, respectively.\\ 
 +If VALUE1 is omitted and !FLAG&24, all of COL is returned.
  
-If searching (FLAG&4)then the single value in COL2 of the matched row will be returned if COL2 is specified, or the whole row will be returned if COL2 is omitted. +VALUE2: if FLAG&64VALUE2 is a binary mask value ANDed with COL values before comparison to VALUE1; otherwise VALUE2 is the column number whose value(s) should be returned when COL matches VALUE1. If VALUE2 is omitted and !FLAG&24, whole matching rows are returned. 
-If not searching, then the single value at COL,ROW will be returned if ROW is specifiedor the whole column will be returned if ROW is omitted.+
  
-FLAG:\\+FLAG: Option flags (combine by adding):\\
  * 1 - store into uservarb NEWNAME\\  * 1 - store into uservarb NEWNAME\\
  * 2 - store into table NEWNAME\\  * 2 - store into table NEWNAME\\
- * 4 - search for value ROW in COL (assumed if ROW is not a number)\\ + * 4 - VALUE1 is a row number\\ 
- * 8 - find rows where value in COL is **not** ROW\\ + * 8 - only return row number(s)\\ 
- * 16 - only return the first match\\ + * 16 - only return column number\\ 
- 32 - don't display error message on query failure\\+ * 32 - only find first instance\\ 
 + * 64 - VALUE2 is a binary mask to use for COL value\\ 
 + * 128 - inverse query; search for COL values that don'match; this is automatic if VALUE1 is preceded by '!'\\ 
 + 256 - don't display error message on query failure\\ 
 + * 512 - find COL with missing value (assumed if VALUE1 = 'NULL')\\ 
 + * 1024 - do not convert 'NULL' in VALUE1 to missing value\\ 
 +====Deleting a table or table entries==== 
 + **Usage:** -table delete TBLNAME FLAG COL [VALUE1] [VALUE2] 
 + 
 +If TBLNAME is the only argument, the entire table will be deleted. 
 + 
 +With other arguments this will perform a QUERY as described above and only delete those rows that satisfy the query.
  
 +FLAG: Option flags (combine by adding):\\
 + * 4 - VALUE1 is a row number\\
 + * 32 - only delete first instance\\
 + * 64 - VALUE2 is a binary mask to use for COL value\\
 + * 128 - inverse query; search for COL values that don't match; this is automatic if VALUE1 is preceded by '!'\\
 + * 256 - don't display error message on query failure\\
 + * 512 - find COL with missing value (assumed if VALUE1 = 'NULL')\\
 + * 1024 - do not convert 'NULL' in VALUE1 to missing value\\
 ====Sorting a table==== ====Sorting a table====
 Sort FLAG:\\ Sort FLAG:\\
jvs/fscan/manual/chapter2/table.1390602424.txt.gz · Last modified: 2014/08/04 16:03 (external edit)