markziemann / Gene-function-imputation

Gene function imputation by coexpression
3 stars 0 forks source link

Create function to avoid the big chunks of code for the coarse sweep section in the YeastImputation-blinded.rmd #36

Closed megan-soria closed 3 years ago

megan-soria commented 3 years ago

put a all the little functiontions into one big function with the following conditions:

Input

Output

megan-soria commented 3 years ago

code to turn into a function

for 20 clusters (run inputs)

cluster20 <- cuttree_values[["20"]][["GeneID_assignments"]] corr_allClusters20 <- corr_per_clust(logcounts, cluster20, 20) GOterms_perCl20 <- GO_per_cl(GO_table, cluster20, 20) GO_list_perCl20 <- GO_list_perClBlind(GOterms_perCl20, 20)

stats for thresholds

wGO_allClusters20_10 <- impute(cl_GOall = GOterms_perCl20, corr_clAll = corr_allClusters20, clust_total = 20, thresh = 0.1) SandC20_10 <- cross_val(n=10, GO_annot=GO_table, clusters=cluster20, GO_list_perCl=GO_list_perCl20, corr_clAll=corr_allClusters20, wGO_allClusters=wGO_allClusters20_10, clust_total=20, thresh=0.1) saveRDS(SandC20_10, "SandC20_10.rds")

megan-soria commented 3 years ago

comit c36c694dd1dc6f8f81788875e6d01e23ecb91ad0