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

script.R' returned non-zero exit status 127. #3

Open
cornhundred opened this issue Oct 9, 2020 · 1 comment
Open

script.R' returned non-zero exit status 127. #3

cornhundred opened this issue Oct 9, 2020 · 1 comment

Comments

@cornhundred
Copy link

Hi, I'm getting an error in the MERFISH_POA.ipynb notebook on the cell

# this requires local R installation with packages 'sctransform' and 'feather'
analysis.normalize_vectors_sctransform()

the error is below:

---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-21-757813b83b14> in <module>
      1 # this requires local R installation with packages 'sctransform' and 'feather'
----> 2 analysis.normalize_vectors_sctransform()

~/anaconda3/envs/merlin_env/lib/python3.6/site-packages/ssam/__init__.py in normalize_vectors_sctransform(self, use_expanded_vectors, normalize_vf)
    717             vec = np.array(self.dataset.vf[self.dataset.local_maxs], copy=True)
    718 
--> 719         norm_vec, fit_params = run_sctransform(vec)
    720         self.dataset.normalized_vectors = np.array(norm_vec)
    721 

~/anaconda3/envs/merlin_env/lib/python3.6/site-packages/ssam/__init__.py in run_sctransform(data, **kwargs)
     96         with open(rfn, "w") as f:
     97             f.write(rcmd)
---> 98         subprocess.check_output("Rscript " + rfn, shell=True)
     99         return pd.read_feather(ofn), pd.read_feather(pfn)
    100 

~/anaconda3/envs/merlin_env/lib/python3.6/subprocess.py in check_output(timeout, *popenargs, **kwargs)
    354 
    355     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 356                **kwargs).stdout
    357 
    358 

~/anaconda3/envs/merlin_env/lib/python3.6/subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
    436         if check and retcode:
    437             raise CalledProcessError(retcode, process.args,
--> 438                                      output=stdout, stderr=stderr)
    439     return CompletedProcess(process.args, retcode, stdout, stderr)
    440 

CalledProcessError: Command 'Rscript /tmp/tmpb04epu5o/script.R' returned non-zero exit status 127.

I installed the R dependencies

install.packages("feather")
install.packages("sctransform")
@pjb7687
Copy link
Member

pjb7687 commented Oct 10, 2020

Hi, may I ask you try loading the libraries in R? I think one of the libraries are not properly installed.

@pjb7687 pjb7687 closed this as completed Oct 10, 2020
@pjb7687 pjb7687 reopened this Oct 10, 2020
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