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

unexpected FTP path (new server?) #508

Closed
lynngao opened this issue Oct 7, 2021 · 12 comments
Closed

unexpected FTP path (new server?) #508

lynngao opened this issue Oct 7, 2021 · 12 comments

Comments

@lynngao
Copy link

lynngao commented Oct 7, 2021

Hi there,

I used this command to download standard library:
kraken2-build --use-ftp --standard --threads 24 --db database/

and the error message shows like this:
Downloading nucleotide gb accession to taxon map... done.
Downloading nucleotide wgs accession to taxon map... done.
Downloaded accession to taxon map(s)
Downloading taxonomy tree data... done.
Uncompressing taxonomy data... done.
Untarring taxonomy tree data... done.
rsync_from_ncbi.pl: unexpected FTP path (new server?) for https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/762/265/GCF_000762265.1_ASM76226v1

I checked on the ncbi directory this GCF_000762265.1_ASM76226v1 folder actually exists, but don't know why this error occurs. Is there any solution for this? Thank you so much!

@lynngao
Copy link
Author

lynngao commented Oct 7, 2021

I figured it out by myself, just simply change line 46 in the rsync_from_ncbi.pl:

if (! ($full_path =~ s#^ftp://${qm_server}${qm_server_path}/##)) {
to
if (! ($full_path =~ s#^https://${qm_server}${qm_server_path}/##)) {

@shengxin450
Copy link

hi,excuse me ,could you help me how to use your codes? for example, I want to download the kraken2 standard db ,by using"kraken2-build --use-ftp --standard --threads 24 --db database/", so how can I use your codes to change or correct my codes?
if (! ($full_path =~ s#^ftp://${qm_server}${qm_server_path}/##)) { kraken2-build --use-ftp --standard --threads 24 --db database/ }
to
if (! ($full_path =~ s#^https://${qm_server}${qm_server_path}/##)) {kraken2-build --use-ftp --standard --threads 24 --db database/ }
?? ?
Thanks for your help , very much!
(我来自中国,不知老师是否会说汉语,我想问,关于kraken2的这个报错,我该如何将您的代码结合到"kraken2-build --use-ftp --standard --threads 24 --db database/"这个代码中,请老师指点迷津,十分感谢)

@lynngao
Copy link
Author

lynngao commented Oct 9, 2021

hi,excuse me ,could you help me how to use your codes? for example, I want to download the kraken2 standard db ,by using"kraken2-build --use-ftp --standard --threads 24 --db database/", so how can I use your codes to change or correct my codes? if (! ($full_path =~ s#^ftp://${qm_server}${qm_server_path}/##)) { kraken2-build --use-ftp --standard --threads 24 --db database/ } to if (! ($full_path =~ s#^https://${qm_server}${qm_server_path}/##)) {kraken2-build --use-ftp --standard --threads 24 --db database/ } ?? ? Thanks for your help , very much! (我来自中国,不知老师是否会说汉语,我想问,关于kraken2的这个报错,我该如何将您的代码结合到"kraken2-build --use-ftp --standard --threads 24 --db database/"这个代码中,请老师指点迷津,十分感谢)

Hi, you only need to change the "ftp" into "https" in the rsync_from_ncbi.pl file. Do not modify other codes. kraken2-build --use-ftp --standard --threads 24 --db database/ is a command you need to run in linux system.
你好,kraken2-build是一个需要在linux上run的command,不是代码文件里面的代码。这里的主要问题是原作者在写rsync_from_ncbi.pl这个文件的时候读取的文件里面下载网址是ftp开头的,但是实际我们下载下来网址是https开头的,所以只需要把这个文件里面的ftp改成https即可。

@shengxin450
Copy link

谢谢老师,我回去试试,还有想请问老师,就是rsync_from_ncbi.pl这个.pl文件在linux的什么位置?

@lynngao
Copy link
Author

lynngao commented Oct 10, 2021

谢谢老师,我回去试试,还有想请问老师,就是rsync_from_ncbi.pl这个.pl文件在linux的什么位置?

在kraken2的文件夹里

@shengxin450
Copy link

尊敬的lynngao老师,最近多有打扰,十分感谢老师您耐心的回答我的问题,处理这个问题太曲折了。先是按照您的指导,使用find命令找到了rsync_from_ncbi.pl 这个文件,手动 (就是将文件下载下来,修改后再替换原文件,因为我不会用linux命令在线修改)修改了rsync_from_ncbi.pl的第46行的https,结果还是报错,提示还是unexpected FTP path (new server?)故我怀疑修改的不彻底,kraken2依托的conda环境的rsync_from_ncbi.pl 也需要修改,故按照老师的指导将ftp改成https,还是报错(我都快崩溃
了,当然我知道肯定是我自己机器或者操作的问题),这次报错的内容是:~/.../download_genomic_library.sh: line 56: ~/.../miniconda3/envs/qc2/libexec/rsync_from_ncbi.pl: Permission denied,一看是文件权限问题,故顺藤摸瓜,在FileZilla将所有该文件的权限变为 “可执行” ,这才顺利跑通。十分感谢老师的启迪和指导,祝lynngao小姐姐工作顺利+学业有成!!Best wishes!Thank you very much!!

@Gambrian
Copy link

看了别的issue都没解决问题,到这里解决了,非常感谢
This worked for my device actually,Thanks

@adeflamingh
Copy link

I work with Kraken2 on a cluster computing system, and ran into the same rsync error as others (for multiple reference libraries/datasets). I asked the cluster admin to change the code on line 46 and that resolved the issue :)

@Tsingsjeen
Copy link

@shengxin450 @lynngao ,If you created the kraken2 environment by (mini)conda, so I paste my codes as the example, then you can follow the similar steps below and make the edition,

  1. conda activate the kraken2
  2. cd /tools/software/bioinfo-tools/miniconda/miniconda3/envs/kraken2/libexec
  3. vim rsync_from_ncbi.pl
  4. you can scroll up and down looking the lines as below:

if (! ($full_path =~ s#^ftp://${qm_server}${qm_server_path}/##)) {

  1. and then make the change:

if (! ($full_path =~ s#^https://${qm_server}${qm_server_path}/##)) {

  1. save and quit (:wq)

Good luck!

@Luponsky
Copy link

Luponsky commented Dec 2, 2021

worked for the kraken2 installed from conda, but I had to change the same line also from a local installation of kraken2.
Thanks,
L

@liaochenlanruo
Copy link

kraken2的数据库是超级难安装

@zhp2333
Copy link

zhp2333 commented Jun 3, 2024

Thank you very much. Very helpful!

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

8 participants