A fast implementation of a Cohen's d calculator.
You will need cargo installed.
cargo install --git https://github.com/MrHedmad/fast-cohen.git
You will need two .csv
files, each with the two sample groups.
The first row of each input file should be the column names.
The first column of each file should contain gene names (or generically any item name).
The rest of the columns should be the data, and the order of these does not matter.
The data should be numeric.
Then, simply call:
fast-cohen "control_samples" "case_samples" "output_csv"
You can use fast-cohen --help
to see the help message:
Calculate cohen's d of expression values.
Usage: fast-cohen [OPTIONS] <CASE_EXPRESSION_MATRIX> <CONTROL_EXPRESSION_MATRIX> <OUTPUT_PATH>
Arguments:
<CASE_EXPRESSION_MATRIX> Path to the expression matrix with the 'case' expression matrix
<CONTROL_EXPRESSION_MATRIX> Path to the expression matrix with the 'control' expression matrix
<OUTPUT_PATH> Path and filename of the output file
Options:
-d, --delimiter <DELIMITER> Delimiter of the input files [default: "\t"]
-h, --help
The output csv will have a row_names
column with the row names, and a cohen_d
column with the Cohen's d values.
NOTE: The order of the samples in the two input files MUST be the same between the two input files.
If you need to sort the rows, and the first column is the sample names, you can use xsv
to sort the columns with the following command:
xsv sort "some_file" > "sorted_file"