Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mbb
waw
Commits
bcad6fa2
Commit
bcad6fa2
authored
May 13, 2022
by
khalid
Browse files
less verbose download
parent
c33b9280
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/dada2_assign_taxonomy/dada2_assign_taxonomy.script.R
View file @
bcad6fa2
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment