R Under development (unstable) (2026-01-22 r89323 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # test.ISOpureS2.model_optimize.cc_functions.R #################################################### > # Testing script for functions needed in the optimilzation of mm in Step 2 > # Test cc separately since it takes a while... > # > # The functions are of the form ISOpureS2.model_optimize.--- > # (cc) > # cc_loglikelihood > # cc_deriv_loglikelihood > > # LOAD DATA ####################################################################################### > # load library > library(ISOpureR); > > # load the data from that path > data.path <- paste0(file.path(system.file(package = "ISOpureR"), 'extdata', 'Beer')); > load(file.path(data.path , 'beer.tumordata.250.transcripts.30.patients.RData')); > load(file.path(data.path, 'beer.ISOpureS2model.250.transcripts.30.patients.RData')); > > # the normaldata and tumourdata should be matrices > beer.tumordata <- as.matrix(beer.tumordata); > > # TEST CC FUNCTIONS ############################################################################### > > # inputs needed for cc functions > # initial value of cc (this is testing just patient 1) > ww <- t(ISOpureS2model$cc_weights[1, , drop=FALSE]); > > # test cc functions (just for patient 1, that's the third entry) > ISOpureS2.model_optimize.cc.cc_loglikelihood(ww, beer.tumordata, 1, ISOpureS2model); [1] 2345785 > ISOpureS2.model_optimize.cc.cc_deriv_loglikelihood(ww, beer.tumordata, 1, ISOpureS2model); [,1] 10_at 0.0000000000 100_at -0.0418811996 1000_at -0.0270605215 10007_at -0.0418698998 10009_at -0.0267777672 1001_at -0.0456142280 10010_at -0.0268613068 100129762_at -0.2775753022 100130130_at -0.0332133542 100131164_at -0.0478476985 100132596_at -0.0284232922 100132779_at -0.0851234496 100133166_at -0.0310021497 1002_at -0.1626191143 10024_at -0.0816553735 10026_at -0.0294029955 1003_at 0.1472209672 10036_at -0.0522736098 1004_at -0.0179553650 10046_at -0.0370905698 10059_at -0.0158372215 1006_at -0.0112057109 10062_at 0.2399002041 10063_at -0.8848379075 10075_at 0.1752789848 10076_at 0.0659501191 1009_at -0.4765588524 10093_at 0.0381940487 10095_at -0.0922198221 10099_at -0.4889785707 101_at -0.0986558590 1010_at -0.0200664784 10102_at -0.0659954511 10105_at -0.1279728283 10106_at 0.1228984069 10109_at -0.0222604288 10111_at -0.3691627899 10114_at -0.0196178590 1012_at -0.0252131136 10120_at 0.0402209588 10121_at -0.0862078541 10128_at -0.0336806168 10129_at 0.1414376847 1013_at 0.3611471007 10130_at -0.2364949649 10131_at 0.0414465640 10134_at -0.2788009400 10138_at -0.0724438225 10139_at 0.0868198269 10140_at -0.0689012895 10141_at -0.0820574696 10142_at -0.0265528001 10146_at -0.2782958404 10148_at -0.0202017353 10149_at -0.0244973978 1015_at -0.0072711359 10151_at -0.0262182443 10152_at -0.0526047601 10153_at -0.0212828192 10155_at -0.2625985820 10158_at 0.1222700174 1016_at 0.0017557766 10162_at 0.0327767983 10165_at -0.0403908766 10168_at -0.0268659857 1017_at -0.0417531096 10180_at -0.0346903109 10181_at -0.0052062677 10184_at -0.0450713476 10188_at 0.0542066423 1019_at 0.0380934057 10190_at -0.0180442202 10195_at -0.0837589027 10197_at -0.0522308936 102_at -0.0459878278 1020_at -0.3162204956 10200_at -0.0121104459 10202_at -0.0273932940 10203_at -0.0243668472 10204_at 0.0698850374 10208_at 0.3821977777 10209_at -0.4425692566 1021_at -0.0171750041 10212_at -0.0431578720 10213_at -0.0293943015 10215_at -0.0182230454 10216_at -0.0266854425 1022_at -0.0186759604 10221_at 0.2160491003 10223_at -0.0294586887 10225_at -0.0121184138 10227_at 0.0469679946 10231_at -0.0283810281 10232_at -0.0952334254 10233_at 0.3128505207 10234_at -0.0498253785 10237_at -0.4572308137 10238_at -0.0622780760 10239_at -0.0092539303 1024_at -0.0310350149 10240_at -0.0273007888 10241_at -0.0053270567 10244_at -0.0389848717 10246_at -0.0103542462 10247_at 0.1884230051 1025_at -0.1332349260 10255_at 0.5946606988 1026_at -0.0217598340 10260_at 0.3793571262 10265_at -0.0290916839 10274_at -0.0148833451 10276_at -0.3428786093 1028_at -0.0266267876 10280_at -0.0141866946 10282_at -0.0354446459 10284_at -0.0365858736 10287_at 0.5028193690 1029_at -0.0143187025 10291_at -0.2524272392 10293_at -0.0343174771 10299_at -0.0447304943 103_at 0.1558461721 1030_at -0.0221349157 10308_at 0.0155148099 10309_at -0.1214836000 10312_at 0.0238456402 10318_at -0.2052402836 1032_at -0.0382930455 10320_at -0.0012564461 10321_at -0.0259058690 10322_at -0.0346819164 10325_at -0.0192012167 10326_at -0.0748211679 10327_at -0.7248849904 1033_at -0.0357541565 10345_at -0.0253691685 10346_at -0.0453929887 1036_at -0.0388504132 10370_at -0.0970787991 10371_at -0.0302184123 10379_at 0.7674869787 1038_at -0.0044896862 10381_at -0.0306780321 10382_at 0.0680665804 10385_at 0.0218378714 1039_at 0.1116832735 10397_at -0.5203050672 10398_at -0.0252231143 10399_at -0.8764650847 104_at -0.0156226178 1040_at -0.0236615998 10406_at -1.5551526479 1041_at -0.6070979543 10413_at -0.0351041008 10419_at -0.0245381413 10426_at -0.0058136537 10428_at -0.0366799184 1043_at -0.0302226365 10436_at -0.0682882303 10437_at -0.0281243368 10439_at -0.0255149008 1044_at -0.0397587384 10440_at 0.0004355984 10444_at -0.0527324883 10449_at -0.0004350915 1045_at -0.0551218500 10454_at -0.0403930889 10456_at -0.0502524662 10457_at -0.0136412892 10461_at 0.0867702353 10462_at 0.0347889769 10468_at -0.0250345615 10469_at -0.0097318280 10472_at -0.0180640833 10473_at -0.0257457808 10475_at -0.0279712024 10479_at -0.0121478817 1048_at 0.9945129963 10481_at -0.0440758633 10482_at 0.1334302823 10483_at -0.1185168630 10484_at 0.0221023309 10485_at 0.0198566411 10487_at 0.0425007633 10488_at -0.0838197808 10489_at 0.0536883334 10493_at -0.0507501036 10494_at 0.1113760504 10495_at 0.3485045673 10499_at -0.0295404994 1050_at -0.0371707099 10507_at -0.4437756486 10512_at -0.0319846288 10513_at -0.0251753293 10519_at 0.5441904276 1052_at -0.0243748242 10520_at -0.0383201138 10521_at -0.0499372667 10523_at 0.0464114738 10524_at -0.0611512984 10525_at -0.0706730026 1053_at -0.0313887907 10536_at -0.0350335772 10538_at 0.0198834374 1054_at -0.0058209570 10540_at 0.1641969617 10541_at -0.0164632770 10544_at -0.0473041906 10548_at 0.2859104689 10549_at 0.0138564489 10552_at -0.1179335992 10554_at -0.0446330970 10555_at -0.1089832386 10556_at -0.0303721320 10557_at 0.0257904287 10559_at 0.8301881912 1056_at -0.0207126973 10561_at 0.0006436308 1057_at -0.1198489543 10573_at -0.0285303674 10574_at -0.1711042456 10575_at 1.6036441210 10576_at -0.1570196208 10577_at 1.1057617979 10578_at -0.0862571825 1058_at -0.0131887684 10581_at -0.0237703322 10588_at -0.0386222972 10589_at -0.0033007562 1059_at -0.7162046797 1060_at -0.0169387595 10606_at -0.0376246171 10607_at -0.0674384288 10609_at -0.0489408428 10610_at -0.0286704811 10618_at -0.1216781569 1062_at -0.0051259997 10623_at -0.0440165551 10627_at -0.0910993659 10628_at 0.0295772174 1063_at -0.0410932187 10631_at -0.1250944691 10633_at -0.0857949685 10634_at -0.0420826807 10638_at -0.0259720290 10640_at -0.0993395932 10643_at -0.0014557496 10653_at 0.6414549700 10654_at -0.0310975332 10657_at -0.1045774548 > > # remove parameters used in the test > rm(K, ww); Warning message: In rm(K, ww) : object 'K' not found > > proc.time() user system elapsed 0.23 0.06 0.28