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
233 stars 70 forks source link

Question about pc1 value #482

Closed mw18f closed 4 years ago

mw18f commented 4 years ago

Hi, I run hicPCA, but some of A/B compartment (based on pc1 value positive and negative) is totally flip compare with RNA peak data. Like for gene rich region, it should assign positive value, but results from hicPCA is negative value. Although I add --geneTrack when I run hicPCA, I don't think it used it. PS: there is no option for adding"[ --extraTrack EXTRATRACK] [--histonMarkType HISTONMARKTYPE] ". Thanks

LeilyR commented 4 years ago

This is how pca analysis is, it return the distance but the sign can be flipped, that is why we have options to correct sign for chip or gene tracks. Could you please tell us which version are you using and how you mean by genetrack is not being used? Do you get some error? If you are using a very old version there is no --extra track please use our current version.

mw18f commented 4 years ago

Here is the error: ERROR:hicmatrix.HiCMatrix:Index error Traceback (most recent call last): File "/home/miaowang/.local/lib/python3.6/site-packages/hicmatrix/HiCMatrix.py", line 261, in getRegionBinRange startbin = sorted(self.interval_trees[chrname][startpos:startpos + 1])[0].data IndexError: list index out of range Traceback (most recent call last): File "/home/miaowang/.local/bin/hicPCA", line 7, in main() File "/home/miaowang/.local/lib/python3.6/site-packages/hicexplorer/hicPCA.py", line 228, in main vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.geneTrack) File "/home/miaowang/.local/lib/python3.6/site-packages/hicexplorer/hicPCA.py", line 116, in correlateEigenvectorWithGeneTrack gene_occurrence[bin_id[1]] += 1 TypeError: 'NoneType' object is not subscriptable

So what GeneTrack Format it needs? how can I know which version I installed ? I installed it by pip3 install hicexplorer. Thanks

joachimwolff commented 4 years ago

We dropped pip support in April 2019. The newest version you can have is therefore the outdated version 2.2. Please use conda to install HiCExplorer 3.3.1 and try again.

mw18f notifications@github.com schrieb am Mi. 15. Jan. 2020 um 20:04:

Here is the error: ERROR:hicmatrix.HiCMatrix:Index error Traceback (most recent call last): File "/home/miaowang/.local/lib/python3.6/site-packages/hicmatrix/HiCMatrix.py", line 261, in getRegionBinRange startbin = sorted(self.interval_trees[chrname][startpos:startpos + 1])[0].data IndexError: list index out of range Traceback (most recent call last): File "/home/miaowang/.local/bin/hicPCA", line 7, in main() File "/home/miaowang/.local/lib/python3.6/site-packages/hicexplorer/hicPCA.py", line 228, in main vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.geneTrack) File "/home/miaowang/.local/lib/python3.6/site-packages/hicexplorer/hicPCA.py", line 116, in correlateEigenvectorWithGeneTrack gene_occurrence[bin_id[1]] += 1 TypeError: 'NoneType' object is not subscriptable

So what GeneTrack Format it needs? how can I know which version I installed ? I installed it by pip3 install hicexplorer. Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deeptools/HiCExplorer/issues/482?email_source=notifications&email_token=ADGQCAFVD3DK7OGATIQZBWLQ55M3TA5CNFSM4KHFPIMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBNJYY#issuecomment-574805219, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGQCACVP3NBXQBTIUCD2PDQ55M3TANCNFSM4KHFPIMA .

-- Joachim Wolff M.Sc. Computer Science Chair for Bioinformatics Department of Computer Science Albert-Ludwigs-University Freiburg Georges-Koehler-Allee 079 D-79110 Freiburg

http://www.bioinf.uni-freiburg.de

LeilyR commented 4 years ago

gene tracks are bed files, the program checks for the number of genes falling into each bin of the matrix. If you have a broad histone mark data such as H3K36me3 I would recommend you to use that instead.

mw18f commented 4 years ago

Thanks. I have H3K4me3 peak file, but I installed hicexplorer using conda, "conda install hicexplorer -c bioconda -c conda-forge", the version still is 2.2.

joachimwolff commented 4 years ago

Please install HiCExplorer in its own conda environment to prevent any possible conflicts with global installed versions:

conda create --name hicexplorer3.3 hicexplorer=3.3.1 python=3.6 -c conda-forge -c bioconda conda activate hicexplorer3.3 And test again if the version is now the correct one.

What can help is also to remove any pip version of hicexplorer: pip uninstall hicexplorer and repeat this until no more version is found on your system. Best, Joachim

Joachim Wolff M.Sc. Computer Science Bioinformatics Lab Department of Computer Science Albert-Ludwigs-University Freiburg Georges-Koehler-Allee 079 D-79110 Freiburg

http://www.bioinf.uni-freiburg.de On Jan 16 2020, at 5:05 pm, mw18f notifications@github.com wrote:

Thanks. I have H3K4me3 peak file, but I installed hicexplorer using conda, "conda install hicexplorer -c bioconda -c conda-forge", the version still is 2.2.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/deeptools/HiCExplorer/issues/482?email_source=notifications&email_token=ADGQCAEWLN5XUB2LGK5P6PTQ6CAUVA5CNFSM4KHFPIMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJETBYQ#issuecomment-575221986), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ADGQCAFX62L345TKFCCIN43Q6CAUVANCNFSM4KHFPIMA).

mw18f commented 4 years ago

This install command works. I installed hicexplorer3.3. But when I perform hicPCA using following command"hicPCA --matrix S1_C.h5 --format bedgraph --extraTrack GSM3103100_H3K4me3_preB_peaks.bed --histonMarkType active -o pca1_S1.bedgraph pca2_S1.bedgraph" , it didn't show any error, but the value of pc1 for some of chromosomes still flip, which totally invert compare with RNA peak. It looks like it didn't use H3K4me3 peak.

LeilyR commented 4 years ago

If you are using histone marks data, it should be bigwig files containing its signal. if you give it a bed file it treats them as a gene file.