You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import modisco
import numpy as np
import tensorflow as tf
one_hot = tf.one_hot(np.random.randint(low=0, high=3, size=100*50).reshape(50, 100), depth=4).numpy()
print(one_hot.shape)
impscores = tf.random.uniform(shape=one_hot.shape).numpy()
print(impscores.shape)
null_per_pos_scores = modisco.coordproducers.LaplaceNullDist(num_to_samp=500)
tfmodisco_results = modisco.tfmodisco_workflow.workflow.TfModiscoWorkflow(
target_seqlet_fdr=0.25,
seqlets_to_patterns_factory=
modisco.tfmodisco_workflow.seqlets_to_patterns.TfModiscoSeqletsToPatternsFactory(
initclusterer_factory=modisco.clusterinit.memeinit.MemeInitClustererFactory(
meme_command="meme", base_outdir="meme_out",
#max_num_seqlets_to_use specifies the maximum number of seqlets to use
# with MEME (this is to speed up MEME in the cases where the number of seqlets is
# very large)
max_num_seqlets_to_use=10000,
nmotifs=10,
n_jobs=4),
use_louvain=False,
#Adjust trim_to_window_size and initial_flank_to_add
# according to how big you expect
# the core motif to be; default value is 10
trim_to_window_size=8,
initial_flank_to_add=2,
final_flank_to_add=5,
final_min_cluster_size=20
),
)(
#There is only one task, so we just call this 'task0'
task_names=["task0"],
contrib_scores={'task0': impscores},
hypothetical_contribs={'task0': impscores},
one_hot=one_hot,
null_per_pos_scores=null_per_pos_scores)
Any help welcome.
The text was updated successfully, but these errors were encountered:
Hi, sorry for the slow response (I've graduated and am no longer actively involved with this project) - you may want to refer to the TF-MoDISco lite repository (https://github.com/jmschrei/tfmodisco-lite/) for a more efficient, actively maintained, and easier-to-use version of the same algorithm.
But to answer the question to the best of my ability (easier with a stack trace/output logs): when random or low-quality importance scores are used, the number of seqlets passing the filtering steps tends to become very small, and my guess is that the error is due to that
Getting the above error when running MoDisco.
Minimal example to reproduce the error:
Any help welcome.
The text was updated successfully, but these errors were encountered: