Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Kernel crashed when I run tfi.scan #207

Open
Zhangruiqi111 opened this issue Jul 12, 2024 · 4 comments
Open

The Kernel crashed when I run tfi.scan #207

Zhangruiqi111 opened this issue Jul 12, 2024 · 4 comments

Comments

@Zhangruiqi111
Copy link

When I run this command : tfi.scan(fpr=0.02,motifs=None, verbose=True)
Error reported as follows : The Kernel crashed while executing code in the current cell or a previous cell.
So I do it in batches ,100 rows are processed at a time ,
`import math
peaks = pd.read_csv("cicero_output/processed_peak_file.csv", index_col=0)
peaks = peaks[2000:3000]
df_results = []
batch_size = 100
num_batches = math.ceil(len(peaks)/100)

def process_batch(batch_peaks):
tfi = ma.TFinfo(peak_data_frame=batch_peaks, ref_genome=ref_genome, genomes_dir=None)
tfi.scan(fpr=0.02, motifs=None, verbose=True)
tfi.reset_filtering()
tfi.filter_motifs_by_score(threshold=10)
tfi.make_TFinfo_dataframe_and_dictionary(verbose=True)
return tfi.to_dataframe()

for batch_index in range(num_batches):
start_index = batch_index * batch_size
end_index = min((batch_index + 1) * batch_size, len(peaks))
batch_peaks = peaks.iloc[start_index:end_index].copy()
df = process_batch(batch_peaks)
df_results.append(df)`

But an error is still reported :
The Kernel crashed while executing code in the current cell or a previous cell.
I installed gimmemotifs with conda first and then celloracle with pip , But it didn't work.
So I think there is something wrong with the data :(

@baoa2ta
Copy link

baoa2ta commented Oct 20, 2024

Were able to solve this issue? I am having the same problem

@NN0412
Copy link

NN0412 commented Dec 15, 2024

Hi I am having the issue where python keeps killing the process when running tfi.scan(fpr=0.02, motifs=None, verbose=True).have you solved your problem yet? At this step, my Python kernel always crashes, and it always gets stuck at 0% of the process. I tried changing gimmemotifs to version 0.14.4, but it still doesn't work. I'm not sure if it's because my gimmemotifs library was installed using pip instead of conda.

@wangxuann1995
Copy link

Use conda install gimmemotifs before pip install celloracle. Install specific version 0.17.2 gimmemotifs

@NN0412
Copy link

NN0412 commented Jan 3, 2025

在 pip install celloracle 之前使用 conda install gimmemotifs。安装特定版本 0.17.2 gimmemotifs

yes.Last week, I already solved the problem using a method similar to yours. You were right. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants