liu-bioinfo-lab / schictools Goto Github PK
View Code? Open in Web Editor NEWa computational tool for analyzing single cell Hi-C data
License: MIT License
a computational tool for analyzing single cell Hi-C data
License: MIT License
Hi,
I think on line 91 of load_hic_file.py there's a small bug. The value of that dictionary should be divided by the resolution. Otherwise it would lead to an extremely large "maps" variable.
Can the scHiCs( ) run the type of files which is " .matrix " ? If yes, which file format should I choose?
files = ['MII-13.allValidPairs.hic', 'MII-20.allValidPairs.hic']
Sus_scrofa = {'1': 274330532, '2': 151935994, '3': 132848913, '4':130910915, '5':104526007, '6':170843587, '7':121844099,'8':138966237,'9':139512083,'10':69359453,
'11':79169978,'12':61602749,'13':208334590,'14':141755446,'15':140412725,'16':79944280,'17':63494081,'18':55982971,'X':125939595,'Y':43547828,'MT':16613}
loaded_data = scHiCs(files, reference_genome=Sus_scrofa, resolution=40000,
max_distance=4000000, format='.hic', adjust_resolution=True,
chromosomes='all', operations=['convolution'], kernel_shape=3,
keep_n_strata=10, store_full_map=True)
assert x.num_of_cells==len(files)
Hello, I encountered this problem when running the above code, may I ask if I have misunderstood somewhere, and how should I solve it?
Hi,
Thank you for this great software! However, I encountered two problems right now.
The first is that I don't really understand the format of the input data. Right now I have txt files looking like the input of "scHiCluster", which is like below:
1 1 9
1 2 1
.....
The first two columns are positions, and the third is count number. Which format does this belong to? matrix_txt?
The second question is that in my code, I wrote explicitly that chromosomes='chr1' (and I only have data in chr1 in that folder.), however, it asks for chr2. Did I do something wrong?
loaded_data = scHiCs(
files, sparse=True, reference_genome='mm9',
resolution=1000000, keep_n_strata=10,
format='matrix_txt', adjust_resolution=False, header=0, chromosomes='chr1',
operations=['convolution']
)
Processing 1 out of 1 files: C:/Users/solei/Downloads/Ren/FreeHiC_sc/2i
Traceback (most recent call last):
File "", line 5, in
File "C:\Users\solei\miniconda3\envs\scHiCTools\lib\site-packages\schictools-0.0.3-py3.7.egg\scHiCTools\load\ContactMaps.py", line 142, in init
**kwargs)
File "C:\Users\solei\miniconda3\envs\scHiCTools\lib\site-packages\schictools-0.0.3-py3.7.egg\scHiCTools\load\load_hic_file.py", line 166, in load_HiC
mat = np.loadtxt('{0}/{1}.txt'.format(file, chromosome))
File "C:\Users\solei\miniconda3\envs\scHiCTools\lib\site-packages\numpy-1.19.1-py3.7-win-amd64.egg\numpy\lib\npyio.py", line 961, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "C:\Users\solei\miniconda3\envs\scHiCTools\lib\site-packages\numpy-1.19.1-py3.7-win-amd64.egg\numpy\lib_datasource.py", line 195, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "C:\Users\solei\miniconda3\envs\scHiCTools\lib\site-packages\numpy-1.19.1-py3.7-win-amd64.egg\numpy\lib_datasource.py", line 535, in open
raise IOError("%s not found." % path)
OSError: C:/Users/solei/Downloads/Ren/FreeHiC_sc/2i/chr2.txt not found.
Yours Sincerely,
Siqi Shen
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.