Sponsored Content
Top Forums Shell Programming and Scripting Awk: conversion of matrix formats Post 302781523 by dietmar13 on Saturday 16th of March 2013 09:08:36 PM
Old 03-16-2013
@Don Cragun and @RudiC

The task is solved, my downstream application works and I have learned a lot about programing awk...

thank you!

dietmar
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

need help-matrix inverse (awk)

I have few days to complete my awk homework. But I'm stucked. i hope some1 will help me out. I have to inverse n x n matrix, but I have problems with finding the determinant of the matrix. I found the algoritm, how to find a determinant of n x n matrix:... (0 Replies)
Discussion started by: vesyyr
0 Replies

2. Shell Programming and Scripting

matrix inverse (awk)

I need to inverse a matrix given in a file. The problem is I'm stuck with writing determinant finding algoritm into code. I found this algoritm about finding determinant of nxn matrix. This is what i need: Matrices and Determinants and here: a11 a12 a13 a21 a22 a23 a31 a32 a33... (0 Replies)
Discussion started by: vesyyr
0 Replies

3. Shell Programming and Scripting

awk matrix problem

hi there I'm very new in programing and i've started with awk. I'm processing 200 data files and I need to do some precessing on them. The files have 3 columns with N-lines for each line a have on the first and second value is the same for all the files and only the third is variable. like... (2 Replies)
Discussion started by: philstar
2 Replies

4. Shell Programming and Scripting

awk? adjacency matrix to adjacency list / correlation matrix to list

Hi everyone I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
Discussion started by: stonemonkey
5 Replies

5. UNIX for Dummies Questions & Answers

tab-separated file to matrix conversion

hello all, i have an input file like that A A X0 A B X1 A C X2 ... A Z Xx B A X1 B B X3 .... Z A Xx Z B X4 and i want to have an output like that A B C D A X0 X1 X2 Xy B X1 X3 X4 (4 Replies)
Discussion started by: TheTransporter
4 Replies

6. Shell Programming and Scripting

Summing up a matrix using awk

Hi there, If anyone can help me sorting out this small task would be great. Given a matrix like the following: 100 3 3 3 3 3 ... 200 5 5 5 5 5 ... 400 1 1 1 1 1 ... 500 8 8 8 8 8 ... 900 0 0 0 0... (5 Replies)
Discussion started by: JRodrigoF
5 Replies

7. Shell Programming and Scripting

conversion: 3 columns into matrix

Hi guys, here https://www.unix.com/shell-programming-scripting/193043-3-column-csv-correlation-matrix-awk-perl.html I found awk script converting awk '{ OFS = ";" if (t) { if (l != $1) t = t OFS $1 } else t = OFS $1 x = x ? x OFS $NF : $NF l = $1 }... (2 Replies)
Discussion started by: grincz
2 Replies

8. Shell Programming and Scripting

how to rearrange a matrix with awk

Hi, every one. I have two files ,one is in matrix like this, one is a list with the same data as the matrix. AB AE AC AD AA AF SA 3 4 5 6 4 6 SC 5 7 2 8 4 3 SD 4 6 5 3 8 3 SE 45 ... (5 Replies)
Discussion started by: xshang
5 Replies

9. Shell Programming and Scripting

Using awk to parse a file with mixed formats in columns

Greetings I have a file formatted like this: rhino grey weight=1003;height=231;class=heaviest;histology=9,0,0,8 bird white weight=23;height=88;class=light;histology=7,5,1,0,0 turtle green weight=40;height=9;class=light;histology=6,0,2,0... (2 Replies)
Discussion started by: Twinklefingers
2 Replies

10. Shell Programming and Scripting

How to sum the matrix using awk?

input A1 B1 A2 B2 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 Output label A1 B1 A2 B2 A1 2 1 1 2 B1 1 2 2 1 A2 1 2 3 2 B2 2 1 2 3 Ex: The number of times that A1 and B1 row values are both 1 should be printed as output. The last row of A1 and B1 in the input match by having 1 in both... (4 Replies)
Discussion started by: quincyjones
4 Replies
mcx clcf(1)							  USER COMMANDS 						       mcx clcf(1)

  NAME
      mcx clcf - compute the clustering coefficient of a graph

  SYNOPSIS
      mcx clcf [options] [matrix-file]

      mcxclcf  is not in actual fact a program. This manual page documents the behaviour and options of the mcx program when invoked in mode clcf.
      The options -h, --apropos, --version, -set, --nop, -progress <num> are accessible in all mcx modes. They are described  in  the  mcx  manual
      page.

      mcx clcf [-abc <fname> (specify label input)] [-imx <fname> (specify matrix input)] [-tab <fname> (use tab file)] [-o <fname> (write to this
      file)] [-t <int> (use <int> threads)] [-J <intJ> (a total of <intJ> jobs are used)] [-j <intj>  (this  job  has  index  <intj>)]	[--summary
      (return mean clustering coefficient)] [-h (print synopsis, exit)] [--apropos (print synopsis, exit)] [--version (print version, exit)]

  DESCRIPTION
      mcx clcf computes the clustering coefficient of a graph.

      The  input  graph/matrix,  if specified with the -imx option, has to be in mcl matrix/graph format. You can use label input instead by using
      the -abc option.	Refer to mcxio(5) for a description of these two input formats.  By default mcx diameter  reads  from  STDIN  and  expects
      matrix format.  To specify label input from STDIN use -abc -.

  OPTIONS
      -abc <fname> (label input)
	The file name for input that is in label format.

      -imx <fname> (input matrix)
	The file name for input. STDIN is assumed if not specified.

      -o <fname> (output file)
	The file name for output. STDOUT is the default output stream.

      -tab <fname> (use tab file)
	This  option causes the output to be printed with the labels found in the tab file.  With -abc this option will, additionally, construct a
	graph only on the labels found in the tab file.  If this option is used in conjunction with -imx the tab domain and the matrix domain  are
	required to be identical.

      --summary (return mean clustering coefficient)
	By  the  default a 1-column table (with row names included) is output, one row for each node. This option causes the output of the average
	clustering coefficient only.

      -t <int> (use <int> threads)
      -J <intJ> (a total of <intJ> jobs are used)
      -j <intj> (this job has index <intj>)
	Computing clustering coefficients is time-intensive for large graphs. If you have multiple CPUs available consider using as many  threads.
	Additionally  it  is possible to spread the computation over multiple jobs/machines. Conceptually, each job takes a number of threads from
	the total thread pool. If job control is used (the -J option is used) then the number of jobs should not exceed  the  number  of  threads.
	The  total number of threads divided by the total number of jobs defines the number of threads that will be used by the current job. Addi-
	tionally, the number of threads specified signifies the total added amount of all threads across all machines and must be the same for all
	jobs.  This  number is used by each job to infer its own set of tasks. The following set of options, if given to as many commands, defines
	three jobs, each running four threads.

	-t 12 -G 3 -g 0
	-t 12 -G 3 -g 1
	-t 12 -G 3 -g 2

  SEE ALSO
      mcxio(5), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

  mcx clcf 12-068						      8 Mar 2012							 mcx clcf(1)
All times are GMT -4. The time now is 03:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy