startRun <- 0 endRun <- 639 runIndex="" lengthAll <- 3201157 shift <- 5000 intervallAll <- 10000 over <- intervallAll%/%shift N1 <- lengthAll%/%shift endRunAll <- (N1-over+1) # 639 avibdLength <- list() avibdPos <- list() count <- 0 for (posAll in (startRun+1):(endRun+1)) { start <- (posAll-1)*shift end <- start + intervallAll if (end > lengthAll) { end <- lengthAll } pRange <- paste("_",format(start,scientific=FALSE),"_",format(end,scientific=FALSE),sep="") load(file=paste("resIBD_chr1",pRange,"annot.Rda",sep="")) noIBD <- length(IBDannot) count <- count + noIBD if (noIBD>0) { avibdPos[[posAll]] <- sapply(IBDannot,function(x) {x[[4]]} , simplify=FALSE) avibdLength[[posAll]] <- sapply(IBDannot,function(x) {x[[5]]} , simplify=FALSE) } } ibdPos <- unlist(avibdPos) ibdLength <- unlist(avibdLength) ibdSim <- cbind(ibdPos,ibdLength) dups <- duplicated(ibdSim) un <- which(dups==FALSE) length(ibdPos) length(ibdLength) length(un) count save(dups,un,file=paste("resDups",runIndex,".Rda",sep=""))