Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes/lift over #5

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions files/rsq-report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ params:

library(ggplot2)
library(dplyr)
library(knitr)
```

## Parameters
Expand All @@ -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 %>%
Expand All @@ -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)
```

<small>
Expand Down
4 changes: 2 additions & 2 deletions modules/local/lift_over.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 0 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ profiles {

development {
docker.enabled = true
docker.userEmulation = true
singularity.enabled = false
}

Expand Down
19 changes: 19 additions & 0 deletions tests/microarray.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}

}
Loading