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

Path issue when running PyMethylProcess in ubuntu on windows (WSL) #14

Open
varunorama opened this issue Jul 29, 2021 · 1 comment
Open

Comments

@varunorama
Copy link

Hello,

I am using pymethyl-process to process IDAT files in the hope of extracting the beta values from multiple samples. Currently I am running it as such:

pymethyl-preprocess preprocess_pipeline --n_cores 8 --idat_dir /mnt/d/IDATS/205130650082/ --pipeline minfi --noob_norm --output_pk
l /mnt/d/TRUD/pymethyl_run/

Where the idat directory is a folder containing all IDAT files. One thing to note, II am currently running this all through the Ubuntu subarchitecture through WSL.

However, running this produces an error which suggests that the path is wrong:

/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/robjects/pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed in a future version.  The public classes are available in the top-level namespace.
  from pandas.core.index import Index as PandasIndex
/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning: [read.metharray.sheet] Found the following CSV files:

  warnings.warn(x, RRuntimeWarning)
character(0)

/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning: Error in list.files(path = base, pattern = "_Grn.idat$", recursive = recursive,  :
  invalid 'path' argument

  warnings.warn(x, RRuntimeWarning)
/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning: In addition:
  warnings.warn(x, RRuntimeWarning)
/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning: There were 25 warnings (use warnings() to see them)
  warnings.warn(x, RRuntimeWarning)
/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

  warnings.warn(x, RRuntimeWarning)
Traceback (most recent call last):
  File "/home/varundwaraka/anaconda3/bin/pymethyl-preprocess", line 8, in <module>
    sys.exit(preprocess())
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/pymethylprocess/preprocess.py", line 293, in preprocess_pipeline
    preprocesser.preprocess_enmix_pipeline(n_cores=n_cores, pipeline=pipeline, noob=noob_norm, use_cache=use_cache, qc_only=qc_only, bmiq=bmiq)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/pymethylprocess/PreProcessDataTypes.py", line 606, in preprocess_enmix_pipeline
    self.load_idats()
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/pymethylprocess/PreProcessDataTypes.py", line 514, in load_idats
    self.RGset = self.minfi.read_metharray_exp(targets=targets, extended=True)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/robjects/functions.py", line 178, in __call__
    return super(SignatureTranslatedFunction, self).__call__(*args, **kwargs)
  File "/home/varundwaraka/anaconda3/lib/python3.8/site-packages/rpy2/robjects/functions.py", line 106, in __call__
    res = super(Function, self).__call__(*new_args, **new_kwargs)
rpy2.rinterface.RRuntimeError: Error in list.files(path = base, pattern = "_Grn.idat$", recursive = recursive,  :
  invalid 'path' argument

However, checking the path to the folder suggests that it is correct:

(base) varundwaraka@LAPTOP-6T391O1J:/mnt/d/IDATS/205130650082$ pwd
/mnt/d/IDATS/205130650082

Is there any explanation as to why this error is occuring? Is it a path issue? Or is this a different issue within pandas? Any insight will be helpful!

Thanks,
Varun

@jlevy44
Copy link
Member

jlevy44 commented May 29, 2022

Hi Varun, the error is odd. What version of rpy2 do you have installed? Last time I checked, worked with 2.9.4 but functionality changed between rpy2 v2 and v3.

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