diff --git a/__main__.py b/__main__.py index eece02f45aa92e379b6e400243a330729395b94f..8eebbd9ca9bc44e357492e9a5bd26c3dde7403ca 100644 --- a/__main__.py +++ b/__main__.py @@ -342,19 +342,17 @@ if __name__ == "__main__": basename = os.path.basename(genome) strain = os.path.splitext(basename)[0] - fasta = f"{get_path}/{genome}" - dict_genome = get_species_results(fasta, args.path + '/data/species', str(args.threads)) - + dict_genome = get_species_results(genome, args.path + '/data/species', str(args.threads)) if args.mlst : 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 : - dict_genome.update(get_tox_results(TOX_db, fasta, args)) + dict_genome.update(get_tox_results(TOX_db, genome, args)) if args.resistance_virulence : min_identity = "-1" # Defaut amrfinder - os.system('amrfinder --nucleotide ' + fasta + + os.system('amrfinder --nucleotide ' + genome + ' --name '+strain+ ' --nucleotide_output ' + args.outdir + "/" + strain + ".prot.fa" + ' --output '+ args.outdir + "/" + strain + ".blast.out" + @@ -377,7 +375,7 @@ if __name__ == "__main__": if args.integron : os.system('integron_finder --cpu ' + str(args.threads)+ ' --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') files = pd.read_csv(args.outdir + "/Results_Integron_Finder_"+strain + "/" + strain+".summary",sep="\t", index_col=0, skiprows = 1) diff --git a/data/resistance/update_database_resistance.sh b/data/resistance/update_database_resistance.sh index 8d727dc098d3de9226527aa9b9658381522e4860..9bd17119a9ed674e9a3258f7a96806b7e61ba48b 100644 --- a/data/resistance/update_database_resistance.sh +++ b/data/resistance/update_database_resistance.sh @@ -3,8 +3,8 @@ PATH_DB=$(dirname "$0") DATE=$(date "+%Y-%m-%d") ## 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) echo "Looking up databases at https://ftp.ncbi.nlm.nih.gov/pathogen/Antimicrobial_resistance/AMRFinderPlus/database/" echo "Downloading AMRFinder database version $version_DB" @@ -38,6 +38,4 @@ echo -e "Corynebacterium_diphtheriae\tCorynebacterium_diphtheriae\t0" >> $PATH_D PATH_DB="$PATH_DB/$DATE" VERSION="$DATE" echo "Database directory: '$PATH_DB'" -echo "Database version: $DATE.1" - - +echo "Database version: $DATE.1" \ No newline at end of file diff --git a/module/updating_database.py b/module/updating_database.py index 649ca2dffa3b0d278c7e5da67a7eae3af1def3db..075c7b684b04bfa02d3e4157e9d8ae2bf9ca7bae 100644 --- a/module/updating_database.py +++ b/module/updating_database.py @@ -18,5 +18,4 @@ def update_database(arguments, mlst_database:tuple, tox_database:tuple): print(" ... done \n") os.system('bash ' + arguments.path + '/data/resistance/update_database_resistance.sh') - print(" ... done \n\n\n") - \ No newline at end of file + print(" ... done \n\n\n") \ No newline at end of file