Commit bcad6fa2 authored by khalid's avatar khalid
Browse files

less verbose download

parent c33b9280
......@@ -50,19 +50,22 @@ library(yaml)
yamlfile = paste0(Taxonomypath, "/info.yaml")
taxURL = read_yaml(yamlfile)$train_set
#http://genoweb.toulouse.inra.fr/frogs_databanks/assignation/COI/BOLD_COI-5P/BOLD_COI-5P_022019.tar.gz to BOLD_COI-5P_022019.tar.gz
frogsfile = paste0(Taxonomypath, basename(taxURL))
frogsfile = paste0(Taxonomypath,"/", basename(taxURL))
marker = gsub(".tar.gz", "", basename(taxURL))
taxfile = paste0(Taxonomypath, "/train_set_",marker,".fa.gz")
speciesfile = paste0(Taxonomypath, "/assignment_",marker,".fa.gz")
if ( ! file.exists(taxfile))
{
download.file(taxURL, frogsfile, "wget")
cmd = paste0("cd ",Taxonomypath," && tar -xzf ",frogsfile," && rm -f ", frogsfile);
print(paste0("downloading Frogs trained dataset from :", taxURL))
download.file(taxURL, frogsfile, "wget", quiet = TRUE)
cmd = paste0("cd ",Taxonomypath," && tar -xzf ",frogsfile)
system(cmd)
unzipedDir = gsub(".tar.gz", "", frogsfile)
unlink(frogsfile);
print("converting to dada2 compatible format")
MBBmakeTaxonomyFasta_RDP(paste0(unzipedDir, "/",marker,".fasta"), paste0(unzipedDir, "/",marker,".tax"), taxfile, compress=TRUE)
unlink(unzipedDir, recursive = TRUE, force = TRUE)
speciesURL = read_yaml(yamlfile)$species_assignment
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment