Hi,
Yes, the demo data location is now different from the original location. The new location is here:
ftp://ftp.microbio.me/pub/restroom-data/study_1335_split_library_seqs_and_mapping.zip
So, try running the following set of commands which worked for me:
#Download first
zipftp = “ftp://ftp.microbio.me/pub/restroom-data/study_1335_split_library_seqs_and_mapping.zip”
#Follow the tutorial’s instructions to process the file further so your file of interested will be the biom file:
zipfile = tempfile(“RestroomBiogeography”)
download.file(zipftp, zipfile)
import_dir ← tempdir()
unzip(zipfile, exdir = import_dir)
biomfile = paste0(import_dir, “/study_1335_closed_reference_otu_table.biom”)
biom = import_biom(biomfile, parseFunction = parse_taxonomy_greengenes)
#Test the final imported file
biom
#biom file should look like this
phyloseq-class experiment-level object
otu_table() OTU Table: [ 4467 taxa and 109 samples ]
tax_table() Taxonomy Table: [ 4467 taxa by 7 taxonomic ranks ]
Hi Valerie,
The first command is working,the ziptfile= tempfile action is working as well but when I try to do the download.file (zipftp, zipfile). This is the message I got :download.file(zipftp, zipfile)
trying URL ‘ftp://ftp.microbio.me/pub/restroom-data/study_1335_split_library_seqs_and_mapping.zip’
Content type ‘unknown’ length 14700487 bytes (14.0 MB)
Error in download.file(zipftp, zipfile) :
cannot open URL ‘ftp://ftp.microbio.me/pub/restroom-data/study_1335_split_library_seqs_and_mapping.zip’
My PI, Dr. Kerr, tried as well and got the same error message.
What do we do?
contuniation of error message:
In addition: Warning messages:
1: In download.file(zipftp, zipfile) :
downloaded length 0 != reported length 0
2: In download.file(zipftp, zipfile) :
URL ‘ftp://ftp.microbio.me/pub/restroom-data/study_1335_split_library_seqs_and_mapping.zip’: Timeout of 60 seconds was reached
Hi. Here is the solution that should alternatively work:
a) Use pre-downloaded .zip file instead of downloading it from the website: Download the file (we renamed to “restroom.zip”) using the link below (instead of the one provided in the website).
#After download, I dragged the file to the Desktop (you can use a different directory)
#After download, the folder you downloaded will be called “restroom”.
b) Follow the adjusted code below to load the file. Note, I downloaded the folder to my Desktop, so in the code below, you will see that, but you can set a different directory. I suggest to set working directory to the directory where your restroom.zip file will be. In my case it’s ~/Desktop/C-MOOR/Phyloseq.
#Load phyloseq
library(phyloseq)
#Set working directory to Desktop
setwd("~/Desktop/")
#Import data
zipfile2 = ("~/Desktop/restroom.zip")
#create the temporary directory for the unpacked file(s) from the .zip file.
import_dir <- tempdir()
#Import from the sample data file.
sdfile = paste0(import_dir, "/study_1335_mapping_file.txt")
sample_metadata = import_qiime_sample_data(sdfile)
#Import from the .biom file.
biomfile = paste0(import_dir, "/study_1335_closed_reference_otu_table.biom")
biom = import_biom(biomfile, parseFunction = parse_taxonomy_greengenes)
biom
c) Let us know if that works and we can continue troubleshooting.