Closed wushyer closed 2 years ago
@lldelisle that bug happens in pyGenomeTracks. Any idea? Thanks!
Hi @wushyer, Can you give me more details so I can troubleshoot:
pgt --version
python --version
conda list | grep matplotlib
cat conf
Thanks
For the second bug:
$ hicPlotTADs --tracks conf --region 1 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1"
We don't support to give just the chromosome name. You need to provide chr:start-end.
pgt 3.0
Python 3.7.10
matplotlib 3.5.0 pypi_0 pypi
[hic] file = hic_Col_merged.40kb.Corrected.h5 title = Col chr1 colormap = RdYlBu_r depth = 300000 height = 7 transform = log1p file_type = hic_matrix
[tads] file = hic_Col_merged.40kb.Corrected_domains.bed file_type = domains border_color = black color = none line_width = 1.5 overlay_previous = share-y show_data_range = no
[x-axis] fontsize = 16 where = top
[tad score] file = hic_Col_merged.40kb.Corrected_tad_score.bm title = TAD separation score height = 4 file_type = bedgraph_matrix
[spacer]
[gene track] file = genes.bed height = 10 title = tair10 genes labels = false
This version of pgt is not compatible with this version of matplotlib.
Hi which pgt shall I use then? Thanks
We still have not tested matplotlib 3.5.0. I think it should be compatible with the last version of pgt (3.6) but for sure it is not with 3.5.1: https://github.com/deeptools/pyGenomeTracks/commit/c7a4ee17ba30fcf6057abc33ef4d8d1be1f54717
In theory conda should not have allowed that. How did you trick conda? Did you installed pgt with pip?
(Sorry pgt is pyGenomeTracks which is behind hicPlotTADs)
I failed the conda installation, I use the set.up install
I know it can be useful to have everything in your base
environment but I think mixing conda with other type of installation may cause this type of bug.
I personally use a different conda environment for HiCExplorer/pyGenomeTracks as they are strict on matplotlib versions.
I do:
conda create -n hicexplorer -c bioconda -c conda-forge hicexplorer=3.7.2 python=3.7
Then when I want to use HiCExplorer:
conda activate hicexplorer
pgt
Hi, I use this kind of installation but the network seems not so goog, that keep "solving environment". That's the reason I git the package with local installation. I will check this with the System Administrator. Thanks for the help
I now remember that I also had issues. I think the trick was to force numpy version:
conda create -n hicexplorer -c bioconda -c conda-forge hicexplorer=3.7.2 python=3.7 "numpy<1.20"
Maybe @joachimwolff would know this better than me.
conda create -n hicexplorer -c bioconda -c conda-forge hicexplorer=3.7.2 python=3.7 "numpy<1.20"
(tools3) [shuangyang.wu@clip-login-0 Re-seq]$ conda create -n hicexplorer -c bioconda -c conda-forge hicexplorer=3.7.2 python=3.7 "numpy<1.20" Collecting package metadata (current_repodata.json): done Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: -
It was also stuck in solve environment...
This worked for me (after a while but worked):
# create the environment using : `conda env create -f environment.yml`
# update existing environment using : `conda env update -f environment.yml`
# It installs from source using github maf branch.
name: hicexplorer3.7.2
channels:
- bioconda
- conda-forge
dependencies:
- hicexplorer =3.7.2
- numpy >=1.16
- matplotlib >=3.1.1,<=3.2.2
- intervaltree >=2.1.0
- pybigwig >=0.3.16
- future >=0.17.0
- hicmatrix >=15
- pysam >=0.14
- pytest
- gffutils >=0.9
- pybedtools >=0.8.1
- tqdm >=4.20
- biopython >=1.69
- python =3.8
- pygenometracks =3.6
Also if you just need hicPlotTADs (pgt). This also work:
conda create -n pgt_3.6 -c bioconda -c conda-forge pygenometracks=3.6 python=3.7
pgt --version
Hi, I install pgt 3.6 but with same error
(pgt_3.6) [shuangyang.wu@clip-login-1 merged]$ ~/miniconda3/bin/hicPlotTADs --tracks conf --region 1:100000-500000 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1" INFO:numexpr.utils:Note: detected 76 virtual cores but NumExpr set to maximum of 64, check "NUMEXPR_MAX_THREADS" environment variable. INFO:numexpr.utils:Note: NumExpr detected 76 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. INFO:numexpr.utils:NumExpr defaulting to 8 threads.
title not set for 'section 2. [tads]' INFO:hicmatrix.HiCMatrix:Number of poor regions to remove: 92 {'1': 42, '2': 8, '3': 5, '4': 11, '5': 26} INFO:hicmatrix.HiCMatrix:found existing 92 nan bins that will be included for masking WARNING:hicmatrix.HiCMatrix:Bin size is not homogeneous. Median 40000
INFO:pygenometracks.tracksClass:time initializing track(s): INFO:pygenometracks.tracksClass:3.5763447284698486 DEBUG:pygenometracks.tracksClass:Figure size in cm is 40 x 23.6. Dpi is set to 300
INFO:pygenometracks.tracksClass:plotting 1. [hic] INFO:pygenometracks.tracks.GenomeTrack:setting min, max values for track 1. [hic] to: 84.37145272509095, 1146.9949544480594
Traceback (most recent call last):
File "/users/shuangyang.wu/miniconda3/bin/hicPlotTADs", line 7, in
Can you get the version of matplotlib?
conda list | grep matplotlib
matplotlib-base 3.3.2 py37h817c723_0
Wait. If you do:
~/miniconda3/bin/hicPlotTADs
Then you call the one you installed with python setup.py
You now need to do:
pgt --tracks conf --region 1:100000-500000 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1"
~/miniconda3/bin/hicPlotTADs
(pgt_3.6) [shuangyang.wu@clip-login-1 merged]$ ~/miniconda3/bin/hicexplorer --version hicexplorer 2.2.1.1
Sorry, I forget the installation as I use multiple installation, pip, conda set.up, I think the bin path is the pip install as I never successfully install with conda....
Can you try now the line of code I put above which should use pgt version 3.6 and matplotlib 3.3.2?
pgt --tracks conf --region 1:100000-500000 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1"
pgt --tracks conf --region 1:100000-500000 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1"
This works!!!!
Can you try now the line of code I put above which should use pgt version 3.6 and matplotlib 3.3.2?
pgt --tracks conf --region 1:100000-500000 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1"
Thanks for all the kind help.
Ouf!
Now I explain to you.
If you create new conda environment and if you want to use what you just installed you need to give just the name of the software (pgt
in this case) and it will use the software you just installed.
If you put the full path like ~/miniconda3/bin/hicPlotTADs
then it will use this specific software (in this case the version 3.0 of pgt) and in this case it used the matplotlib 3.5 you installed I don't know how.
Anyway bug solved. This is cool.
Hi I met one error with the latest hicplotTAD. Do you have any idea about this?
Thanks Shuangyang
(base) [shuangyang.wu@clip-login-0 merged]$ hicPlotTADs --tracks conf --region 1:100000-500000 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1" INFO:numexpr.utils:Note: detected 76 virtual cores but NumExpr set to maximum of 64, check "NUMEXPR_MAX_THREADS" environment variable. INFO:numexpr.utils:Note: NumExpr detected 76 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. INFO:numexpr.utils:NumExpr defaulting to 8 threads.
title not set for 'section 2. [tads]' INFO:hicmatrix.HiCMatrix:Number of poor regions to remove: 92 {'1': 42, '2': 8, '3': 5, '4': 11, '5': 26} INFO:hicmatrix.HiCMatrix:found existing 92 nan bins that will be included for masking WARNING:hicmatrix.HiCMatrix:Bin size is not homogeneous. Median 40000
INFO:pygenometracks.tracksClass:time initializing track(s): INFO:pygenometracks.tracksClass:2.8355629444122314 DEBUG:pygenometracks.tracksClass:Figure size in cm is 40 x 23.6. Dpi is set to 300
INFO:pygenometracks.tracksClass:plotting 1. [hic] INFO:pygenometracks.tracks.GenomeTrack:setting min, max values for track 1. [hic] to: 84.37145272509095, 1146.9949544480594
Traceback (most recent call last): File "/users/shuangyang.wu/miniconda3/bin/hicPlotTADs", line 7, in
main()
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/hicexplorer/hicPlotTADs.py", line 9, in main
plotTracks.main(args)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/pygenometracks/plotTracks.py", line 307, in main
trp.plot(args.outFileName, region, title=args.title)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/pygenometracks/tracksClass.py", line 241, in plot
track.plot(plot_axis, chrom, start, end)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/pygenometracks/tracks/HiCMatrixTrack.py", line 245, in plot
self.img = self.pcolormesh_45deg(ax, matrix, start_pos, vmax=vmax, vmin=vmin)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/pygenometracks/tracks/HiCMatrixTrack.py", line 314, in pcolormesh_45deg
vmin=vmin, vmax=vmax, cmap=self.cmap, norm=self.norm)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/matplotlib/init.py", line 1412, in inner
return func(ax, map(sanitize_sequence, args), kwargs)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/matplotlib/axes/_axes.py", line 6027, in pcolormesh
collection._scale_norm(norm, vmin, vmax)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/matplotlib/cm.py", line 381, in _scale_norm
"Passing parameters norm and vmin/vmax simultaneously is "
ValueError: Passing parameters norm and vmin/vmax simultaneously is not supported. Please pass vmin/vmax directly to the norm when creating it.**
(base) [shuangyang.wu@clip-login-0 merged]$ hicPlotTADs --tracks conf --region 1 --dpi 300 --outFileName Col_TADs.png --title "Col TADs on chr1"
INFO:numexpr.utils:Note: detected 76 virtual cores but NumExpr set to maximum of 64, check "NUMEXPR_MAX_THREADS" environment variable.
INFO:numexpr.utils:Note: NumExpr detected 76 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
INFO:numexpr.utils:NumExpr defaulting to 8 threads.
title not set for 'section 2. [tads]' INFO:hicmatrix.HiCMatrix:Number of poor regions to remove: 92 {'1': 42, '2': 8, '3': 5, '4': 11, '5': 26} INFO:hicmatrix.HiCMatrix:found existing 92 nan bins that will be included for masking WARNING:hicmatrix.HiCMatrix:Bin size is not homogeneous. Median 40000
INFO:pygenometracks.tracksClass:time initializing track(s): INFO:pygenometracks.tracksClass:2.8513972759246826 Traceback (most recent call last): File "/users/shuangyang.wu/miniconda3/bin/hicPlotTADs", line 7, in
main()
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/hicexplorer/hicPlotTADs.py", line 9, in main
plotTracks.main(args)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/pygenometracks/plotTracks.py", line 306, in main
region = get_region(args.region)
File "/users/shuangyang.wu/miniconda3/lib/python3.7/site-packages/pygenometracks/plotTracks.py", line 249, in get_region
chrom, position = region_string.strip().split(":")
ValueError: not enough values to unpack (expected 2, got 1)