From 4187a267a38646e97ac708c35935146b21196c7b Mon Sep 17 00:00:00 2001 From: Sean Maden Date: Wed, 23 Nov 2022 08:45:35 -0800 Subject: [PATCH] file cleanup --- .DS_Store | Bin 10244 -> 0 bytes .Rhistory | 512 ---------------------------------------------------- R/.Rhistory | 0 3 files changed, 512 deletions(-) delete mode 100644 .DS_Store delete mode 100644 .Rhistory delete mode 100644 R/.Rhistory diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index eee80dc32518482f7a4ceb49fd5bd92f3f8cb817..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMYit}>6+XvylDX@+9*5N4*?8k^95*IiH+Jkgb)6<_d+o$-(-^N4I}hsa?o8ql zyF2dAtlh*I+?I+~YD<7t>ATSKhbHs~YC%ASltO95`w>K2R3t#a4}L%&NbrYp?!B{{ z^?F?ep%NtKuI8S(=bU@z&Y5q{cke6!V1G{U00;qqLI;=XTB^zvZs*6cQsHVENh0+J z7=vLLg>kC)FZ1>kUIe@dcoFa-;6=cT!2d!7h_iW7s-^U5F9Kc!ya*H`!1F_h4lX0E zT$ECz4ywc!fMgY^MWJ)r2Z%l)S4Ld9D5dC1W6IqFx?R!TVxa6!_7Ha`8FA&Jl(IXZ z><;K&8QmQUimOwtZmWhKaizf`?+ zw7w?_o$*)Rgbdi=EcL^CR`N^C*)#5V=Myt2({|e1e}xs5RjXF7QFy6QJ{p_0=3-9V z$=Ut!>=E7?jXTo`_k7&4Qibz);-G2FO{wb#tc(*kGe%Z)Hg$tsj!u{v-J0vSav9wg zl^M+%+&+=CQn_@-o>J?Q@l-OG ziaSPMDit$N8up}P+~M%E!?u-m28833s^)BC%pgB=)`*g~J!#T#+)YJxX6==MrsmeR z?K^h%U8uRDR`sp(t)G}RZ8MQF4$PUlGkqv-Cyk75W{w}GcxN2*m}z8L9X`s&Gx4-> zLA|23roO@NpUfr9+jFLKLTy$QIaZ^8BU4{gj_P#TeU{F9>cZl0^lws>BV0d_HK>+q zUyFYWQ{&3GO|z3jZ1shiYP0c=(ZiQrxA{60Rc8lM@r03*sxDu*qTa+NW@Xf*vd7n} z)M1!S(ql=}yltu8<&P-pdF57q?VIDavwz0O(B=7E^f&tbhq%5^*A1P}+Z<_?&r;ke zYmT(Lk5&N&^@Hl)4&cavWC3qFi!w=wx@H2P=eh+_uKf<5j zukaSU1MecD536x4`td5dN8FjZ0$-t%VnDjDZN;tS02v${^6kAm zfP8%|M`7K%53Rp)WAm14+ONA|ci{n+JhLURD#nt4kHm+-O&%8#uY^@Cu)!BRK!`H# zD8+al`|28w9pwV|ZVCm1DhG{hvduvsp_&O>>t?c5xR!7mSt<#@($=xv7gSdfR%O5L z9X_90MPQcJ-koG!O|X^LNFP~&zgFzu$K5k<2EIv{`vtrPzahN+nXvW`cn?=$EjFNr zjTpp@xCK9q*I*di2x-@258i+S0&RP66vuEJ58y$Z!Z;=gaRwo7h7f0?gA4dcyc6%j zyYYT}5I>8b!_VVG_#{4q&z7KWxCC`)i&2-hqES8PBmv&IYouOy77&@X^c8J0(<`Ue z*;qD{vNFeMG>-gANJAVlOX&-~OqODrbG?d_JA+%G5B3Sp9Hp}X7+g9CHk1s4FjnI6 z&T@|;etb3mqFpY2te>B6BZBM_{Mggg9S&XJ*}aS&Pt#3MS&<$&ebTMxW5W=ZFX&AS!$eo`vV(1^706k7)46@Duncybix55_}8ZhIip_@K0QW ziXcKsgUz^&lG2U18zb0v#@d#_!;F@kjV`{53}+?Pc?HxKFn8HNHt_gj)jY`w$_k4h-$t+kaVrx`YSi`mFF2 zOL*{-sc#8k3ib+YV8NAeEcsC^q0}`OG{QwwC=hUYkT*BCP_u%V(51z#0a~iX6}3_h zy^V==nz~9fSr_Z(3puq)T6rP_eFRP zz5%bm_X%&mgg4=L@E7xl{jxPhqfYHXz?7pKDOXvxKiuot65g?nh>HA0vh zCnB7n#aDu;(7dyf`y$E;_xZDxIs%R|QPqWA`fJ!ICzqNGB^!xIN J`~PMC|1X#7fyV#< diff --git a/.Rhistory b/.Rhistory deleted file mode 100644 index e5d2633..0000000 --- a/.Rhistory +++ /dev/null @@ -1,512 +0,0 @@ -rmanno.list$age_dfs$age[c(1:50),] -load("~/scratch/analysis_scratch/analysis_final_files/recountmeth-gsm-metadata_naive-summary.rda") -head(rmsd) -head(rmsmd) -?pca -?princomp -library(randomForest) -?randomFOrest -?randomForest -?fread -library(data.table) -?fread -?read.table -?scar -?scan -?readLines -library(ComplexHeatmap) -m = matrix(rnorm(50*10), nrow = 50) -ht_list = Heatmap(m, name = "main_matrix") -ha = HeatmapAnnotation(summary = anno_summary(height = unit(3, "cm"))) -v = sample(letters[1:2], 50, replace = TRUE) -ht_list = ht_list + Heatmap(v, name = "mat1", top_annotation = ha, width = unit(1, "cm")) -ha = HeatmapAnnotation(summary = anno_summary(gp = gpar(fill = 2:3), -height = unit(3, "cm"))) -v = rnorm(50) -ht_list = ht_list + Heatmap(v, name = "mat2", top_annotation = ha, width = unit(1, "cm")) -split = sample(letters[1:2], 50, replace = TRUE) -lgd_boxplot = Legend(labels = c("group a", "group b"), title = "group", -legend_gp = gpar(fill = c("red", "blue"))) -draw(ht_list, row_split = split, ht_gap = unit(5, "mm"), -heatmap_legend_list = list(lgd_boxplot)) -split -split = c("a", rep("b", 49)) -lgd_boxplot = Legend(labels = c("group a", "group b"), title = "group", -legend_gp = gpar(fill = c("red", "blue"))) -draw(ht_list, row_split = split, ht_gap = unit(5, "mm"), -heatmap_legend_list = list(lgd_boxplot)) -?split -?draw -subgroup = sample(letters[1:3], 100, replace = TRUE, prob = c(1, 5, 10)) -subgroup -draw(ht_list, row_split = split, -heatmap_legend_list = list(lgd_boxplot)) -split = c("b", rep("a", 49)) -lgd_boxplot = Legend(labels = c("group a", "group b"), title = "group", -legend_gp = gpar(fill = c("red", "blue"))) -draw(ht_list, row_split = split, -heatmap_legend_list = list(lgd_boxplot)) -split = c("1", rep("2", 49)) -lgd_boxplot = Legend(labels = c("group a", "group b"), title = "group", -legend_gp = gpar(fill = c("red", "blue"))) -draw(ht_list, row_split = split, -heatmap_legend_list = list(lgd_boxplot)) -library(minfiData) -data("RGsetEx") -rg = RGsetEx -dim(rg) -getSnpBeta(rg) -dim(getSnpBeta(rg)) -dim(t(getSnpBeta(rg))) -dim(getOOB(rg)) -oob = getOOB(rg) -oog -oob -oob$Grn -dim(oob$Grn) -dim(oob$Red) -estimateCellCounts(rgi) -estimateCellCounts(rg) -rgi = rg -cc1 = estimateCellCounts(rgi, compositeCellType = "Blood") -cc2 = estimateCellCounts(rgi, compositeCellType = "CordBlood") -BiocManager::install("FlowSorted.CordBlood.450k") -BiocManager::install("FlowSorted.DLPFC.450k") -dim(rg) -cc1 = estimateCellCounts(rgi, compositeCellType = "Blood") -cc2 = estimateCellCounts(rgi, compositeCellType = "CordBlood") -cc3 = estimateCellCounts(rgi, compositeCellType = "DLPFC") -?estimateCellCounts -cc2 -cc1 -class(cc1) -load("~/Desktop/nctissue_bcdat_new/cgid-hypovar10.rda") -load("~/Desktop/nctissue_bcdat_new/cgid-hypervar90.rda") -load("~/Desktop/nctissue_bcdat_new/cgid-hypovar10.rda") -hypo = ptid -load("~/Desktop/nctissue_bcdat_new/cgid-hypervar90.rda") -?prcomp -load("~/Desktop/nctissue_bcdat_old/hm450k_cganno.rda") -dim(cga) -library(ewastools) -?ewastools -??ewastools -library(glmnet) -?glmnet -(480000/90000)*1.33 -load("~/Documents/GitHub/recount-methylation-analysis/files/data/mdpost_all-gsm-md.rda") -mdf = mdpost[!(grepl(".*cancer.*", mdpost$disease)| -grepl(".*cancer.*", mdpost$tissue)),] -dx = as.data.frame(table(mdf$gseid)) -dx = dx[rev(order(dx[,2])),] -dx[c(1:5),] -gsev = dx[c(1:5), 1] -gsev -gsev = as.charcter(dx[c(1:5), 1]) -gsev = as.character(dx[c(1:5), 1]) -gsev[1] -gsei = gsev[1] -gsei = gsev[2] -gsei -gsei = gsev[3] -gsei -((480000/10)*12)/60 -((480000/10000)*12)/60 -gsei = gsev[4] -gsei -gsev -gsev[5] -dx = as.data.frame(table(mdf$gseid)) -dx = dx[rev(order(dx[,2])),] -gsev = as.character(dx[c(1:10), 1]) -gsev[6] -gsei = gsev[7] -gsei -gsei = gsev[8] -gsei -gsei = gsev[9] -gsei -gsei = gsev[10] -gsei -mf = mdpost[mdpost$gseid=="GSE69502",] -head(mf) -36000/1.2 -((36000/50)*1.2)/60 -((36000/350)*6.5)/60 -((36000/850)*17.7)/60 -((36000/850)*17.6)/60 -if (!requireNamespace("BiocManager")) -install.packages("BiocManager") -BiocManager::install("MyPackage") -if (!requireNamespace("BiocManager")) -install.packages("BiocManager") -BiocManager::install("recountmethylation") -library(Rcpp) -require(devtools); install_github("metamaden/recountmethylation") -library(recountmethylation) -library(recountmethylation) -require(devtools); install_github("metamaden/recountmethylation") -library(recountmethylation) -require(devtools); install_github("metamaden/recountmethylation", force = T) -library(recountmethylation) -library(recountmethylation) -require(devtools); install_github("metamaden/recountmethylation") -library(recountmethylation) -library(glmnet) -?glmnet -((6*50)*6.7)/60 -library(svDialogs) -?dlg_message -ui.idle <- dlg_message("maintain?", "yesno")$res -setwd("~/Desktop/recountmethylation/recount.bio/data") -lfl <- list.files() -HDF5Array::loadHDF5SummarizedExperiment(lfl[1]) -lfl <- lfl[grepl(".*h5se.*", lfl)] -lfl -HDF5Array::loadHDF5SummarizedExperiment(lfl[1]) -BiocManager::install(version = "devel") -if (!requireNamespace("BiocManager", quietly=TRUE)) -install.packages("BiocManager") -BiocManager::install(version = "devel") -library(HDF5Array) -BiocManager::install(c("minfi", "HDF5Array", "SummarizedExperiment")) -BiocManager::install(c("minfi", "HDF5Array", "SummarizedExperiment")) -library(HDF5Array) -BiocManager::install(version = "devel") -R.Version() -BiocManager::valid() -BiocManager::install("BiocCheck") -library(testthat) -?is_a -install.packages("dplyr") -?read_html -require(textreadr) -install.packages("textreadr") -require(rvest) -require(rworldmap) -require(dplyr) # for pipes -require(textreadr) # for read_html -alleles.outfile <- "HLA-freqs.rda" -iso3.outfile <- "HLA-ISO3-freqs.rda" -global.outfile <- "HLA-freqs-global.rda" -global.haplotype.outfile <- "haplotype-freqs-global.rda" -individuals.outfile <- "HLA-individuals.rda" -haplotypes.outfile <- "HLA-haplotypes.rda" -haplotype.iso3.outfile <- "haplotype-ISO3-freqs.rda" -MHC.alleles.infile <- "supporting_data/netmhcpan_allele_list.txt" -plotdir <- "plots" -require(rvest) -require(rworldmap) -require(dplyr) # for pipes -require(textreadr) # for read_html -install.packages("rworld") -install.packages("rworldmap") -require(rvest) -require(rworldmap) -require(dplyr) # for pipes -require(textreadr) # for read_html -alleles.outfile <- "HLA-freqs.rda" -iso3.outfile <- "HLA-ISO3-freqs.rda" -global.outfile <- "HLA-freqs-global.rda" -global.haplotype.outfile <- "haplotype-freqs-global.rda" -individuals.outfile <- "HLA-individuals.rda" -haplotypes.outfile <- "HLA-haplotypes.rda" -haplotype.iso3.outfile <- "haplotype-ISO3-freqs.rda" -MHC.alleles.infile <- "supporting_data/netmhcpan_allele_list.txt" -plotdir <- "plots" -alleles <- data.frame(HLA=character(), pop.ID=numeric(), pop.name=character(), freq=numeric(), sample.size=numeric()) -?read_html -require(rvest) -require(rworldmap) -require(dplyr) # for pipes -#require(textreadr) # for read_html -alleles.outfile <- "HLA-freqs.rda" -iso3.outfile <- "HLA-ISO3-freqs.rda" -global.outfile <- "HLA-freqs-global.rda" -global.haplotype.outfile <- "haplotype-freqs-global.rda" -individuals.outfile <- "HLA-individuals.rda" -haplotypes.outfile <- "HLA-haplotypes.rda" -haplotype.iso3.outfile <- "haplotype-ISO3-freqs.rda" -MHC.alleles.infile <- "supporting_data/netmhcpan_allele_list.txt" -plotdir <- "plots" -alleles <- data.frame(HLA=character(), pop.ID=numeric(), -pop.name=character(), freq=numeric(), -sample.size=numeric()) -library(grid) -seq(1,20,1) -library(recountmethylation) -system.file("remethdb_h5se-test_gr_00-00-01_1583780004", package = "recountmethylation") -system.file("extdata", "remethdb_h5se-test_gr_00-00-01_1583780004", package = "recountmethylation") -packagename <- "recountmethylation" -sys.call(paste0("R CMD INSTALL ", packagename)) -?sys.call -which.dn <- "h5se-test_gr" -dn <- RCurl::getURL(url, ftp.use.epsv = FALSE, dirlistonly = TRUE) -url = "https://recount.bio/data/" -dn <- RCurl::getURL(url, ftp.use.epsv = FALSE, dirlistonly = TRUE) -?getURL -library(recountmethylation) -knitr::opts_chunk$set(eval = TRUE, -echo = TRUE, warning = FALSE, -message = FALSE) -# datapath <- get_rmdl("h5se-test_gr", verbose = FALSE) -testdatdn <- "remethdb_h5se-test_gr_00-00-01_1583780004" -system.file("extdata", testdatdn, "recountmethylation") -# datapath <- get_rmdl("h5se-test_gr", verbose = FALSE) -testdatdn <- "remethdb_h5se-test_gr_00-00-01_1583780004" -datpath <- system.file("extdata", testdatdn, "recountmethylation") -grtest <- loadHDF5SummarizedExperiment(datpath) -library(HDF5Array) -# datapath <- get_rmdl("h5se-test_gr", verbose = FALSE) -testdatdn <- "remethdb_h5se-test_gr_00-00-01_1583780004" -datpath <- system.file("extdata", testdatdn, "recountmethylation") -grtest <- loadHDF5SummarizedExperiment(datpath) -system.file("extdata", testdatdn, "recountmethylation") -system.file("extdata", testdatdn, package = "recountmethylation") -# datapath <- get_rmdl("h5se-test_gr", verbose = FALSE) -testdatdn <- "remethdb_h5se-test_gr_00-00-01_1583780004" -datpath <- system.file("extdata", testdatdn, package = "recountmethylation") -grtest <- loadHDF5SummarizedExperiment(datpath) -dim(grtest) -dim(grtest) -class(grtest) -?loadHDF5SummarizedExperiment -library(recountmethylation) -library(HDF5Array) -knitr::opts_chunk$set(eval = TRUE, -echo = TRUE, warning = FALSE, -message = FALSE) -dim(h5test) -testdatdn <- "remethdb_h5se-test_gr_00-00-01_1583780004" -datpath <- system.file("extdata", testdatdn, package = "recountmethylation") -h5test <- loadHDF5SummarizedExperiment(datpath) -dim(h5test) -dim(h5test) -pData(h5test) -dim(getBeta(h5test)) -pdata <- pData(h5test) -colnames(pdata) -beta <- getBeta(h5test) -mval <- getM(h5test) -library(recountmethylation) -library(HDF5Array) -knitr::opts_chunk$set(eval = TRUE, -echo = TRUE, warning = FALSE, -message = FALSE) -testdatdn <- "remethdb_h5se-test_gr_00-00-01_1583780004" -datpath <- system.file("extdata", testdatdn, package = "recountmethylation") -h5test <- loadHDF5SummarizedExperiment(datpath) -dim(h5test) -# data info -class(h5test) -dim(h5test) -head(colnames(h5test)) -head(rownames(h5test)) -# minfi functions -pdata <- pData(h5test) -beta <- getBeta(h5test) -mval <- getM(h5test) -?object.size(pdata) -object.size(pdata) -colnames(pdata) -object.size(pdata) -?get_rmdl -get_rmdl() -library(recountmethylation) -get_rmdl() -t <- try(get_rmdl()) -r -t -t[1] -class(t) -t[1] -ds1 <- matrix(seq(1, 10, 1), nrow = 5) -ds1 <- matrix(seq(1, 10, 1), nrow = 5) -library(recountmethylation) -rownames(ds1) <- rownames(ds2) <- paste0("row", seq(1, 5, 1)) -ds2 <- matrix(seq(11, 20, 1), nrow = 5) -rownames(ds1) <- rownames(ds2) <- paste0("row", seq(1, 5, 1)) -colnames(ds1) <- colnames(ds2) <- paste0("col", c(1, 2)) -ds2 <- ds2[rev(seq(1, 5, 1)), c(2, 1)] -lmatched = matchds(d1, d2, mi1 = "rows", mi2 = "rows") -lmatched = matchds_1to2(d1, d2, mi1 = "rows", mi2 = "rows") -lmatched = matchds_1to2(ds1, ds2, mi1 = "rows", mi2 = "rows") -lmatched = matchds_1to2(lmatched[[1]], lmatched[[2]], mi1 = "columns", mi2 = "columns) -) -) -' -" -"" -lmatched = matchds_1to2(lmatched[[1]], lmatched[[2]], mi1 = "columns", mi2 = "columns") -lmatched -identical(ds1, ds2) -identical(lmatched[[1]], lmatched[[2]]) -rev(order(seq(1,10,1))) -identical(rownames(lmatched[[1]]), rownames(lmatched[[2]])) -identical(colnames(lmatched[[1]]), colnames(lmatched[[2]])) -dim(ds1) -dim(ds2) -ds1 <- matrix(seq(1, 10, 1), nrow = 5) -ds2 <- matrix(seq(11, 20, 1), nrow = 5) -rownames(ds1) <- rownames(ds2) <- paste0("row", seq(1, 5, 1)) -colnames(ds1) <- colnames(ds2) <- paste0("col", c(1, 2)) -ds2 <- ds2[rev(seq(1, 5, 1)), c(2, 1)] -ds1 -ds2 -identical(rownames(lmatched[[1]]), rownames(lmatched[[2]])) -ds1 <- matrix(seq(1, 10, 1), nrow = 5) -ds2 <- matrix(seq(11, 20, 1), nrow = 5) -rownames(ds1) <- rownames(ds2) <- paste0("row", seq(1, 5, 1)) -colnames(ds1) <- colnames(ds2) <- paste0("col", c(1, 2)) -ds2 <- ds2[rev(seq(1, 5, 1)), c(2, 1)] -lmatched = matchds_1to2(ds1, ds2, mi1 = "rows", mi2 = "rows") -lmatched = matchds_1to2(lmatched[[1]], lmatched[[2]], mi1 = "columns", mi2 = "columns") -identical(rownames(lmatched[[1]]), rownames(lmatched[[2]])) -identical(colnames(lmatched[[1]]), colnames(lmatched[[2]])) -library(recountmethylation) -?matchds_1to2 -?data_mdpost -?hread -devtools::document() -if (!requireNamespace("BiocManager", quietly=TRUE)) -install.packages("BiocManager") -BiocManager::install(version = "devel") -BiocManager::valid() -BiocManager::install(c("minfi", -"IlluminaHumanMethylation450kanno.ilmn12.hg19", -"IlluminaHumanMethylation450kmanifest", -"HDF5Array", "rhdf5")) -install.packages(c("knitr", "RCurl", "testthat", "devtools")) -dct1 <- try("") -dct1 -dct1 <- try(dir.create("")) -dct1 -dct1 <- ifelse(!dir.exists(dfp) & !dfp == "", try(dir.create(dfp)), TRUE) -dfp = "" -dct1 <- ifelse(!dir.exists(dfp) & !dfp == "", try(dir.create(dfp)), TRUE) -dct1 -dfp = "newdir" -dct1 <- ifelse(!dir.exists(dfp) & !dfp == "", try(dir.create(dfp)), TRUE) -dct1 -get_rmdl <- function(which.dn = c("h5se_gr", "h5se_gm", "h5se_rg", "remethdb2.h5", -"h5se-test_gr", "remethdbtest.h5"), -url = "https://recount.bio/data/", -dfp = "downloads", download = TRUE, -verbose = TRUE, sslver = FALSE){ -if(verbose){message("Retrieving data dirnames from server...")} -dn <- RCurl::getURL(url, ftp.use.epsv = FALSE, dirlistonly = TRUE, -.opts = list(ssl.verifypeer = sslver)) -dn <- unlist(strsplit(dn, "\n")) -catch.str <- paste0(".*", which.dn,".*") -dn.catch <- grepl(catch.str, dn) -dn <- unlist(dn)[dn.catch] -dn.clean <- gsub('<.*', "", gsub('.*">', "", dn)) -if(length(dn.clean) > 1){stop("Error parsing filenames. Is `which.dn` valid?")} -if(!download){return(dn.clean)} -if(!length(dn.clean) == 1){stop("There was a problem parsing the file string.")} -dct1 <- ifelse(!dir.exists(dfp) & !dfp == "", try(dir.create(dfp)), TRUE) -dfp.dn <- paste(c(dfp, dn.clean), collapse = "/") -if(which.dn == "remethdb2.h5"){dct2 <- try(file.create(dfp.dn))} else{ -dct2 <- try(dir.create(dfp.dn)) -} -if(!(dct1 & dct2)){ -stop("There is a problem with the download destination path.") -} -dn.url <- paste0(url, dn.clean) -if(which.dn == "remethdb2.h5"){fl.clean <- ""} else{ -if(verbose){message("Retrieving data files from server...")} -fl = RCurl::getURL(dn.url, ftp.use.epsv = FALSE, dirlistonly = TRUE, -.opts = list(ssl.verifypeer = sslver)) -fl <- unlist(strsplit(fl, "\n")) -fl.str <- paste0(c("assays.h5", "se.rds"), collapse = "|") -fl.catch.str <- paste0(".*", fl.str,".*") -fl.catch <- grepl(fl.catch.str, fl) -fl <- unlist(fl)[fl.catch] -fl.clean <- gsub('<.*', "", gsub('.*">', "", fl)) -} -if(verbose){message("Downloading file(s)...")} -dll <- list() -for(i in 1:length(fl.clean)){ -fpath <- paste0(c(dn.url, fl.clean[i]), collapse = "") -cf = RCurl::CFILE(paste0(dfp.dn, fl.clean[i]), mode="wb") -dll[[i]] <- try(RCurl::curlPerform(url = fpath, writedata = cf@ref, -.opts = list(ssl.verifypeer = sslver))) -} -if(length(dll[dll==0]) == length(dll)){ -if(verbose){message("Finished download, returning file path.")} -return(dfp.dn) -} else{ -if(verbose){message("Download incomplete for file ", fl.clean[which(dll!=0)])} -return(NULL) -} -return(NULL) -} -get_rmdl("remethdbtest.h5") -which.dn = "remethdbtest.h5" -dn <- RCurl::getURL(url, ftp.use.epsv = FALSE, dirlistonly = TRUE, -.opts = list(ssl.verifypeer = sslver)) -url = "https://recount.bio/data/" -dfp = "downloads" -download = TRUE -verbose = TRUE -sslver = FALSE -dn <- RCurl::getURL(url, ftp.use.epsv = FALSE, dirlistonly = TRUE, -.opts = list(ssl.verifypeer = sslver)) -dn <- unlist(strsplit(dn, "\n")) -catch.str <- paste0(".*", which.dn,".*") -dn.catch <- grepl(catch.str, dn) -dn <- unlist(dn)[dn.catch] -dn.clean <- gsub('<.*', "", gsub('.*">', "", dn)) -dct1 <- ifelse(!dir.exists(dfp) & !dfp == "", try(dir.create(dfp)), TRUE) -dfp.dn <- paste(c(dfp, dn.clean), collapse = "/") -if(grepl(".*\\.h5$", which.dn)){dct2 <- try(file.create(dfp.dn))} else{ -dct2 <- try(dir.create(dfp.dn)) -} -dct1 <- ifelse(!dir.exists(dfp) & !dfp == "", try(dir.create(dfp)), TRUE) -dfp.dn <- paste(c(dfp, dn.clean), collapse = "/") -if(grepl(".*\\.h5$", which.dn)){dct2 <- try(file.create(dfp.dn))} else{ -dct2 <- try(dir.create(dfp.dn)) -} -if(grepl(".*\\.h5$", which.dn)){fl.clean <- ""} else{ -if(verbose){message("Retrieving data files from server...")} -fl = RCurl::getURL(dn.url, ftp.use.epsv = FALSE, dirlistonly = TRUE, -.opts = list(ssl.verifypeer = sslver)) -fl <- unlist(strsplit(fl, "\n")) -fl.str <- paste0(c("assays.h5", "se.rds"), collapse = "|") -fl.catch.str <- paste0(".*", fl.str,".*") -fl.catch <- grepl(fl.catch.str, fl) -fl <- unlist(fl)[fl.catch] -fl.clean <- gsub('<.*', "", gsub('.*">', "", fl)) -} -dll <- list() -for(i in 1:length(fl.clean)){ -fpath <- paste0(c(dn.url, fl.clean[i]), collapse = "") -cf = RCurl::CFILE(paste0(dfp.dn, fl.clean[i]), mode="wb") -dll[[i]] <- try(RCurl::curlPerform(url = fpath, writedata = cf@ref, -.opts = list(ssl.verifypeer = sslver))) -} -dn.url <- paste0(url, dn.clean) -dn.url -dll <- list() -for(i in 1:length(fl.clean)){ -fpath <- paste0(c(dn.url, fl.clean[i]), collapse = "") -cf = RCurl::CFILE(paste0(dfp.dn, fl.clean[i]), mode="wb") -dll[[i]] <- try(RCurl::curlPerform(url = fpath, writedata = cf@ref, -.opts = list(ssl.verifypeer = sslver))) -} -setwd("~/Documents/GitHub/rmpipeline") -devtools::document() -devtools::document() -devtools::document() -devtools::document() -?readLines -library(minfi) -?preprocessNoob -preprocessNoob() -preprocessNoob -devtools::document() -devtools::document() -devtools::document() -devtools::document() -devtools::document() -devtools::document() diff --git a/R/.Rhistory b/R/.Rhistory deleted file mode 100644 index e69de29..0000000