genialis / RNAnorm

Normalization of RNA-seq gene expression
Apache License 2.0
65 stars 15 forks source link

Error: Getting requirements to build wheel did not run successfully #18

Closed Chloe-Thangavelu closed 1 year ago

Chloe-Thangavelu commented 1 year ago

Hello, I am struggling to install rnanorm. When I type "pip install rnanorm" in jupyter notebooks I get the following error. I have tried to install with python versions 3.8.3 and 3.10.9, but get the same error.

print(sys.version)
3.8.3 (default, Jul  2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)]
Collecting rnanorm
  Using cached rnanorm-1.5.1-py3-none-any.whl (11 kB)
Requirement already satisfied: numpy in c:\users\cathe\anaconda3\lib\site-packages (from rnanorm) (1.24.3)
Requirement already satisfied: pandas in c:\users\cathe\anaconda3\lib\site-packages (from rnanorm) (1.0.5)
Requirement already satisfied: scipy in c:\users\cathe\anaconda3\lib\site-packages (from rnanorm) (1.5.0)
Collecting pybedtools (from rnanorm)
  Using cached pybedtools-0.9.0.tar.gz (12.5 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\cathe\anaconda3\lib\site-packages (from pandas->rnanorm) (2.8.1)
Requirement already satisfied: pytz>=2017.2 in c:\users\cathe\anaconda3\lib\site-packages (from pandas->rnanorm) (2020.1)
Requirement already satisfied: six in c:\users\cathe\anaconda3\lib\site-packages (from pybedtools->rnanorm) (1.15.0)
Collecting pysam (from pybedtools->rnanorm)
  Using cached pysam-0.21.0.tar.gz (4.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
  error: subprocess-exited-with-error

  Getting requirements to build wheel did not run successfully.
  exit code: 1

  [34 lines of output]
  # pysam: cython is available - using cythonize if necessary
  # pysam: htslib mode is shared
  # pysam: HTSLIB_CONFIGURE_OPTIONS=None
  '.' is not recognized as an internal or external command,
  operable program or batch file.
  '.' is not recognized as an internal or external command,
  operable program or batch file.
  # pysam: htslib configure options: None
  Traceback (most recent call last):
    File "C:\Users\cathe\anaconda3\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\cathe\anaconda3\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\cathe\anaconda3\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\cathe\AppData\Local\Temp\pip-build-env-6kaeyrrh\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\cathe\AppData\Local\Temp\pip-build-env-6kaeyrrh\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "C:\Users\cathe\AppData\Local\Temp\pip-build-env-6kaeyrrh\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
      super(_BuildMetaLegacyBackend,
    File "C:\Users\cathe\AppData\Local\Temp\pip-build-env-6kaeyrrh\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 383, in <module>
    File "<string>", line 79, in run_make_print_config
    File "C:\Users\cathe\anaconda3\lib\subprocess.py", line 411, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "C:\Users\cathe\anaconda3\lib\subprocess.py", line 489, in run
      with Popen(*popenargs, **kwargs) as process:
    File "C:\Users\cathe\anaconda3\lib\subprocess.py", line 854, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\cathe\anaconda3\lib\subprocess.py", line 1307, in _execute_child
      hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully.
exit code: 1

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Chloe-Thangavelu commented 1 year ago

In addition, I would like to confirm. I have an output file from feature counts that looks like this. Will rnanorm be able convert this into TPM? I do not have access to the original BAM file.

geneID  geneLength  read counts
ENSG00000121410 4006    3
ENSG00000268895 2793    3
ENSG00000148584 9603    11
ENSG00000175899 6384    1
JureZmrzlikar commented 1 year ago

Hi @CthangavUCI

Which OS are you using? Windows? If so, issues with installing of (py)bedtools are well known for Windows users.

Are you familiar with running things in Docker?

The other option would be to install the rnanorm 2.0.0, which is not yet published o Pypi. 2.0.0 does not depend on pybedtools.

JureZmrzlikar commented 1 year ago

In addition, I would like to confirm. I have an output file from feature counts that looks like this. Will rnanorm be able convert this into TPM? I do not have access to the original BAM file.

This is fine, do you have access to the GTF file used to obtain the expressions counts?

Chloe-Thangavelu commented 1 year ago

Thank you very much for your reply. Could you give me instructions on how to access/install rnanorm 2.0.0? I can try to download docker if you have advice on how to do that- I may try both methods and see which one works. Also, just to confirm, I only have a featurecounts output file containing the counts and feature lengths- is that sufficient for RNAnorm to calculate TPMs? THank you again for your help!

On Tue, Jun 13, 2023 at 1:14 AM Jure Zmrzlikar @.***> wrote:

Hi @CthangavUCI https://urldefense.com/v3/__https://github.com/CthangavUCI__;!!CzAuKJ42GuquVTTmVmPViYEvSg!ODBHCXrzVPlyoZvj6yfBa6O5zDD9vT6WTANEoQYosjyt-Kz_gQMMrG8hZ91IRnwKwktEuS15_9I4BEASu-7hfO3z$

Which OS are you using? Windows? If so, issues with installing of (py)bedtools are well known https://urldefense.com/v3/__https://www.biostars.org/p/9561321/__;!!CzAuKJ42GuquVTTmVmPViYEvSg!ODBHCXrzVPlyoZvj6yfBa6O5zDD9vT6WTANEoQYosjyt-Kz_gQMMrG8hZ91IRnwKwktEuS15_9I4BEASuzZoJExh$ for Windows users.

Are you familiar with running things in Docker?

The other option would be to install the rnanorm 2.0.0, which is not yet published o Pypi. 2.0.0 does not depend on pybedtools.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/genialis/RNAnorm/issues/18*issuecomment-1588780728__;Iw!!CzAuKJ42GuquVTTmVmPViYEvSg!ODBHCXrzVPlyoZvj6yfBa6O5zDD9vT6WTANEoQYosjyt-Kz_gQMMrG8hZ91IRnwKwktEuS15_9I4BEASu-ivbrgy$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ATZSYG6LJ655R7GZPVLC5XDXLAOPDANCNFSM6AAAAAAZD6JM74__;!!CzAuKJ42GuquVTTmVmPViYEvSg!ODBHCXrzVPlyoZvj6yfBa6O5zDD9vT6WTANEoQYosjyt-Kz_gQMMrG8hZ91IRnwKwktEuS15_9I4BEASu7kA47Kn$ . You are receiving this because you were mentioned.Message ID: @.***>

-- Chloe Thangavelu PhD Candidate, University of California, Irvine Department of Biological Chemistry

JureZmrzlikar commented 1 year ago

Hi @CthangavUCI

If you only have is FeatureCounts file than I suggest the following

Install rnanorm 2.0.0 release candidate with: pip install rnanorm==2.0.0.rc2 Warning: this is development version. It should work fine, but not 100% bulletproof.

If this works you can use the (1)command line or (2) Python

  1. To normalize your expressions with TPM in command line use: rnanorm tpm exp.csv --gene-lengths lengths.csv

The format of the exp.csv must be samples in rows and genes in columns, e.g.

,ENSG00000121410,ENSG00000268895,...
SAMPLE_1,31,54, ...
SAMPLE_2,26,34, ...
...

The format of the lengths.csv must be two columns, first gene IDs, second gene lengths, e.g.

gene_id,gene_length
ENSG00000121410,4006
ENSG00000268895,2793
ENSG00000148584,9603
ENSG00000175899,6384
...
  1. To normalize your expressions with TPM in Python use:
    
    import pandas as pd
    from rnanorm import TPM

fc = pd.read_csv(, sep="\t", index_col=0) gene_lengths = fc["geneLength"] exp = fc[["read counts"]].T

exp_tpm = TPM(gene_lengths=gene_lengths).fit_transform(exp)

Chloe-Thangavelu commented 1 year ago

Thank you very much- option 2 worked in python for me. Is the code similar to get TMM normalization? Something like: exp_tmm = TMM().fit_transform(exp)

JureZmrzlikar commented 1 year ago

Is the code similar to get TMM normalization? Something like: exp_tmm = TMM().fit_transform(exp)

Exactly. All the methods have as similar interface as possible.