diff --git a/Rmd/Sample_QC.Rmd b/Rmd/Sample_QC.Rmd index cfe0ecc5..a7c8efdc 100644 --- a/Rmd/Sample_QC.Rmd +++ b/Rmd/Sample_QC.Rmd @@ -1093,6 +1093,7 @@ if (!is.na(batch_var)) { QAQC_metadata_subset <- QAQC_annotated %>% dplyr::select(unlist(exp_groups), !!ensym(batch_var), NMR_data, FMR_data, Ncov5_data, Nsig80_data, Gini_data) + QAQC_metadata_subset[,batch_var] <- factor(QAQC_metadata_subset[,batch_var]) } else { QAQC_metadata_subset <- QAQC_annotated %>% dplyr::select(unlist(exp_groups), @@ -1100,14 +1101,14 @@ QAQC_metadata_subset <- QAQC_annotated %>% } QAQC_metadata_subset %>% - summarise_each(levels(as.factor(.))) %>% tally() + summarise_all(~length(unique(.))) # Just info. Output not used + #summarise_each(levels(as.factor(.))) %>% tally() potential_covariates <- QAQC_metadata_subset %>% dplyr::mutate_all(as.factor) %>% purrr::map(levels) %>% purrr::map(length) -QAQC_metadata_subset[,batch_var] <- factor(QAQC_metadata_subset[,batch_var]) covariate_names <- names(potential_covariates[potential_covariates < 24]) diff --git a/workflow/Snakefile b/workflow/Snakefile index 3cb872e1..b95ed495 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -417,6 +417,7 @@ if common_config["platform"] =="RNA-Seq": params: annotations = genome_dir / pipeline_config["annotation_filename"], genome_name = pipeline_config["genome_name"], + genome_dir = pipeline_config["genomedir"] output: directory(genome_dir / "RSEM_index"), conda: @@ -424,7 +425,7 @@ if common_config["platform"] =="RNA-Seq": benchmark: log_dir / "benchmark.RSEM_make_index.txt" shell: ''' - mkdir RSEM_index + mkdir {params.genome_dir}/RSEM_index rsem-prepare-reference --gtf {params.annotations} {input.genome} {output}/{params.genome_name} '''