question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BINDetect ValueError

See original GitHub issue

Hi @msbentsen, I have tried using TOBIAS v0.12.1 BINDetect across 25 samples with this code,

TOBIAS BINDetect --signals example/*_corrected_footprints.bw --motifs example/motifs --genome example/fasta --peaks example/bed --skip-excel --outdir output/bindetect --verbosity 4 --cores 25

and I keep running into this error

/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/tobias/tools/bindetect.py:388: UserWarning: Creating legend with loc="best" can be slow with large amounts of data.
  figure_pdf.savefig(fig, bbox_inches='tight')
Traceback (most recent call last):
  File "/home/jopham/anaconda3/envs/TOBIAS/bin/TOBIAS", line 8, in <module>
    sys.exit(main())
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/tobias/TOBIAS.py", line 154, in main
    args.func(args)
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/tobias/tools/bindetect.py", line 412, in r
un_bindetect
    gmm.fit(np.log(bg_values).reshape(-1, 1))
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/sklearn/mixture/_base.py", line 193, in fit
    self.fit_predict(X, y)
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/sklearn/mixture/_base.py", line 220, in fit_predict
    X = _check_X(X, self.n_components, ensure_min_samples=2)
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/sklearn/mixture/_base.py", line 53, in _check_X
    ensure_min_samples=ensure_min_samples)
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/sklearn/utils/validation.py", line 72, in inner_f
return f(**kwargs)
  File "/home/jopham/anaconda3/envs/TOBIAS/lib/python3.7/site-packages/sklearn/utils/validation.py", line 653, in check_array
    context))
ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 2 is required.

I have checked that the *_corrected_footprints.bw files have information in them. Also, I have the log file if you would like it as well.

Sorry about the formatting of the error, this is my first time commenting an issue on github and thanks for helping in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
msbentsencommented, Nov 2, 2020

Thank you for all of the information @parmejohn and @blairperry 😃 I narrowed it down to the across-condition normalization within BINDetect, which failed for some specific outlier cases, thereby introducing NA’s into the data. I made some changes in tobias 0.12.4 to make this more robust. The normalization is a little different, so for the sake of comparison, please update and rerun analysis (even those which might have run through with the old version).

I will close this issue, but thank you for your inputs, and please reopen if you encounter any other issues!

0reactions
blairperrycommented, Oct 30, 2020

Despite the error when running the example data, BINDetect worked perfectly when I plugged in my own data and ran commands manually instead of within the snakemake pipeline. I’m not sure if this is helpful, but figured it might help narrow in on the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BINDetect error when using more than 2 bigwigs #100 - GitHub
There's an error at 3rd step BINDetect if I use more than 2 bigwigs for ... ValueError: Dimensions of Z and labels must...
Read more >
vba - Excel User defined function - Field matches specific criteria ...
Worked! Thank you! One add on question if you don't mind, if the field has less than 8 characters, the function returns a...
Read more >
Release 1.19.1 Erik Rose, Jeff Quast, Avram Lubkin
https://github.com/jquast/blessed/blob/master/bin/detect-multibyte.py ... ValueError – self.width is not a positive integer. Return type.
Read more >
Check if a Sudoku board is filled out correctly
try: validate_sudoku(my_grid) except ValueError as e: # Or whatever ... more bit to 1 in goal return (bincheck == goal) # check all...
Read more >
Viewing online file analysis results for 'Setup_ODM.exe'
Ask for confirmation when deleting downloadsRecycle Bin propertiesCheck this box if you do not want to store deleted downloads in Recycle BinCheck this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found