diff --git a/files/rsq-report.Rmd b/files/rsq-report.Rmd index 6835075..75042bf 100644 --- a/files/rsq-report.Rmd +++ b/files/rsq-report.Rmd @@ -20,6 +20,7 @@ params: library(ggplot2) library(dplyr) +library(knitr) ``` ## Parameters @@ -29,7 +30,7 @@ library(dplyr) | Job | `r params$name` | | Date | `r params$date` | -## RSQ Plot +## RSQ Table ```{r echo=FALSE} dataset = read.csv(params$input, row.names=NULL, sep = '\t') dataset_weighted = dataset %>% @@ -42,8 +43,13 @@ dataset_weighted = dataset %>% weighted_R2 = weighted.mean(Imputation.R2,X.Variants) ) -ggplot() + geom_line(data = dataset_weighted, mapping = aes(x = mean_MAF, y= weighted_R2)) + scale_x_log10() + expand_limits(x = 0, y = 0) +kable(dataset_weighted) +``` +## RSQ Plot + +```{r echo=FALSE} +ggplot() + geom_line(data = dataset_weighted, mapping = aes(x = mean_MAF, y= weighted_R2)) + scale_x_log10() + expand_limits(x = 0, y = 0) ``` diff --git a/modules/local/lift_over.nf b/modules/local/lift_over.nf index 06c2270..b8d802d 100644 --- a/modules/local/lift_over.nf +++ b/modules/local/lift_over.nf @@ -3,10 +3,10 @@ process LIFT_OVER { //publishDir "${params.outdir}/aggRSquare", mode: 'copy', pattern: '*aggRSquare' input: - tuple val(chr), val(array_name), path(dosage_data), path(sequence_data) + tuple val(chr), path(dosage_data), path(sequence_data) output: - tuple val(chr), val(array_name), path(dosage_data), path("${sequence_data.baseName}.liftover.vcf.gz"), emit: sequence_data_lifted + tuple val(chr), path(dosage_data), path("${sequence_data.baseName}.liftover.vcf.gz"), emit: sequence_data_lifted script: def chain_file = (params.sequence_build == 'hg19' ? "/opt/imputationserver/chains/hg19ToHg38.over.chain.gz" : '/opt/imputationserver/chains/hg38ToHg19.over.chain.gz') diff --git a/nextflow.config b/nextflow.config index 7ab8ea1..f5690ac 100644 --- a/nextflow.config +++ b/nextflow.config @@ -42,7 +42,6 @@ profiles { development { docker.enabled = true - docker.userEmulation = true singularity.enabled = false } diff --git a/tests/microarray.nf.test b/tests/microarray.nf.test index f380d52..31ad811 100644 --- a/tests/microarray.nf.test +++ b/tests/microarray.nf.test @@ -71,4 +71,23 @@ nextflow_pipeline { } + test("Rsq calculation for hg19/hg38") { + + when { + params { + project = "r2_calculation_hg19" + workflow_name = "r2" + imputation_build = "hg19" + sequence_build = "hg38" + imputed_data = "$projectDir/tests/data/imputed_data/hg19/*vcf.gz" + sequence_data = "$projectDir/tests/data/sequence_data/hg38/*vcf.gz" + } + } + + then { + assert workflow.success + } + + } + } \ No newline at end of file