ma-compbio / fast-higashi Goto Github PK
View Code? Open in Web Editor NEWsingle-cell Hi-C, scHi-C, Hi-C, 3D genome, nuclear organization, tensor decomposition
License: MIT License
single-cell Hi-C, scHi-C, Hi-C, 3D genome, nuclear organization, tensor decomposition
License: MIT License
Hello! Thank you for sharing your code with us and the very detailed Wiki to walk us through the setup process.
I wanted to ask, how do I acquire the imputed matrices from the Fast-Higashi? I know you run a partial_rwr algorithm to generate imputed scHi-C matrices. Is this function adaptable to any tensor of scHi-C matrices? Does the input "x" to this function require the tensor to be arranged in a certain way, for example the scHi-C matrices of the same cell type are closer to each other in the tensor (think of axis 0)? Or can I just borrow this function and run it on my own scHi-C data tensors without any order?
Thanks again!
I'm trying to run tutorial with Fast-Higashi on Lee et al. dataset (sn-m3c-seq on PFC).
I downloaded all of file in goole drive (https://drive.google.com/drive/folders/1SuzqQ_9dliAmTb-fGprFnN3aZrfWS-Fg?usp=sharing)
The code that I used is below
from fasthigashi.FastHigashi_Wrapper import *
config = "/work/magroup/ruochiz/fast_higashi_git/config_pfc.JSON"
model = FastHigashi(config_path=config,
path2input_cache="/work/magroup/ruochiz/fast_higashi_git/pfc_500k",
path2result_dir="/work/magroup/ruochiz/fast_higashi_git/pfc_500k",
off_diag=100,
filter=False,
do_conv=False,
do_rwr=False,
do_col=False,
no_col=False)
model.prep_dataset(batch_norm=True)
And the error was occurred
total number of cells that pass qc check 4145 bad 93 total: 4238
cache file = /das2/younso/Hic/schic/F_higashi/pfc_500k/cache_intra_500000_offdiag_100_.pkl
loading cached input from /das2/younso/Hic/schic/F_higashi/pfc_500k/cache_intra_500000_offdiag_100_.pkl
---------------------------------------------------------------------------
EOFError Traceback (most recent call last)
Cell In[4], line 1
----> 1 model.prep_dataset(batch_norm=True)
File ~/bin/Fast-Higashi/fasthigashi/FastHigashi_Wrapper.py:484, in FastHigashi.prep_dataset(self, meta_only, batch_norm)
481 cache_extra = ""
482 path2input_cache_intra = os.path.join(self.path2input_cache, 'cache_intra_%d_offdiag_%d_%s.pkl' % (
483 res, self.off_diag, cache_extra))
--> 484 all_matrix += self.preprocess_contact_map(
485 self.config, reorder=reorder, path2input_cache=path2input_cache_intra,
486 batch_norm=batch_norm,
487 is_sym=True,
488 off_diag=self.off_diag,
489 fac_size=1,
490 merge_fac_row=int(res / self.config['resolution']), merge_fac_col=int(res / self.config['resolution']),
491 filename_pattern='%s_sparse_adj.npy',
492 force_shift=False,
493 )
495 size_list = [m.shape[0] for m in all_matrix]
496 num_cell = all_matrix[-1].shape[-1]
File ~/bin/Fast-Higashi/fasthigashi/FastHigashi_Wrapper.py:377, in FastHigashi.preprocess_contact_map(self, config, reorder, path2input_cache, batch_norm, key_fn, **kwargs)
375 with open(path2input_cache, 'rb') as f:
376 for chrom in self.chrom_list:
--> 377 all_matrix.append(pickle.load(f))
378 sys.stdout.flush()
379 return all_matrix
EOFError: Ran out of input
In the tutorial description, below sentence is located
"To run Fast-Higashi for a new dataset, please prepare the same input files for the Higashi software. Use the Higashi software higashi.process_data() to transform contact pair files to sparse contact maps."
Is this mean that I should use Higashi at first?
But, then, I can't use FastHigashi(config_path=config, ... function because it will be substituted Higashi(config).
Why this error is occurred?
Hi, I'm interested in pulling out the chrom-specific meta-interactions (as in Figure 3B). Is this derived from the matrices in the B_list of the final model? I looked at these for my dataset but they don't look like the example ones, so I'm wondering if I'm missing something. Thanks!
Hi Ruochi,
Thank you for your excellent work in both Higashi and fast-Higashi. I'm currently working with the 4 datasets mentioned in your paper (Lee, Liu, Tan, and Ramani). I noticed that you have created the "label_info.pickle" file, which includes cell subtype information, batch ID, and other annotations for each cell.
However, I couldn't find these annotations in the original GEO accession files. For example, in the Lee et al. dataset, there are cell subtypes like 'L2/3', 'ODC', 'Sst', 'L5', 'Astro', etc. listed in the manuscript, but I can't locate the raw cell subtype information in the raw contacts.txt file or the indexed.tsv file (under each cell sample ID).
Maybe I'm missing something. Your advise will be so helpful. Thank you!
Hello, I was wondering if Fast-Higashi can be used with 10kb scHi-C data for imputation?
Hi, Ruochi
There is no 'setup.py' provided actually. Thanks.
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.