N.I.M.R.O.D.  

inAndOutUser.f90

Go to the documentation of this file.
00001 !------------------------------------------------------------------------------
00002 ! N.I.M.R.O.D. - Normal approximation Inference in Models with Random
00003 !                effects based on Ordinary Differential equations
00004 !------------------------------------------------------------------------------
00005 !
00006 ! VERSION : 1.0
00007 !
00008 ! MODULE: IOUser.f90 function readData
00030 subroutine readData()
00031 
00032 
00033    call readPK()
00034   ! call readWriteDataTraitement()
00035 end subroutine readData
00036 
00037 !------------------------------------------------------------------------------
00038 ! N.I.M.R.O.D. - Normal approximation Inference in Models with Random
00039 !                effects based on Ordinary Differential equations
00040 !------------------------------------------------------------------------------
00041 !
00042 ! VERSION : 1.0
00043 !
00044 ! MODULE: IOUser.f90 function readPK
00064 subroutine readPK()
00065     use WorkingSharedValues
00066     use mpimod
00067     implicit none
00068     integer :: i,j,k,iii,jjj,kkk,compteur
00069     double precision, dimension(npmcomp+3)::donneesLues
00070 
00071     !
00072     !*** File must end by -99
00073     !*** -99 represent unobserved measurments
00074     !*** Here data structure is :
00075     !*** patient identifier, time, CV, CD4
00076     !
00077 
00078        open(2,file=biomarkersFile,status="old")
00079          read(2,*)
00080          nbobs=0
00081          donnees=0.d0
00082          read(2,*) donneesLues(1:npmcomp+3)
00083          do i=1,nbpatienta ! No more than nbpatienta subjects
00084             if (donneesLues(1) .eq. -99) exit
00085             idpat(i)=donneesLues(1)
00086             dose(i)=donneesLues(4)
00087             do j=1,30 ! No more than 30 measurement by subject
00088                do k=1,npmcomp
00089                   if (donneeslues(k+2).ne.-99 .and.donneeslues(2).le.tdef2) then
00090                      nbobs(i,k)= nbobs(i,k)+1 ! augmenter le nb d obs de i
00091                      schedule(i,nbobs(i,k),k)=donneeslues(2) ! releve tps
00092                      donnees(i,nbobs(i,k),k)=donneeslues(k+2) ! observ comp.
00093                   end if
00094                end do
00095                read(2,*) donneeslues(1:npmcomp+3)
00096                if (donneeslues(1) .ne. idpat(i) ) exit
00097             end do
00098          end do
00099          close (2)
00100          nbpatient=i-1
00101 
00102     ! *** Data Transformation
00103     call putObservationModel(donnees)
00104 
00105     ! *** Summary
00106 
00107     if((numproc.EQ.0).and.(LOG_PRINT))write(0,*)"! *** Available data : ReadHIV()  "
00108     if ((numproc.EQ.0).and.(LOG_PRINT)) write(0,*)"Patient number in study : ",nbpatient
00109     do k=1,npmcomp
00110         if ((numproc.EQ.0).and.(LOG_PRINT)) write(0,*)"Data available for comp.",k," : ",sum(nbobs(:,k))
00111     end do
00112     if ((numproc.EQ.0))flush(0)
00113 
00114     return
00115 end subroutine readPK
00116