Question: MSnbase package, Error in downloading data file "PXD000001" from PRIDE Repository by pxget function
0
gravatar for fgol
9 months ago by
fgol10
fgol10 wrote:

Hello,

I want to download this raw data file "PXD000001" from the PRIDE repository. However I faced with the below Error:

library("MSnbase")
library("rpx")
px1 <- PXDataset("PXD000001")
mzf <- pxget(px1, 6)


Downloading 1 file
trying URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/README.txt'
Error in download.file(urls[i], toget[i], ...) : 
  cannot open URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/README.txt'
In addition: Warning message:
In download.file(urls[i], toget[i], ...) :
  InternetOpenUrl failed: 'The login request was denied

> ms <- openMSfile(mzf)
Error in openMSfile(mzf) : object 'mzf' not found

Can you please advice me how can I fix this problem and successfully download this data into my RStudio?

Thank you very much.

ADD COMMENTlink modified 9 months ago by Laurent Gatto1.2k • written 9 months ago by fgol10
Answer: MSnbase package, Error in downloading data file "PXD000001" from PRIDE Repositor
0
gravatar for Laurent Gatto
9 months ago by
Laurent Gatto1.2k
Belgium
Laurent Gatto1.2k wrote:

It looks like there was a problem to access and download files from the PRIDE ftp server. Things seem to work on my end now:

> library(rpx)
> px1 <- PXDataset("PXD000001")
> px1
Object of class "PXDataset"
 Id: PXD000001 with 12 files
 [1] 'F063721.dat' ... [12] 'generated'
 Use 'pxfiles(.)' to see all files.
> pxfiles(px1)
 [1] "F063721.dat"                                                         
 [2] "F063721.dat-mztab.txt"                                               
 [3] "PRIDE_Exp_Complete_Ac_22134.xml.gz"                                  
 [4] "PRIDE_Exp_mzData_Ac_22134.xml.gz"                                    
 [5] "PXD000001_mztab.txt"                                                 
 [6] "README.txt"                                                          
 [7] "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzML" 
 [8] "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzXML"
 [9] "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.mzXML"         
[10] "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.raw"           
[11] "erwinia_carotovora.fasta"                                            
[12] "generated"                                                           
> mzf <- pxget(px1, 6)
Downloading 1 file
trying URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/README.txt'
Content type 'unknown' length 1645 bytes
==================================================
> mzf
[1] "/home/lg390/tmp/README.txt"

There is however another point you need to be careful with. File number 6 isn't a raw file, but the README file. You need to first check file indices to identify those that you want to downloaded. In this case, it seems to be file number 7.

> mzf <- pxget(px1, 7)
Downloading 1 file
trying URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzML'
Content type 'unknown' length 450032788 bytes (429.2 MB)
==================================================
> mzf
[1] "/home/lg390/tmp/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzML"
> openMSfile(mzf)
Mass Spectrometry file handle.
Filename:  TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzML 
Number of scans:  7534
ADD COMMENTlink written 9 months ago by Laurent Gatto1.2k

Dear Laurent, Thank you very much. You are right, it shows file number 6 is README file. However, still I have the same problem when I try to open file number 7, and also 8.

> px1 <- PXDataset("PXD000001")
> mzf <- pxget(px1, 7)
Downloading 1 file
trying URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzML'
Error in download.file(urls[i], toget[i], ...) : 
  cannot open URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzML'
In addition: Warning message:
In download.file(urls[i], toget[i], ...) :
  InternetOpenUrl failed: 'The login request was denied'


> mzf <- pxget(px1, 8)
Downloading 1 file
trying URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzXML'
Error in download.file(urls[i], toget[i], ...) : 
  cannot open URL 'ftp://ftp.pride.ebi.ac.uk/pride/data/archive/2012/03/PXD000001/TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzXML'
In addition: Warning message:
In download.file(urls[i], toget[i], ...) :
  InternetOpenUrl failed: 'The login request was denied'
ADD REPLYlink written 9 months ago by fgol10

This could be something on your side. Are you behind a firewall? Could you try to set setInternet2(TRUE) or see these other related issues: https://stackoverflow.com/questions/33355444/r-when-trying-to-install-package-internetopenurl-failed and https://stackoverflow.com/questions/25599943/unable-to-install-packages-in-latest-version-of-rstudio-and-r-version-3-1-1.

ADD REPLYlink written 9 months ago by Laurent Gatto1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 165 users visited in the last hour