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

ValueError: cannot reshape array of size 0 into shape (0,newaxis) #115

Open
Yaoyx opened this issue Apr 9, 2024 · 1 comment
Open

ValueError: cannot reshape array of size 0 into shape (0,newaxis) #115

Yaoyx opened this issue Apr 9, 2024 · 1 comment

Comments

@Yaoyx
Copy link

Yaoyx commented Apr 9, 2024

Hello,

image
image
I tried to print the snippet, and it's an empty array. I appreciate for any suggestions.

Thank you,
Yao

@Yaoyx
Copy link
Author

Yaoyx commented Apr 9, 2024

hit_scorer = densityadapted_hitscoring.MakeHitScorer(
    patterns=orig_patterns,
    target_seqlet_size=11,
    bg_freq=np.mean(test_inputs[target_ind][None,:,:].astype('int'), axis=(0,1)),
    task_names_and_signs=[("task0",1)],
    n_cores=10)

I found decreasing target_seqlet_size to 11 helped, and here's my setting for getting tfmodisco_results:

tfmodisco_results = modisco.tfmodisco_workflow.workflow.TfModiscoWorkflow(
                    sliding_window_size=18,
                    flank_size=8,
                    max_seqlets_per_metacluster=40000,
                    seqlets_to_patterns_factory=
                     modisco.tfmodisco_workflow.seqlets_to_patterns.TfModiscoSeqletsToPatternsFactory(
                        trim_to_window_size=24,
                        initial_flank_to_add=8,
                        n_cores=10)
                )

I am a bit confused about the relationship between parameters in these two functions. It seems that target_seqlet_size in densityadapted_hitscoring.MakeHitScorer should be smaller than trim_to_window_size in modisco.tfmodisco_workflow.workflow.TfModiscoWorkflow, but I am not sure about the ratio between them.

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

1 participant