-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Phil9S/dev
PR - v1.2.0
- Loading branch information
Showing
25 changed files
with
842 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,54 @@ | ||
--- | ||
# Sample sheet | ||
samplesheet: "sample_sheet.tsv" | ||
samplesheet: sample_sheet.tsv | ||
|
||
# Output location | ||
out_dir: "/mnt/scratcha/fmlab/smith10/britroc/" | ||
out_dir: results/ | ||
|
||
# Bin sizes | ||
# By default any in [1,5,15,30,50,100,500,1000] | ||
# Add new line for additional bin sizes | ||
bins: | ||
- 30 | ||
project_name: "britroc" | ||
#- 100 | ||
|
||
# Set project dir name | ||
project_name: nm_test | ||
|
||
# Pipeline parameters | ||
af_cutoff: 0.15 | ||
|
||
# Set seed for CBS - TRUE or FALSE | ||
# default TRUE | ||
use_seed: "TRUE" | ||
seed_val: "9999" | ||
|
||
# fitler underpowered solutions - TRUE or FALSE | ||
# Default TRUE | ||
filter_underpowered: "TRUE" | ||
|
||
# ploidy range | ||
# Default min = 1.6 | max = 8 | ||
ploidy_min: 1.6 | ||
ploidy_max: 8.0 | ||
|
||
# purity range (1 >= max > min >= 0) | ||
# Default min = 0.15 | max = 1.00 | ||
purity_min: 0.15 | ||
purity_max: 1.0 | ||
|
||
# Homozygous loss filter - TRUE or FALSE | ||
# Default "TRUE" | ||
filter_homozygous: "TRUE" | ||
# Threshold basepairs lost | ||
# Default 10000000 / 10Mbase | ||
homozygous_prop: 10000000 | ||
# Absolute CN homozygous loss threshold | ||
# Default 0.4 | ||
homozygous_threshold: 0.4 | ||
|
||
# container url for swgs-absolutecn | ||
image_base_url: docker://phil9s/ | ||
# Not implemented | ||
#custom_bin: false | ||
#custom_bin_folder: "/custom_bin_data/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# Sample sheet | ||
samplesheet: sample_sheet.tsv | ||
|
||
# Output location | ||
out_dir: results/ | ||
|
||
# Bin sizes | ||
# By default any in [1,5,15,30,50,100,500,1000] | ||
# Add new line for additional bin sizes | ||
bins: | ||
- 30 | ||
#- 100 | ||
|
||
# Set project dir name | ||
project_name: nm_test | ||
|
||
# Pipeline parameters | ||
af_cutoff: 0.15 | ||
|
||
# Set seed for CBS - TRUE or FALSE | ||
# default TRUE | ||
use_seed: "TRUE" | ||
seed_val: "9999" | ||
|
||
# fitler underpowered solutions - TRUE or FALSE | ||
# Default TRUE | ||
filter_underpowered: "TRUE" | ||
|
||
# ploidy range | ||
# Default min = 1.6 | max = 8 | ||
ploidy_min: 1.6 | ||
ploidy_max: 8.0 | ||
|
||
# purity range (1 >= max > min >= 0) | ||
# Default min = 0.15 | max = 1.00 | ||
purity_min: 0.15 | ||
purity_max: 1.0 | ||
|
||
# Homozygous loss filter - TRUE or FALSE | ||
# Default "TRUE" | ||
filter_homozygous: "TRUE" | ||
# Threshold basepairs lost | ||
# Default 10000000 / 10Mbase | ||
homozygous_prop: 10000000 | ||
# Absolute CN homozygous loss threshold | ||
# Default 0.4 | ||
homozygous_threshold: 0.4 | ||
|
||
# Not implemented | ||
#custom_bin: false | ||
#custom_bin_folder: "/custom_bin_data/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
args <- commandArgs(trailingOnly=T) | ||
library(yaml) | ||
|
||
cat("report segments - use 'report_seg_counts.R all' for individual seg counts\n") | ||
|
||
config <- read_yaml(file="config/config.yaml") | ||
|
||
projectBin <- paste0(config$project_name,"_",config$bin,"kb") | ||
outputLoc <- paste0(config$out_dir,"sWGS_fitting/",projectBin,"/") | ||
|
||
pre <- "absolute_PRE_down_sampling/" | ||
post <- "absolute_POST_down_sampling/abs_cn_rds/" | ||
|
||
preFile <- paste0(outputLoc,pre,projectBin,"_relSmoothedCN.rds") | ||
postFile <- paste0(outputLoc,post,projectBin,"_ds_absCopyNumber.rds") | ||
|
||
verbose <- FALSE | ||
if(length(args) > 0){ | ||
if(args[1] == "all"){ | ||
verbose <- TRUE | ||
} | ||
} | ||
|
||
if(file.exists(preFile)){ | ||
suppressMessages(library(QDNAseqmod)) | ||
suppressMessages(library(Biobase)) | ||
preS <- readRDS(preFile) | ||
preS <- preS[featureData(preS)$use] | ||
preSegs <- apply(assayDataElement(preS,"segmented"),MARGIN=2,function(x) length(rle(x)$lengths)) | ||
cat("\nPre-downsampled segments\n") | ||
if(verbose){ | ||
print(preSegs) | ||
} else { | ||
print(summary(preSegs)) | ||
} | ||
if(file.exists(postFile)){ | ||
postS <- readRDS(postFile) | ||
postS <- postS[featureData(postS)$use] | ||
postSegs <- apply(assayDataElement(postS,"segmented"),MARGIN=2,function(x) length(rle(x)$lengths)) | ||
cat("\nPost-downsampled segments\n") | ||
if(verbose){ | ||
print(postSegs) | ||
} else { | ||
print(summary(postSegs)) | ||
} | ||
} | ||
} else { | ||
cat("no pre or post downsampled files found\n") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
PATIENT_ID SAMPLE_ID TP53freq smooth file | ||
PATIENT-1 SAMPLE_3 NA FALSE /data/SAMPLE_3.bam | ||
PATIENT-2 SAMPLE_5 0.97604930362117 FALSE /data/SAMPLE_5.bam | ||
PATIENT-2 SAMPLE_6 0.948429942418426 FALSE /data/SAMPLE_6.bam | ||
PATIENT-3 SAMPLE_10 0.312743806009489 FALSE /data/SAMPLE_10.bam | ||
PATIENT-3 SAMPLE_11 0.313365853658537 FALSE /data/SAMPLE_11.bam | ||
PATIENT-3 SAMPLE_12 0.170947565543071 FALSE /data/SAMPLE_12.bam | ||
PATIENT-3 SAMPLE_13 0.15861669829222 FALSE /data/SAMPLE_13.bam | ||
PATIENT-3 SAMPLE_7 0.326712851405623 FALSE /data/SAMPLE_7.bam | ||
PATIENT-3 SAMPLE_8 0.361060215053763 FALSE /data/SAMPLE_8.bam | ||
PATIENT_ID SAMPLE_ID TP53freq smooth file precPloidy precPurity | ||
PATIENT-1 SAMPLE_3 NA FALSE /data/SAMPLE_3.bam 3.2 0.76 | ||
PATIENT-2 SAMPLE_5 0.97 FALSE /data/SAMPLE_5.bam 2.4 NA | ||
PATIENT-2 SAMPLE_6 0.94 FALSE /data/SAMPLE_6.bam NA 0.55 | ||
PATIENT-3 SAMPLE_10 0.31 TRUE /data/SAMPLE_10.bam NA NA | ||
PATIENT-3 SAMPLE_11 NA FALSE /data/SAMPLE_11.bam NA NA | ||
PATIENT-3 SAMPLE_12 0.17 FALSE /data/SAMPLE_12.bam NA NA | ||
PATIENT-3 SAMPLE_13 0.15 FALSE /data/SAMPLE_13.bam NA NA | ||
PATIENT-3 SAMPLE_7 0.32 TRUE /data/SAMPLE_7.bam NA NA | ||
PATIENT-3 SAMPLE_8 0.36 FALSE /data/SAMPLE_8.bam NA NA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.