pgx-main from prod added
This commit is contained in:
90
pgx-main/tests/config/nat2.config
Normal file
90
pgx-main/tests/config/nat2.config
Normal file
@@ -0,0 +1,90 @@
|
||||
|
||||
|
||||
|
||||
params {
|
||||
gene = "nat2"
|
||||
}
|
||||
|
||||
|
||||
process {
|
||||
|
||||
// ALL PROCESSES
|
||||
cache = true
|
||||
stageInMode = 'symlink'
|
||||
stageOutMode = 'rsync'
|
||||
// scratch = "$HOME/tmp" // clean this regularly
|
||||
|
||||
// Containers
|
||||
|
||||
// Singularity
|
||||
|
||||
// withLabel: phase {
|
||||
// singularity.enabled = false
|
||||
//container = "$PWD/containers/whatshap.sif" // this can be generated from docker://pacificbiosciences/whatshap
|
||||
// }
|
||||
|
||||
withName: call_snvs1 {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: call_snvs2 {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: call_sv_del {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: call_sv_dup {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: get_depth {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: format_snvs {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: get_core_var {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: analyse_1 {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: analyse_2 {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: analyse_3 {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: analyse_4 {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
withName: call_stars {
|
||||
singularity.enabled = true
|
||||
container = "$PWD/containers/stellarpgx-dev.sif"
|
||||
}
|
||||
|
||||
|
||||
// Docker
|
||||
// container = "twesigomwedavid/stellarpgx-dev:latest" // Note that this Docker build needs to be pulled from Do
|
||||
|
||||
}
|
||||
23
pgx-main/tests/config/test.config
Normal file
23
pgx-main/tests/config/test.config
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
params {
|
||||
// User-defined parameters
|
||||
|
||||
// reference genome
|
||||
ref_file = "$PWD/tests/reference/hg38/chr22_hg38.fasta"
|
||||
|
||||
|
||||
// BAM/CRAM file(s) and respective indexes
|
||||
in_bam = "$PWD/tests/samples/hg38/HG03130*{bam,bai}"
|
||||
|
||||
|
||||
// Output directoy (Default is $PWD/results)
|
||||
out_dir = "$PWD/results"
|
||||
|
||||
|
||||
// DO NOT modify these lines
|
||||
gene = "cyp2d6"
|
||||
res_init = "$PWD/tests/resources"
|
||||
|
||||
}
|
||||
|
||||
646131
pgx-main/tests/reference/hg38/chr22_hg38.fasta
Normal file
646131
pgx-main/tests/reference/hg38/chr22_hg38.fasta
Normal file
File diff suppressed because it is too large
Load Diff
1
pgx-main/tests/reference/hg38/chr22_hg38.fasta.fai
Normal file
1
pgx-main/tests/reference/hg38/chr22_hg38.fasta.fai
Normal file
@@ -0,0 +1 @@
|
||||
chr22 50818468 7 70 71
|
||||
Binary file not shown.
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/allele_def_var.vcf.gz
Normal file
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/allele_def_var.vcf.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test.vcf.gz
Normal file
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test.vcf.gz
Normal file
Binary file not shown.
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test.vcf.gz.tbi
Normal file
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test.vcf.gz.tbi
Normal file
Binary file not shown.
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test3.vcf.gz
Normal file
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test3.vcf.gz
Normal file
Binary file not shown.
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test3.vcf.gz.tbi
Normal file
BIN
pgx-main/tests/resources/cyp2d6/res_hg38/sv_test3.vcf.gz.tbi
Normal file
Binary file not shown.
11
pgx-main/tests/resources/cyp2d6/res_hg38/test3.bed
Normal file
11
pgx-main/tests/resources/cyp2d6/res_hg38/test3.bed
Normal file
@@ -0,0 +1,11 @@
|
||||
chr22 42126300 42126800
|
||||
chr22 42127750 42130000
|
||||
chr22 42126000 42137500
|
||||
chr22 42149880 42155020
|
||||
chr22 42139000 42142455
|
||||
chr22 42142465 42144575
|
||||
chr22 42139500 42140600
|
||||
chr22 42140600 42142500
|
||||
chr22 42149883 42155000
|
||||
chr22 42140600 42143600
|
||||
chr22 42143600 42144575
|
||||
BIN
pgx-main/tests/samples/hg38/HG03130.bam
Normal file
BIN
pgx-main/tests/samples/hg38/HG03130.bam
Normal file
Binary file not shown.
BIN
pgx-main/tests/samples/hg38/HG03130.bam.bai
Normal file
BIN
pgx-main/tests/samples/hg38/HG03130.bam.bai
Normal file
Binary file not shown.
BIN
pgx-main/tests/samples/hg38/SIM001.bam
Normal file
BIN
pgx-main/tests/samples/hg38/SIM001.bam
Normal file
Binary file not shown.
BIN
pgx-main/tests/samples/hg38/SIM001.bam.bai
Normal file
BIN
pgx-main/tests/samples/hg38/SIM001.bam.bai
Normal file
Binary file not shown.
36
pgx-main/tests/simulations/gen_dips.nf
Normal file
36
pgx-main/tests/simulations/gen_dips.nf
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env nextflow
|
||||
|
||||
//haps1 = Channel.fromFilePairs(params.in_pgvcf, type: 'file') { file -> file.name.replaceAll(/.vcf.gz|.tbi$/,'') }
|
||||
|
||||
haps1 = Channel.fromPath(params.in_hap1, type: 'file')
|
||||
haps2 = Channel.fromPath(params.in_hap2, type: 'file')
|
||||
|
||||
//haps2 = Channel.fromFilePairs(params.in_haplo, type: 'file') { file -> file.name.replaceAll(/.vcf.gz|.tbi$/,'') }
|
||||
|
||||
haps1
|
||||
.combine(haps2)
|
||||
.set {data}
|
||||
// .println()
|
||||
|
||||
|
||||
process make_diplo {
|
||||
// maxForks 10
|
||||
// errorStrategy 'ignore'
|
||||
// tag "${name}"
|
||||
// label 'big_mem'
|
||||
publishDir params.out_dir, mode: 'copy', overwrite: 'true'
|
||||
|
||||
input:
|
||||
file(vcfs) from data
|
||||
|
||||
output:
|
||||
file("*_diplo.vcf.gz") into diplotypes_ch
|
||||
|
||||
script:
|
||||
"""
|
||||
tabix ${vcfs.get(0)}
|
||||
tabix ${vcfs.get(1)}
|
||||
bcftools merge ${vcfs.get(0)} ${vcfs.get(1)} | bgzip -c > ${vcfs.get(0).name.replace(/.vcf.gz/, "")}_${vcfs.get(1).name.replace(/.vcf.gz/, "")}_diplo.vcf.gz
|
||||
"""
|
||||
|
||||
}
|
||||
32
pgx-main/tests/simulations/nextflow.config
Normal file
32
pgx-main/tests/simulations/nextflow.config
Normal file
@@ -0,0 +1,32 @@
|
||||
params {
|
||||
in_hap1 = "/path/to/haplotype_files/*.vcf.gz"
|
||||
in_hap2 = "/path/to/haplotype_files/*.p.vcf.gz"
|
||||
out_dir = "/path/to/output_directory"
|
||||
}
|
||||
|
||||
|
||||
|
||||
process {
|
||||
withLabel: big_mem {
|
||||
cpus = 8
|
||||
memory = 32.GB
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
profiles {
|
||||
|
||||
// For execution on a local machine, no containerization. -- Default
|
||||
standard {
|
||||
process.executor = 'local'
|
||||
}
|
||||
|
||||
|
||||
// For execution on a SLURM scheduler, no containerization.
|
||||
slurm {
|
||||
process.executor = 'slurm'
|
||||
process.queue = 'batch'
|
||||
}
|
||||
}
|
||||
32
pgx-main/tests/simulations/sim_zygosity.py
Normal file
32
pgx-main/tests/simulations/sim_zygosity.py
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
|
||||
# Script: sim_zygosity.py
|
||||
# Author: David Twesigomwe
|
||||
# Date modified: 15-Dec-2020
|
||||
# Purpose: This script simulates the zygosity of variants after concatenating 2 haplotype VCF files.
|
||||
# Usage: python3 sim_zygosity.py in_database.txt > output.txt
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
in_file = sys.argv[1]
|
||||
|
||||
f = open (in_file, "r")
|
||||
|
||||
|
||||
for line in f:
|
||||
list1 = line.strip().split(";")
|
||||
new_list = []
|
||||
for i in list1:
|
||||
x = i + '~0/1'
|
||||
y = i + '~1/1'
|
||||
if x not in new_list:
|
||||
new_list.append(x)
|
||||
|
||||
else:
|
||||
new_list = list(map(lambda st: str.replace(st, x, y), new_list))
|
||||
|
||||
print(";".join(new_list))
|
||||
|
||||
f.close()
|
||||
Reference in New Issue
Block a user