Dear Unix Gurus,
I have a sample data set that looks like this
y1 y2 y3 y4 y5
x1 0.3 0.5 2.3 3.1 5.1
x2 1.2 4.1 3.5 1.7 1.2
x3 3.1 2.1 1.0 4.1 2.1
x4 5.0 4.0 6.0 7.0 1.1
I want to open it up so that I get
x1 y1 0.3
x2 y1 1.2
x3 y1 3.1
x4 y1 5.0
x1 y2 0.5
x2 y2... (3 Replies)
I have a huge matrix file containing some 1.5 million rows and 6000 columns. The matrix looks something like this:
1 2 3
4 5 6
7 8 9
3 4 5
I want to add all the numbers in the columns of this matrix and display the result to my stdout. This means that the numbers in the first column are:
... (2 Replies)
Hi All,
I have a huge (and its really huge!) matrix about 400GB in size (2 million rows by 1.5 million columns) . I am trying to optimize its space by creating a sparse representation of it.
Miniature version of the matrix looks like this (matrix.mtx):
3.4543 65.7876 54.564
2.12344... (4 Replies)
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)
Dear Unixers,
I'm having some difficulty in converting an n x m data matrix into a dataset of 3 columns and nxm rows. As an example I want to convert this dataset
2 3 4 5
2 0.0 0.0 0.1 0.1
6 -0.3 2.0 0.0 0.3
7 -0.6 -1.1 0.5 0.3
9 -0.9 -4.1 -0.7 0.5
... (2 Replies)
How can i convert two columns in to o and 1 matrix. thnks
Input
a c1
b c2
c c1
d c3
e c4
output
c1 c2 c3 c4
a 1 0 0 0
b 0 1 0 0
c 1 0 0 0
d 0 0 ... (5 Replies)
The following code transform the matrix to columns. Is it possible to do it other way around ( get the input from the output) ?
input
y1 y2 y3 y4 y5
x1 0.3 0.5 2.3 3.1 5.1
x2 1.2 4.1 3.5 1.7 1.2
x3 3.1 2.1 1.0 4.1 2.1
x4 5.0 4.0 6.0 7.0 1.1
output
x1 y1 0.3
x2 y1 1.2
x3... (1 Reply)
Discussion started by: quincyjones
1 Replies
LEARN ABOUT DEBIAN
mcxconvert
mcx convert(1) USER COMMANDS mcx convert(1)
NAME
mcx convert - convert between mcx storage types
SYNOPSIS
mcx convert <matrix-file-in> <matrix-file-out>
mcx convert [--write-binary] --cone-to-stack <cat-file-in> <cat-file-out>
mcx convert [--write-binary] --stack-to-cone <cat-file-in> <cat-file-out>
mcxconvert is not in actual fact a program. This manual page documents the behaviour and options of the mcx program when invoked in mode
convert. The options -h, --apropos, --version, -set, --nop, -progress <num> are accessible in all mcx modes. They are described in the mcx
manual page.
mcx convert [--cone-to-stack (transform cone file to stack file)] [--stack-to-cone (transform stack file to cone file)] [--write-binary
(output native binary format)] [--cat (read and write cat format)] [-cat-max <num> (limit the stack conversion to <num> matrices)]
In the two-argument invocation without additional arguments, mcx convert converts from the format found in the first file to the other for-
mat, i.e. from native interchange to native binary format or the other way around. When querying with the -q option, mcx{convert} will out-
put a one-line synopsis describing the matrix in the argument. The --cone-to-stack and --stack-to-cone options convert between the two types
of concatenated output provided by mclcm.
DESCRIPTION
The mcl libraries make extensive use of matrices. Matrices are used to encode graphs, matrices and clusterings. They can be stored either
in interchange or in binary format. The latter is somewhat more efficient in storage and much faster in both reading and writing, but the
default is interchange format.
The mcl input routines recognize the type of storage they are dealing with. If you want to convert a matrix to the other storage type, sim-
ply specify the file name of the matrix you want to convert. mcx convert will recognize its type, and write the other type to the file
specified as the second argument.
OPTIONS
--cone-to-stack (transform cone file to stack file)
This option requires two trailing options, the names of respectively the source cone file and the target stack file.
--stack-to-cone (transform stack file to cone file)
This option requires two trailing options, the names of respectively the source stack file and the target cone file.
--cat (read and write cat format)
-cat-max <num> (limit the stack conversion to <num> matrices)
--write-binary (output native binary format)
This option is only useful with either of the options --cone-to-stack, --stack-to-cone, or --cat.
AUTHOR
Stijn van Dongen.
SEE ALSO
mcxio(5), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.
mcx convert 12-068 8 Mar 2012 mcx convert(1)