HiCExplorer
HiCExplorer copied to clipboard
How to list several chromosomes in hicConvertFormat
Hi,
My .cool file contains chrM. For down stream analysis, I need to exclude this.
I tried
hicConvertFormat -m s2_1000000.cool --inputFormat cool --outputFormat cool -o s2_1000000woM.cool --chromosome '1', '2', '3', '4', '5', '6', '7', 'X', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '20', 'Y', '19', '22', '21'
but won't work.
From the cool to cool section, it seems multiple chromosome listing seems acceptable. chromosomes: Define a list of chromosomes which should be included in the output matrix. All chromosomes which are not defined are not part of the new matrix. This parameter can speed up the processing especially if only one chromosome is used.
I get this error. hicConvertFormat: error: unrecognized arguments: 2, 3, 4, 5, 6, 7, X, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, Y, 19, 22, 21
Only one chromosome works.
My versions are as follows.
hicInfo 3.7.2 Python 3.9.7
I installed using conda.
Best regards, Hiroyuki
Please don't use a comma but space separated list, for example:
hicConvertFormat -m s2_1000000.cool --inputFormat cool --outputFormat cool -o s2_1000000woM.cool --chromosome 1 2
Oh, and also hicAdjustMatrix
is the correct tool for this. hicConvertFormat
is to convert file formats, but not intended for file manipulations.