Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diphtOscan
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Biodiversity and Epidemiology of Bacterial Pathogens
diphtOscan
Commits
b51698d6
Commit
b51698d6
authored
1 year ago
by
mrethore
Browse files
Options
Downloads
Plain Diff
Merge branch 'absolute_paths' into 'main'
Absolute paths See merge request
!10
parents
95ce8aaa
1147a370
No related branches found
No related tags found
1 merge request
!10
Absolute paths
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
__main__.py
+5
-7
5 additions, 7 deletions
__main__.py
data/resistance/update_database_resistance.sh
+2
-4
2 additions, 4 deletions
data/resistance/update_database_resistance.sh
module/updating_database.py
+1
-2
1 addition, 2 deletions
module/updating_database.py
with
8 additions
and
13 deletions
__main__.py
+
5
−
7
View file @
b51698d6
...
@@ -342,19 +342,17 @@ if __name__ == "__main__":
...
@@ -342,19 +342,17 @@ if __name__ == "__main__":
basename
=
os
.
path
.
basename
(
genome
)
basename
=
os
.
path
.
basename
(
genome
)
strain
=
os
.
path
.
splitext
(
basename
)[
0
]
strain
=
os
.
path
.
splitext
(
basename
)[
0
]
fasta
=
f
"
{
get_path
}
/
{
genome
}
"
dict_genome
=
get_species_results
(
genome
,
args
.
path
+
'
/data/species
'
,
str
(
args
.
threads
))
dict_genome
=
get_species_results
(
fasta
,
args
.
path
+
'
/data/species
'
,
str
(
args
.
threads
))
if
args
.
mlst
:
if
args
.
mlst
:
cd_complex
=
is_cd_complex
(
dict_genome
)
cd_complex
=
is_cd_complex
(
dict_genome
)
dict_genome
.
update
(
get_chromosome_mlst_results
(
MLST_db
,
fasta
,
cd_complex
,
args
))
dict_genome
.
update
(
get_chromosome_mlst_results
(
MLST_db
,
genome
,
cd_complex
,
args
))
if
args
.
tox
:
if
args
.
tox
:
dict_genome
.
update
(
get_tox_results
(
TOX_db
,
fasta
,
args
))
dict_genome
.
update
(
get_tox_results
(
TOX_db
,
genome
,
args
))
if
args
.
resistance_virulence
:
if
args
.
resistance_virulence
:
min_identity
=
"
-1
"
# Defaut amrfinder
min_identity
=
"
-1
"
# Defaut amrfinder
os
.
system
(
'
amrfinder --nucleotide
'
+
fasta
+
os
.
system
(
'
amrfinder --nucleotide
'
+
genome
+
'
--name
'
+
strain
+
'
--name
'
+
strain
+
'
--nucleotide_output
'
+
args
.
outdir
+
"
/
"
+
strain
+
"
.prot.fa
"
+
'
--nucleotide_output
'
+
args
.
outdir
+
"
/
"
+
strain
+
"
.prot.fa
"
+
'
--output
'
+
args
.
outdir
+
"
/
"
+
strain
+
"
.blast.out
"
+
'
--output
'
+
args
.
outdir
+
"
/
"
+
strain
+
"
.blast.out
"
+
...
@@ -377,7 +375,7 @@ if __name__ == "__main__":
...
@@ -377,7 +375,7 @@ if __name__ == "__main__":
if
args
.
integron
:
if
args
.
integron
:
os
.
system
(
'
integron_finder --cpu
'
+
str
(
args
.
threads
)
+
os
.
system
(
'
integron_finder --cpu
'
+
str
(
args
.
threads
)
+
'
--outdir
'
+
args
.
outdir
+
"
/
"
+
'
--outdir
'
+
args
.
outdir
+
"
/
"
+
'
--gbk --func-annot --mute
'
+
fasta
)
'
--gbk --func-annot --mute
'
+
genome
)
os
.
system
(
'
find
'
+
args
.
outdir
+
"
/Results_Integron_Finder_*/
"
+
'
-empty -type d -delete
'
)
os
.
system
(
'
find
'
+
args
.
outdir
+
"
/Results_Integron_Finder_*/
"
+
'
-empty -type d -delete
'
)
files
=
pd
.
read_csv
(
args
.
outdir
+
"
/Results_Integron_Finder_
"
+
strain
+
"
/
"
+
strain
+
"
.summary
"
,
sep
=
"
\t
"
,
index_col
=
0
,
skiprows
=
1
)
files
=
pd
.
read_csv
(
args
.
outdir
+
"
/Results_Integron_Finder_
"
+
strain
+
"
/
"
+
strain
+
"
.summary
"
,
sep
=
"
\t
"
,
index_col
=
0
,
skiprows
=
1
)
...
...
This diff is collapsed.
Click to expand it.
data/resistance/update_database_resistance.sh
+
2
−
4
View file @
b51698d6
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
PATH_DB
=
$(
dirname
"
$0
"
)
PATH_DB
=
$(
dirname
"
$0
"
)
DATE
=
$(
date
"+%Y-%m-%d"
)
DATE
=
$(
date
"+%Y-%m-%d"
)
## Update Antimicrobial_resistance/AMRFinderPlus
## Update Antimicrobial_resistance/AMRFinderPlus
wget
--quiet
--recursive
--no-host-directories
--cut-dirs
=
6 ftp://ftp.ncbi.nlm.nih.gov/pathogen/Antimicrobial_resistance/AMRFinderPlus/database/latest/
-P
$PATH_DB
/
$DATE
wget
--quiet
--recursive
--no-parent
--no-host-directories
--cut-dirs
=
6
-e
robots
=
off https://ftp.ncbi.nlm.nih.gov/pathogen/Antimicrobial_resistance/AMRFinderPlus/database/latest/
-P
$PATH_DB
/
$DATE
version_DB
=
$(
cat
$PATH_DB
/
$DATE
/version.txt
)
version_DB
=
$(
cat
$PATH_DB
/
$DATE
/version.txt
)
echo
"Looking up databases at https://ftp.ncbi.nlm.nih.gov/pathogen/Antimicrobial_resistance/AMRFinderPlus/database/"
echo
"Looking up databases at https://ftp.ncbi.nlm.nih.gov/pathogen/Antimicrobial_resistance/AMRFinderPlus/database/"
echo
"Downloading AMRFinder database version
$version_DB
"
echo
"Downloading AMRFinder database version
$version_DB
"
...
@@ -38,6 +38,4 @@ echo -e "Corynebacterium_diphtheriae\tCorynebacterium_diphtheriae\t0" >> $PATH_D
...
@@ -38,6 +38,4 @@ echo -e "Corynebacterium_diphtheriae\tCorynebacterium_diphtheriae\t0" >> $PATH_D
PATH_DB
=
"
$PATH_DB
/
$DATE
"
PATH_DB
=
"
$PATH_DB
/
$DATE
"
VERSION
=
"
$DATE
"
VERSION
=
"
$DATE
"
echo
"Database directory: '
$PATH_DB
'"
echo
"Database directory: '
$PATH_DB
'"
echo
"Database version:
$DATE
.1"
echo
"Database version:
$DATE
.1"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
module/updating_database.py
+
1
−
2
View file @
b51698d6
...
@@ -18,5 +18,4 @@ def update_database(arguments, mlst_database:tuple, tox_database:tuple):
...
@@ -18,5 +18,4 @@ def update_database(arguments, mlst_database:tuple, tox_database:tuple):
print
(
"
... done
\n
"
)
print
(
"
... done
\n
"
)
os
.
system
(
'
bash
'
+
arguments
.
path
+
'
/data/resistance/update_database_resistance.sh
'
)
os
.
system
(
'
bash
'
+
arguments
.
path
+
'
/data/resistance/update_database_resistance.sh
'
)
print
(
"
... done
\n\n\n
"
)
print
(
"
... done
\n\n\n
"
)
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment