Wednesday, 22 May 2024 02:51:38

couldn't open "taxdump.tar.gz.md5": permission denied while executing "open taxdump.tar.gz.md5 w" (procedure "CheckMD5" line 11) invoked from within "CheckMD5"

OUTPUT BUFFER:

source /usr/local/apache2/PourRivet/SessionBeforeScript.tcl #!/usr/local/bin/tclsh cd /genomics/link/taxonomy/ncbi_taxonomy set ORDALIDIR /home/moumou/ordali set OrdaliDir $ORDALIDIR source /home/moumou/ordali/src/ordali_source.tcl source /home/ripp/gscope/gscope_outils.tcl package require http package require tls package require sqlite3 package require md5 proc InitTable {} { set table " - nodes : { . taxid P . parent I . rank V32 . embl V2 . divisionid I . inherited_div_flag I (0 ou 1) . genetic_code I . inherited_GC I . mitochondrial_GC I . inherited_MGC I . genbank_hidden_flag I (0 or 1) . hidden_subtree_flag I . comments V32 } - names : { . pk_names P . taxid I . name V256 . unique_name V128 . name_class V64 } - division : { . divisionid I . division_code V3 . division_name V32 . comments V64 } - gencode : { . genetic_code_id I . abbreviation I . name V128 . cde V128 . starts V128 } - citations : { . cit_id I . cit_key V256 . pubmid_id I . medline_id I . url T . text T . taxid_list T } - merged : { . old I . new I } - delnodes : { . delid I }" # cleaning .... file rename -force ncbi_taxonomy.sql old_ncbi_taxonomy.sql file delete *.dat puts "deletion done" # create db set db [FabriqueDeTables $table "" ncbi_taxonomy.sql] puts "db created" # expand archive exec tar -zxf taxdump.tar.gz puts "un-tar done" # load db ... set Ldmp [glob *.dmp] foreach f $Ldmp { puts "\n$f" #set Ll [LesLignesDuFichier $f] set cont [ContenuDuFichier $f] set cont [string map {"\t\|\n" "LuCkYlUc67"} $cont] set cont [string map {"\n" " "} $cont] set cont [string map {"LuCkYlUc67" " \n"} $cont] set Ll [split $cont \n] set ofile "[file rootname $f].dat" set o [open $ofile w] if {[file rootname $f] eq "names"} { set add "\t|\t" } else { set add "" } foreach l $Ll { puts $o "$add[string range $l 0 end-2]" } close $o # insert into db $db copy abort "[file rootname $f]" "[file rootname $f].dat" "\t\|\t" "" } $db eval {create index idx_nodes on nodes (parent,rank)} $db eval {create index idx_names on names (taxid,name,unique_name)} $db close return } proc CheckMD5 {} { set url "http://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz.md5" set tmd5 [HttpCopy $url] set omd5 [ContenuDuFichier taxdump.tar.gz.md5] if {$tmd5 eq $omd5} { return 0 } # save current md5 set o [open taxdump.tar.gz.md5 w] puts $o $tmd5 close $o # now load new archive file delete taxdump.tar* set url "http://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz" set url "ftp://ftp.ncbi.nih.gov/pub/" #set tgz [::http::geturl $url -binary 1] #set tgz [HttpCopy $url] package require ftp set url "ftp.ncbi.nih.gov" set hdl [::ftp::Open $url "anonymous" "luc.moulinier@unistra.fr"] puts "pwd [::ftp::Pwd $hdl]" ::ftp::Cd $hdl "pub/taxonomy" puts "cd done" ::ftp::Type $hdl binary puts "binary done" ::ftp::Get $hdl "taxdump.tar.gz" puts "get file done .." ::ftp::Close $hdl puts "close done" if {0} { #set tgz [zlib decompress $tgz] set o [open taxdump.tar w] puts $o $tgz close $o } return 1 } puts "\n[DonneDateEtHeure]" if {[CheckMD5]} { InitTable } puts "\n[DonneDateEtHeure]" exit