deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
231 stars 70 forks source link

How to list several chromosomes in hicConvertFormat #778

Open hiroyukikato911 opened 2 years ago

hiroyukikato911 commented 2 years ago

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

joachimwolff commented 2 years ago

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

joachimwolff commented 2 years ago

Oh, and also hicAdjustMatrix is the correct tool for this. hicConvertFormat is to convert file formats, but not intended for file manipulations.