又是满满error的两天,Linux 20+R + Rstudio
Linux+R+Rstudio 的两天ERROR记录
cellranger
正常下载安装
注意设置环境变量,不然也会报错
conda 创建 cellranger
https://blog.csdn.net/qq_39784672/article/details/120837408
(base) D:\OneDrive\桌面>conda create -n my_env python==3.8
Collecting package metadata (current_repodata.json): failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 259, in _load
raw_repodata_str = fetch_repodata_remote_request(
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 613, in fetch_repodata_remote_request
raise Response304ContentUnchanged()
conda.core.subdir_data.Response304ContentUnchanged
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "D:\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "D:\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
return getattr(module, func_name)(args, parser)
File "D:\anaconda3\lib\site-packages\conda\cli\main_create.py", line 41, in execute
install(args, parser, 'create')
File "D:\anaconda3\lib\site-packages\conda\cli\install.py", line 261, in install
unlink_link_transaction = solver.solve_for_transaction(
File "D:\anaconda3\lib\site-packages\conda\core\solve.py", line 114, in solve_for_transaction
unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
File "D:\anaconda3\lib\site-packages\conda\core\solve.py", line 157, in solve_for_diff
final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
File "D:\anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "D:\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "D:\anaconda3\lib\site-packages\conda\core\solve.py", line 425, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "D:\anaconda3\lib\site-packages\conda\core\solve.py", line 1020, in _prepare
reduced_index = get_reduced_index(self.prefix, self.channels,
File "D:\anaconda3\lib\site-packages\conda\core\index.py", line 276, in get_reduced_index
new_records = SubdirData.query_all(spec, channels=channels, subdirs=subdirs,
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 120, in query_all
result = tuple(concat(executor.map(subdir_query, channel_urls)))
File "D:\anaconda3\lib\concurrent\futures\_base.py", line 611, in result_iterator
yield fs.pop().result()
File "D:\anaconda3\lib\concurrent\futures\_base.py", line 432, in result
return self.__get_result()
File "D:\anaconda3\lib\concurrent\futures\_base.py", line 388, in __get_result
raise self._exception
File "D:\anaconda3\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 112, in <lambda>
subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 125, in query
self.load()
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 189, in load
_internal_state = self._load()
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 277, in _load
_internal_state = self._read_local_repdata(mod_etag_headers.get('_etag'),
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 326, in _read_local_repdata
_internal_state = self._process_raw_repodata_str(raw_repodata_str)
File "D:\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 364, in _process_raw_repodata_str
json_obj = json.loads(raw_repodata_str or '{}')
File "D:\anaconda3\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "D:\anaconda3\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\anaconda3\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 420202 column 26 (char 12681108)
`$ D:\anaconda3\Scripts\conda-script.py create -n my_env python==3.8`
environment variables:
CIO_TEST=<not set>
CLASSPATH=.;D:\Programming Environment\Java\java_8\lib\dt.jar;D:\Programming
Environment\Java\java_8\lib\tools.jar;
CONDA_DEFAULT_ENV=base
CONDA_EXE=D:\anaconda3\condabin\..\Scripts\conda.exe
CONDA_EXES="D:\anaconda3\condabin\..\Scripts\conda.exe"
CONDA_PREFIX=D:\Anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=D:\anaconda3\python.exe
CONDA_ROOT=D:\anaconda3
CONDA_SHLVL=1
CUDA_PATH=D:\Mx-yolov3\CUDAv10.0
CURL_CA_BUNDLE=<not set>
HOMEPATH=\Users\MSTIFIY
NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\
PATH=D:\anaconda3;D:\anaconda3\Library\mingw-w64\bin;D:\anaconda3\Library\u
sr\bin;D:\anaconda3\Library\bin;D:\anaconda3\Scripts;D:\anaconda3\bin;
D:\Anaconda3;D:\Anaconda3\Library\mingw-w64\bin;D:\Anaconda3\Library\u
sr\bin;D:\Anaconda3\Library\bin;D:\Anaconda3\Scripts;D:\Anaconda3\bin;
D:\anaconda3\condabin;D:\Mx-yolov3\CUDAv10.0\bin;D:\Mx-yolov3\CUDAv10.
0\libnvvp;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS;C:\WINDOWS\sy
stem32;C:\WINDOWS\System32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System3
2\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\Lauguage
Studing\PythonSpider;C:\Program Files
(x86)\Google\Chrome\Application\chromedriver;D:\Programming
Environment\Java\java_8;D:\Lauguage
Studing\Android\Git\Git\cmd;D:\Programming Environment\Tesseract-
OCR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance
Toolkit;C:\Program Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA
NvDLISR;D:\Lauguage Studing\Matlab\runtime\win64;D:\Lauguage
Studing\Matlab\bin;D:\Lauguage
Studing\Matlab\polyspace\bin;D:\Lauguage
Studing\opencv3.4.0\opencv\build\x64\vc14\bin;D:\Lauguage Studing\rasp
berry\putty;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D
:\anaconda3\envs\Mx_yolov3\Scripts;D:\anaconda3\envs\Mx_yolov3;D:\Andr
oidSDK;\platform-tools;D:\AndroidSDK;\tools;D:\Tools\cmake-3.21.2-wind
ows-x86_64\bin;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32;C:\W
INDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WIN
DOWS\System32\OpenSSH;D:\Programming
Environment\python;D:\Fiddler;D:\Lauguage Studing\鐖櫕\PyCharm
Community Edition 2019.3.1\bin;.;D:\Programming
Environment\python\Scripts;C:\Program Files
(x86)\Google\Chrome\Application;D:\Programming
Environment\Java\java_8\bin;D:\Programming
Environment\Java\java_8\jre\bin;"D:\Programming
Environment\Java\java_8\bin;D:\Mx-yolov3\CUDAv10.0\bin;D:\Mx-yolov3\CU
DAv10.0\libnvvp;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS;C:\WIND
OWS\system32;C:\WINDOWS\System32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\S
ystem32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\Lauguage
Studing\PythonSpider;C:\Program Files
(x86)\Google\Chrome\Application\chromedriver;D:\Programming
Environment\Java\java_8;D:\Lauguage
Studing\Android\Git\Git\cmd;D:\Programming Environment\Tesseract-
OCR;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance
Toolkit;C:\Program Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA
NvDLISR;D:\Lauguage Studing\Matlab\runtime\win64;D:\Lauguage
Studing\Matlab\bin;D:\Lauguage
Studing\Matlab\polyspace\bin;D:\Lauguage
Studing\opencv3.4.0\opencv\build\x64\vc14\bin;D:\Lauguage Studing\rasp
berry\putty;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:
\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D
:\anaconda3\envs\Mx_yolov3\Scripts;D:\anaconda3\envs\Mx_yolov3;D:\Andr
oidSDK;\platform-tools;D:\AndroidSDK;\tools;D:\Tools\cmake-3.21.2-wind
ows-x86_64\bin;";"D:\AndroidSDK;\platform-
tools;D:\AndroidSDK;\tools鈥嬧€嬧€嬧€嬧€嬧€嬧€?;D:\Programming
Environment\Tesseract-OCR;D:\anaconda3;C:\Users\MSTIFIY\AppData\Local\
Microsoft\WindowsApps;D:\Lauguage Studing\miktex\MiKTeX\miktex\bin\x64
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
PowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : D:\Anaconda3
shell level : 1
user config file : C:\Users\MSTIFIY\.condarc
populated config files : C:\Users\MSTIFIY\.condarc
conda version : 4.9.2
conda-build version : 3.18.11
python version : 3.8.3.final.0
virtual packages : __cuda=10.2=0
__win=0=0
__archspec=1=x86_64
base environment : D:\anaconda3 (writable)
channel URLs : https://mirrors.ustc.edu.cn/anaconda/pkgs/main/win-64
https://mirrors.ustc.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64
https://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch
https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/win-64
https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/noarch
package cache : D:\anaconda3\pkgs
C:\Users\MSTIFIY\.conda\pkgs
C:\Users\MSTIFIY\AppData\Local\conda\conda\pkgs
envs directories : D:\anaconda3\envs
C:\Users\MSTIFIY\.conda\envs
C:\Users\MSTIFIY\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.3 Windows/10 Windows/10.0.19041
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
[y/N]:
解决方式 ,更改镜像
注意后面改回来
打开.condarc文件:
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
- https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
ssl_verify: true
1
2
3
4
5
删除conda-forge的镜像源
channels: - https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
ssl_verify: true
1
2
3
4
再次新建环境,成功。
SRA太慢了,用fastq-dump
cellrangger比对定量报错
通常sample的命名错误!!
不能有小数点
命名前面要一致!
参考 https://www.jianshu.com/p/11c4537feb4b
https://blog.csdn.net/leo12354/article/details/109521746?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-109521746-blog-115718180.t5_download_comparev1&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-109521746-blog-115718180.t5_download_comparev1&utm_relevant_index=1
安装velocyto.r
!!! 注意安装samtools
samtools 报错. In alternative this could be a memory error, try to set the --samtools_memory option to a value compatible with your system.
报错信息:
This is probably related to an old version of samtools, please install samtools >= 1.6. In alternative this could be a memory error, try to set the --samtools_memory option to a value compatible with your system. Otherwise sort manually by samtools sort -l [compression] -m [mb_to_use]M -t [tagname] -O BAM -@ [threads_to_use] -o cellsorted_[bamfile] [bamfile]
不要相信这个,版本不对,内存太小之类的!!
其他的顺着它报错下去又是一晚上,根本无止境
正解在下面!!
From issue 115 and 165
samtools sort -t CB -O BAM -o Sample_files/og007_1/cellsorted_og007_1_star_gene_exon_tagged_corrected.bam
From issue 192
samtools sort -t CB -O BAM -o/mnt/DATA2/RAW_DATA/Re_Run_\ 2018_Data_with_updated_reference_genome/KUL-1-1000cells/outs/cellsorted_possorted_genome_bam.bam /mnt/DATA2/RAW_DATA/Re_Run_\ 2018_Data_with_updated_reference_genome/KUL-1-1000cells/outs/possorted_genome_bam.bam
velocyto run10x -m /mnt/DATA1/Velocyto/alltracks_mask.gtf
/mnt/DATA2/RAW_DATA/Re_Run_\ 2018_Data_with_updated_reference_genome/KUL-1-1000cells
/mnt/DATA1/Velocyto/refdata-cellranger-mm10-3.0.0/genes/genes.gtf
解除R中从github上下载包API限制的问题(Error: Failed to install ‘unknown package‘ from GitHub: HTTP error 403. )
最近在github上下载包,出现了API下载速率限制的问题,返回error 403,并要求使用github_token()取消api rate 的限制。这是因为github会扫描需要安装的依赖程序,如果数目超过他的api rate,github就会限制下载,解决办法是使用自己的token认证(相当于去github上认证一下,挂个号,然后给你安装)。我检索了一圈,发现很多人出现这个问题,但中文网络中没有解决办法,捣鼓了一天终于解决了。问题如下
> devtools::install_github("NightingaleHealth/ggforestplot", build_vignettes = TRUE)
Error: Failed to install 'unknown package' from GitHub:
HTTP error 403.
API rate limit exceeded for 175.29.122.76. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
Rate limit remaining: 0/60
Rate limit reset at: 2021-12-19 03:33:21 UTC
To increase your GitHub API rate limit
- Use `usethis::create_github_token()` to create a Personal Access Token.
- Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.
发现是github的API rate限制,并且需要通过github token 提供GitHub API rate 限制,所以首先去github官网注册一个账号。然后在github的个人主页-settings-Developer settings-Personal access tokens-creat new token。具体步骤如下:
第一步:制备github token
- 申请个人github账号,如果已经有账号登入就行,点击右上角个人图像,进去后点击下拉菜单中的settings。
- 进去settings 后点击最下面的Developer settings
- 点击Person access tokens, 点击右上角的Generate new token, 建立新的token
- 首先命名你的token,可以随意写。然后选择token失效的时间,如果担心密码泄漏,可以选30天,30天后失效需要重新设置。我选的永久。最后勾选repo,token用于下载github上的代码仓库。点击generate token。
- token 制备好了,记得拷贝形成的token密码,我的token密码是ghp_8h。。开头的,因为只出现一次,拷贝下来保存在记事本或者word中后续备用。
第二步, 在r中把token设置在环境变量中
1.打开rstudio 或者r,输入 usethis::edit_r_environ(),运行
usethis::edit_r_environ()
1
- 运行后,在代码区把第一次出现的token拷贝过去
GITHUB_TOKEN=“ghp_8lNL22DYuvxnvODL6din7C9DdddTcQc”
这个token是手输入的,可能不准确,实际使用中拷贝过去即可。保存,或者ctrl+s. 关闭r或者rstudio。
- 重新打开rstudio,一定要关闭后重新打开,不然环境变量没加进去。重新安装发现可以正常安装。
devtools::install_github(“NightingaleHealth/ggforestplot”)
- 测试包是否安装成功:
library(tidyverse)
library(ggforestplot)
原文链接:https://blog.csdn.net/weixin_44022515/article/details/122022228
部分Linux下R包安装问题
报错信息:
Install with devtools::install_github() fails to detect build tools
报错信息根本找不到!!
https://www.how2shout.com/linux/install-build-essential-tools-on-ubuntu-22-04-or-20-04-lts-linux/
1. Open a command terminal
To install the package instantly on Linux, the easiest way is to use the command terminal. To open the terminal app either use keyboard shortcut keys: Ctrl+ALT+T or go to the Application launcher and find it there.
2. Run system update
Before moving further and installing the developer tools for compiling source code in Ubuntu or Debian, run the system update command to rebuild the repository cache.
sudo apt update
3. Command to install build-essential on Ubuntu
Well, just like thousands of packages the “Build-essentials” is also available via the base repository of Debian or Ubuntu. Hence, just use the APT package manager command given below.
sudo apt install build-essential manpages-dev
Note: manpages-dev is just to provide Manual pages about using GNU/Linux for development. You can skip it if you want.
ommand to install build essential on Ubuntu
The following packages are required for languages other than C and C ++ :
gobjc (Objective-C)
gfortran (Fortran)
gnat ( universe, Ada)
Command to install the packages:
sudo apt install gobjc gfortran gnat
sudo apt install gobjc gfortran gnat
4. Check gcc and g++ version
To know which version of GCC and G++ is on your system use the given commands:
gcc --version
g++ --version
Check GCC and G version command
5. How to compile source code on Debian or Ubuntu 22.04/20.4
Once you have the build-essential package installed on your system we can start compiling the source of software we want. For example, let’s you want to install the popular ImageMagick Image convertor tool on Debian Linux using its source code. The first thing we should have on your system is the “source code” that we want to compile.
Here we are cloning the source of ImageMagick from its Git repository. If you already have a source of the program you want to compile then you can go ahead.
sudo git clone https://github.com/ImageMagick/ImageMagick.git
Switch to your source code folder, here it is ImageMagick:
cd ImageMagick
Prepare files for compiling:
sudo ./configure
Start Compiling:
sudo make
Once the compilation is done, install the program:
sudo make install
6. Compile your own C Program
If you want to write your program and use Build essential packages to compile your code to learn how it works then see our Tutorials: How to create, compile & run a C Program in a Linux terminal
7. Remove or Uninstall build-essential from Ubuntu
Those who are interested in developing or in this package can remove it using:
sudo apt remove --purge build-essential
然后在终端中
用R再安装
不用Rstudio
首先安装R包的方式
参考https://www.jianshu.com/p/20a01a768876
安装mamba 比较好!
参考 https://www.jianshu.com/p/70d5791452d8
参考 :https://blog.csdn.net/qq_41728601/article/details/125757419
解决ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22‘ not found
安装的R包load 错误Error: Could not find tools necessary to compile a package/compilation failed for package
这个是默认路径下的libstdc++.so.6缺少GLIBCXX_3.4.22,你有可能缺少其它版本的比如3.4.23,解决方法一样,如下所示:
参考https://blog.csdn.net/qq_30653631/article/details/107620137
这个方法没尝试
https://www.jianshu.com/p/e771ae580b0e
https://blog.csdn.net/weixin_40640700/article/details/116278415
devtools 报错Error: Could not find package root.
主要原因:
不是root软件包的问题, 而是当前路径不在开发R包的目录下
Error: Could not find package root.
解决方法:
setwd()
回到开发R包的目录下即可.
主要是gcc和版本问题
https://blog.csdn.net/qq_41328797/article/details/105904269
参考
https://www.cnblogs.com/jessepeng/p/10984983.html
Windows 有Rtools ,Linux下R没有
更多推荐
所有评论(0)