chenfushi / hichip_peaks Goto Github PK
View Code? Open in Web Editor NEWA tool to analyse HiChIP data
License: BSD 3-Clause "New" or "Revised" License
A tool to analyse HiChIP data
License: BSD 3-Clause "New" or "Revised" License
Hi
Thanks for the method.
I was hoping you could please expand on section 2.2 from the paper, where it's mentioned that "our method can be easily tuned by changing the previous parameters". Are there recommended settings for peak calling for libraries generated with the Arima HiChIP kit?
Thanks
Jonathan
When I run the software, what should I do if this problem occurs?
Hi, I'm trying to run HiChIP-peak, but keep running into this error. Is this a cluttering issue?
INFO - Number of read pairs parsed: 0.0
INFO - #######################################
INFO - Extracting pairs for ChIP peaks calling
INFO - Number of reads used in peak calling: 0.0
WARNING - WARNING: number of reads used for peak calling is very low. Consider doing more sequencing
Traceback (most recent call last):
File "/home/vchu/.local/bin/peak_call", line 8, in <module>
sys.exit(main())
File "/home/vchu/.local/lib/python3.8/site-packages/hichip_peaks/main.py", line 130, in main
smoothed_diagonal, refined_peaks ,quick_peaks, peak_p_vals , peaks_q_vals ,expected_background= sparse_to_peaks.sparse_to_peaks(CSR_mat,frag_index,frag_prop,frag_amount,valid_chroms,chroms_offsets,output_dir,prefix,off_diag,chromX,FDR=FDR,threads=threads,keeptemp=keeptemp)
File "/home/vchu/.local/lib/python3.8/site-packages/hichip_peaks/sparse_to_peaks.py", line 53, in sparse_to_peaks
smoothed_diagonal = numpy.rint(moving_integration(diagonal,((off_diag-1)*2)+1)).astype(int) #### changed to 3 smoothing factor, it is one less than the number of off sites
File "/home/vchu/.local/lib/python3.8/site-packages/hichip_peaks/sparse_to_peaks.py", line 86, in moving_integration
sma = numpy.convolve(values, weights, 'same')
File "<__array_function__ internals>", line 5, in convolve
File "/home/vchu/.local/lib/python3.8/site-packages/numpy/core/numeric.py", line 848, in convolve
raise ValueError('v cannot be empty')
ValueError: v cannot be empty
I have tried to use the bedgraph output from HICHiP-peaks to run in diff-FITHICHIP that runs EdgeR to populate, compare and find differentials in 1D bins for CHIp coverage. I think the bdg format is not compatible as I get no differentials . However, if I use bedgraphs inferred by FITHICHIP or HICHIpper peak finding utilities both of which use MACS2 on the same sample it works fine. If I visualize HICHIP-peaks and FITHICHIPpeaks bedgraph files on a browser I see similar pattern of enriched regions. Can you advise on how to get this to work with the HICHIP-peak bedgraph output
Thank you
Hi,
While running hichip-peaks for the first time, this error came up on multiple data sets. Below is the log file and error messages. Thanks for any help!
INFO - Welcome to HiChIP-Peaks!
INFO - Version: 0.1.2
INFO - 2020-07-20 17:01:53.048280
INFO - Input variables
INFO - HiC-Pro data folder: {directory}
INFO - Restriction fragment file: {directory}/Ensemble_GRCh37_mobi.bed
INFO - Chromosome annotation file: None
INFO - Temporary location: {directory}
INFO - FDR: 0.01
INFO - Distance from diagonal included: 2
INFO - Output directory: {directory}
INFO - Output name prefix: sample_name
INFO - Keep temporary files?: False
INFO - Threads(minimum is 4): 4
INFO - Sex chromosomes correction: False
INFO - Store object containing sparse matrix: False
INFO - Loading experiment information and read pairs
INFO - #######################################
INFO - Start reading experiment information (restriction fragments and chromosomes)
INFO - #######################################
INFO - Preparing HiC-Pro output for import
INFO - #######################################
INFO - Converting HiC-Pro to sparse matrix rappresentation of valid pairs at restriction site resolution
INFO - #######################################
INFO - Sparse matrix of experiment generated
INFO - Number of read pairs parsed: 0.0
INFO - #######################################
INFO - Extracting pairs for ChIP peaks calling
INFO - Number of reads used in peak calling: 0.0
WARNING - WARNING: number of reads used for peak calling is very low. Consider doing more sequencing
Traceback (most recent call last):
File "/.conda/envs/hichip-peaks/bin/peak_call", line 8, in
sys.exit(main())
File "/.conda/envs/hichip-peaks/lib/python3.7/site-packages/hichip_peaks/main.py", line 130, in main
smoothed_diagonal, refined_peaks ,quick_peaks, peak_p_vals , peaks_q_vals ,expected_background= sparse_to_peaks.sparse_to_peaks(CSR_mat,frag_index,frag_prop,frag_amount,valid_chroms,chroms_offsets,output_dir,prefix,off_diag,chromX,FDR=FDR,threads=threads,keeptemp=keeptemp)
File "/.conda/envs/hichip-peaks/lib/python3.7/site-packages/hichip_peaks/sparse_to_peaks.py", line 53, in sparse_to_peaks
smoothed_diagonal = numpy.rint(moving_integration(diagonal,((off_diag-1)*2)+1)).astype(int) #### changed to 3 smoothing factor, it is one less than the number of off sites
File "/.conda/envs/hichip-peaks/lib/python3.7/site-packages/hichip_peaks/sparse_to_peaks.py", line 86, in moving_integration
sma = numpy.convolve(values, weights, 'same')
File "<array_function internals>", line 6, in convolve
File "/.conda/envs/hichip-peaks/lib/python3.7/site-packages/numpy/core/numeric.py", line 815, in convolve
raise ValueError('v cannot be empty')
ValueError: v cannot be empty
Hi,
Can I use HiChIP_peaks for MNase data? If so, should I just leave the restriction-fragment parameter empty?
Thanks!
Hi,
I run differential peak analysis as you recommend, but the generated differential peaks were not consistent with the bedgraph file visualized in IGV. The treatment bedgraph signal were globally higher than the control in IGV visualized and does not have down regulate peaks. However, there ware 3000+ down regulated peaks identified in DEseq2 result.
and the bedgraph file were normalized using the https://github.com/porchard/normalize_bedgraph
script.
Can you advise on how to solve this problem?
Thanks a lot,
Bai
When I try running this, I get an error at the converting hic-pro to sparse matrix step. I've coped the log file below. Could you provide some guidance on this?
INFO - Welcome to HiChIP-Peaks!
INFO - Version: 0.1.1
INFO - 2020-03-12 16:23:35.325021
INFO - Input variables
INFO - HiC-Pro data folder: {directory}
INFO - Restriction fragment file: {directory}
INFO - Chromosome annotation file: {directory}
INFO - Temporary location: {directory}
INFO - FDR: 0.01
INFO - Distance from diagonal included: 2
INFO - Output directory: {directory}
INFO - Output name prefix: sample1
INFO - Keep temporary files?: False
INFO - Threads(minimum is 4): 4
INFO - Sex chromosomes correction: False
INFO - Store object containing sparse matrix: False
INFO - Loading experiment information and read pairs
INFO - #######################################
INFO - Start reading experiment information (restriction fragments and chromosomes)
INFO - #######################################
INFO - Preparing HiC-Pro output for import
INFO - #######################################
INFO - Converting HiC-Pro to sparse matrix rappresentation of valid pairs at restriction site resolution
Traceback (most recent call last):
File "/software/python/Python-3.6.1/bin/peak_call", line 10, in
sys.exit(main())
File "/software/python/Python-3.6.1/lib/python3.6/site-packages/hichip_peaks/main.py", line 126, in main
CSR_mat,frag_index,frag_prop,frag_amount,valid_chroms,chroms_offsets = interaction_to_sparse.HiCpro_to_sparse(hicpro_results,resfrag,sizes,temporary_loc,prefix,keeptemp=keeptemp)
File "/software/python/Python-3.6.1/lib/python3.6/site-packages/hichip_peaks/interaction_to_sparse.py", line 73, in HiCpro_to_sparse
coo_data, coo_row, coo_col = Update_coo_lists_site(current_file,coo_data, coo_row, coo_col,valid_chroms,frag_index)
File "/software/python/Python-3.6.1/lib/python3.6/site-packages/hichip_peaks/interaction_to_sparse.py", line 195, in Update_coo_lists_site
frag_1 = info[8]
IndexError: list index out of range
Many thanks
I am getting math domain error. Is that because the p value is close to zero ?.
INFO - Welcome to HiChIP-Peaks!
INFO - Version: 0.1.2
INFO - 2021-11-10 10:50:35.624014
INFO - Input variables
INFO - HiC-Pro data folder: K562.pipeline_output/HiCPro_out/hic_results/data/fastq
INFO - Restriction fragment file: /hg19_MboI_resfrag.bed
INFO - Chromosome annotation file: /hg19.v2.size
INFO - Temporary location: /code
INFO - FDR: 0.01
INFO - Distance from diagonal included: 2
INFO - Output directory: /code
INFO - Output name prefix: fastq
INFO - Keep temporary files?: False
INFO - Threads(minimum is 4): 10
INFO - Sex chromosomes correction: False
INFO - Store object containing sparse matrix: False
INFO - Loading experiment information and read pairs
INFO - #######################################
INFO - Start reading experiment information (restriction fragments and chromosomes)
INFO - #######################################
INFO - Preparing HiC-Pro output for import
INFO - #######################################
INFO - Converting HiC-Pro to sparse matrix rappresentation of valid pairs at restriction site resolution
INFO - #######################################
INFO - Sparse matrix of experiment generated
INFO - Number of read pairs parsed: 197369472.0
INFO - #######################################
INFO - Extracting pairs for ChIP peaks calling
INFO - Number of reads used in peak calling: 56181909.0
INFO - #######################################
INFO - Identifying high confidence peaks to remove them from background modelling
INFO - #######################################
INFO - Model background noise as a negative binomial
Optimization terminated successfully.
Current function value: 4.083008
Iterations: 5
Function evaluations: 6
Gradient evaluations: 6
INFO - Negative binomial overdispersion parameter: 0.566215325389091
INFO - #######################################
INFO - Identify effect of fragment size bias
INFO - #######################################
INFO - Estimating expected background levels from fragment size
INFO - #######################################
INFO - Identifying enriched regions using negative binomial model
INFO - #######################################
INFO - Refined peak calling done
INFO - #######################################
INFO - Writing peaks and bedgraph to output folder
Traceback (most recent call last):
File "anaconda3-2021-05/install/envs/HiC-Pro_v3.1.0/bin/peak_call", line 8, in
sys.exit(main())
File "anaconda3-2021-05/install/envs/HiC-Pro_v3.1.0/lib/python3.8/site-packages/hichip_peaks/main.py", line 130, in main
smoothed_diagonal, refined_peaks ,quick_peaks, peak_p_vals , peaks_q_vals ,expected_background= sparse_to_peaks.sparse_to_peaks(CSR_mat,frag_index,frag_prop,frag_amount,valid_chroms,chroms_offsets,output_dir,prefix,off_diag,chromX,FDR=FDR,threads=threads,keeptemp=keeptemp)
File "envs/HiC-Pro_v3.1.0/lib/python3.8/site-packages/hichip_peaks/sparse_to_peaks.py", line 74, in sparse_to_peaks
bed_printout(frag_prop,smoothed_diagonal,refined_peaks,peak_p_vals,output_bed,output_bedgraph,expected_background,keeptemp)
File "/anaconda3-2021-05/install/envs/HiC-Pro_v3.1.0/lib/python3.8/site-packages/hichip_peaks/sparse_to_peaks.py", line 348, in bed_printout
output_file.write("{}\t{}\t{}\t{}\t{:10.15f}\n".format(frag_prop[i-1][0],math.floor((frag_prop[i-1][2]+frag_prop[i-1][1])/2),math.floor((frag_prop[i][2]+frag_prop[i][1])/2),max(smoothed_diagonal[i]-expected_background[i],0),-math.log10(peak_p_vals[i])))
ValueError: math domain error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.