Lall

couldn't open "uniprot.md5": permission denied while executing "open uniprot.md5 w" (procedure "CheckNewUniProt" line 14) invoked from within "CheckNewUniProt"

OUTPUT BUFFER:

source /usr/local/apache2/PourRivet/SessionBeforeScript.tcl #!/usr/local/bin/tclsh cd /genomics/link/genomes/uniprot_genomes 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 package require tdom if {! [file exists uniprot.md5]} { set o [open uniprot.md5 w] puts $o "FIRSTTIME" close $o } proc CheckNewUniProt {} { set Lall [UniProtProteome] puts "Lall $Lall" set tmd5 [::md5::md5 -hex $Lall] set omd5 [LesLignesDuFichier uniprot.md5] if {$omd5 eq $tmd5} { # same md5, just return puts "\nNo changes !\n" return 0 } # save new md5 set o [open uniprot.md5 w] puts $o $tmd5 close $o # save native gold data file delete uniprot.txt set o [open uniprot.txt w] puts $o [join $Lall \n] close $o return $Lall } proc ProcessUniProt {Lall} { set Lref [UniProtProteome 1] # get information for taxa IDs set db "root" sqlite3 $db /genomics/link/taxonomy/uniprot_taxonomy/uniprot_taxonomy.sql set Lnrl [$db eval "select taxid,Name,Rank,Lineage from taxonomy where taxid in ([join $Lall ,])"] $db close set Lins [list] foreach {id Name Rank Lineage} $Lnrl { lappend IIdOut $id if {$id in $Lref} { set IsRef 1 } else { set IsRef 0 } # extract Domain set Lv [split $Lineage ";"] set dom [lindex $Lv 0] if {$dom eq "cellular organisms"} { set dom [string trim [lindex $Lv 1]] } lappend Lins [list $id $Name $dom $Rank $Lineage $IsRef] } return $Lins } proc CreateDatabase {Ll} { # write data to be inserted if {[file exists ins.tab]} { file delete ins.tab } set o [open ins.tab w] foreach l $Ll { puts $o "-\t[string map {"'" "''"} [join $l \t]]" } close $o # delete existing database if {[file exists uniprot_genomes.sql]} { file delete uniprot_genomes.sql } # create table # # TaxID Name Domain Rank Lineage IsRef set table " - genomes : { . pk_genomes P . taxid I . Name V64 . Domain V16 . Rank V32 . Lineage V256 . IsRef I }" set db [FabriqueDeTables $table "" uniprot_genomes.sql] $db copy abort genomes ins.tab "\t" "-" $db eval {create index idx_taxid on genomes (taxid)} $db eval {create index idx_name on genomes (Name)} $db close return } set Lins [list] if {[set out [CheckNewUniProt]] != 0} { set Lins [ProcessUniProt $out] } if {$Lins != {} } { CreateDatabase $Lins } exit