Skip to content

Issue 2 - AP_simulation 폴더에 포함된 AP_simulation.R 컴파일 에러 #4

@platanus-study

Description

@platanus-study

며칠 전에 github/CiPA/FDA에 올린 내용이지만, 다시한번 질문드립니다.

  • 'Error in sprintf("%s not found! Interpreting dose as nanomolar concentrations.")'의 에러에 관련한 상세 내용

     -Command used in Rstudio terminal tab-
    
     Rscript AP_simulation.R -d drug1 -x "1-10,15,20,25" --cmaxfile="my_cmax_table.csv" --hergpath="path/to/herg/results/" --hillpath="path/to/hill/results/"-
    
    
     -컴파일 결과 발생하는 에러
    
     loaded via a namespace (and not attached):
     [1] compiler_3.6.3 getopt_1.20.3
     Error in sprintf("%s not found! Interpreting dose as nanomolar concentrations.") :
    
     Calls: print -> sprintf
    
     -에러와 관련된 R 코드 부분(AP_simulation.R)
    
    #--- get therapeutic concentration (Cmax)
        if(drug=="control"){
          cmax<-0
        }else{
        if(!file.exists(cmaxfile)){
          cmax<-1
         print(sprintf("%s not found! Interpreting dose as nanomolar concentrations."))
        }else{
        drugtable<-read.csv(cmaxfile)
        cmax<-drugtable[as.character(drugtable$drug)==drug,"therapeutic"] # should be in nanomolar
        if(length(cmax)==0){
         cmax<-1
         print(sprintf("Cmax undefined, interpreting dose as nanomolar concentrations."))
        }else if(length(cmax)==1){
         print(sprintf("Cmax set to %g nM, interpreting dose as multiples of Cmax.",cmax))
        }else{
          stop("Multiple entries for %s therapeutic concentration!",drug)
        }
      }
     }
    
  • 문의사항
    [1] 한교수님께서 며칠 전에 언급하셨을 때, 스크립트만 테스트를 하고 실험 데이터가 없다면, command를 실행할 필요가 없다고 하셨습니다. 비록, 제가 cmax.csv파일을 가지고 있지않지만, 저는 꼭!! cmax.csv 샘플 파일을 이용하여 테스트를 하고 싶습니다. 혹시 한교수님께 cmax 샘플파일을 얻을 수 있는지요? 아니면 제가어떤 경로로 cmax.csv 데이터를 얻을 수 있는 방법을 알려주시기를 부탁드립니다.

그리고 위의 문의사항과 관련이 없지만, 한교수님께서 Issue 1에서 언급하신대로 CiPA 코드를 재현하기 위하여 shell (cmd)에서 Rscript 를 사용하여 실행해야 한다고 하셨는데, 제가 shell 기반에서 command를 실행한 후 발생되는 에러를 찾고자 R파일을 살펴보게 되었고.. 컴파일을 해보게 되었습니다. 한교수님께서 언급하신 것처럼 주의하면서 CiPA 코드를 재현해보겠습니다.

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions