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

Error messages while running drugz #9

Closed
ADvorkinGheva opened this issue Jan 12, 2021 · 1 comment
Closed

Error messages while running drugz #9

ADvorkinGheva opened this issue Jan 12, 2021 · 1 comment

Comments

@ADvorkinGheva
Copy link

ADvorkinGheva commented Jan 12, 2021

Greetings,

I am trying to run Drugz by using the example provided here (I have copied and pasted the example into a tab-delimited txt file); however, I am getting an error:

python drugz.py -i drugz_trial_unix.txt -o drugz-output.txt -c T15_A_control,T15_B_control -x T15_A_olaparib,T15_B_olaparib

INFO:main:Initiating analysis
INFO:main:Loading the read count matrix
INFO:main:Normalizing read counts
INFO:main:Calculating raw fold change for replicate 1
Traceback (most recent call last):
File "drugz.py", line 478, in
main()
File "drugz.py", line 475, in main
drugZ_analysis(args)
File "drugz.py", line 450, in drugZ_analysis
fc_zscore_id='zscore_fc_{replicate}'.format(replicate=i))
File "drugz.py", line 187, in empirical_bayes
results = fold_change.iloc[no_of_guides - (half_window_size + 1)][empirical_bayes_id]
File "/home/annadv/.local/lib/python3.6/site-packages/pandas/core/indexing.py", line 879, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File "/home/annadv/.local/lib/python3.6/site-packages/pandas/core/indexing.py", line 1496, in _getitem_axis
self._validate_integer(key, axis)
File "/home/annadv/.local/lib/python3.6/site-packages/pandas/core/indexing.py", line 1437, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds

I am attaching the input file I tried to use. I have tried both Unix(LF) and Windows(CR LF) formatting, but both led to the same errors.

I will greatly appreciate any help or advice.

Thank you very much.

Regards,
Anna
drugz_trial_unix.txt

@mcolic
Copy link
Contributor

mcolic commented Mar 22, 2021

Hi Anna,

The error you are receiving is due to the --half_window_size parameter, which as default is 500. Given that in the example input file are only 9 rows (i.e. guides), the calculation of smoothed empirical Bayes estimate of std can't be calculated using that default half_window_size. Try setting the parameter to 2 or anything smaller than the number of guides in your input, and you will be able to successfully run it.

Apologies for a delay in response.
Best,
Medina

@mcolic mcolic closed this as completed Mar 22, 2021
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

2 participants