Skip to content
This repository was archived by the owner on Jan 27, 2020. It is now read-only.

Commit 58dce6d

Browse files
authored
Merge pull request #485 from szilvajuhos/master
Fixing #357 also better speedseq filter for FreeBayes
2 parents 8cee6f6 + 0c8055d commit 58dce6d

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

main.nf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,8 @@ process RunAscat {
13071307

13081308
script:
13091309
"""
1310+
# get rid of "chr" string if there is any
1311+
for f in *BAF *LogR; do sed 's/chr//g' \$f > tmpFile; mv tmpFile \$f;done
13101312
run_ascat.r $bafTumor $logrTumor $bafNormal $logrNormal $idSampleTumor $baseDir
13111313
"""
13121314
}

scripts/skeleton_batch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ ln -fs /castor/project/proj_nobackup/CAW/containers containers
2121

2222
export NXF_TEMP=/scratch
2323
export NXF_LAUNCHBASE=/scratch
24-
export NXF_WORK=`pwd`/work
24+
export NXF_WORK=/scratch
2525
export NXF_HOME=/castor/project/proj_nobackup/nextflow
2626
export PATH=${NXF_HOME}/bin:${PATH}
27-
nextflow run ${CAW}/main.nf --step skipPreprocessing -profile singularityLocal --tools $2 --sample $1 -with-timeline ${PREFIX}.timeline.html -with-trace ${PREFIX}.trace.txt
27+
nextflow run ${CAW}/main.nf --step skipPreprocessing --tools $2 --sample $1 -with-timeline ${PREFIX}.timeline.html -with-trace ${PREFIX}.trace.txt
2828

2929
# for annotation run
3030
# sbatch -J sample-Ann ./whatever.sh result.vcf[.gz] snpEff
31-
# nextflow run ${CAW}/main.nf --step annotate -profile singularityLocal --tools $2 --annotateVCF $1 --noReports --sample Preprocessing/Recalibrated/recalibrated.tsv -with-timeline ${PREFIX}.timeline.html -with-trace -with-trace ${PREFIX}.trace.txt
31+
# nextflow run ${CAW}/main.nf --step annotate --tools $2 --annotateVCF $1 --sample Preprocessing/Recalibrated/recalibrated.tsv -with-timeline ${PREFIX}.timeline.html -with-trace ${PREFIX}.trace.txt

scripts/speedseq.filter.awk

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@ BEGIN{
22
MINQUAL=1;
33
SSC_THRES=-100; # somatic score threshold ssc = LOD_T + LOD_N, log of odds (LOD) is the genotype quality ratio (http://www.nature.com/nmeth/journal/v12/n10/pdf/nmeth.3505.pdf)
44
ONLY_SOMATIC=1; # prints out only somatic lines if not zero
5-
NORMAL=10; # index of normal sample genotype
6-
TUMOR=11; # index of tumor sample genotype
5+
NORMAL=11; # index of normal sample genotype
6+
TUMOR=10; # index of tumor sample genotype
77
GL_IDX=0; # GL in the original: PL is the Normalized, Phred-scaled likelihoods for genotypes
88
}
99
{
1010
OFS="\t";
1111

12-
if ($0~"^#") { print ; next; }
12+
if ($0~"^#" && $0!~"^#CHROM") { print ; next; }
13+
# add extra header line
14+
if ($0~"^#CHROM") {
15+
print "##INFO=<ID=DQUAL,Number=1,Type=Float,Description=\"SpeedSeq log of odds filter doi:10.1038/nmeth.3505 .\">"
16+
print ;
17+
}
1318
if (! GL_IDX) {
1419
split($9,fmt,":")
15-
for (i=1;i<=length(fmt);++i) { if (fmt[i]=="PL") GL_IDX=i }
20+
for (i=1;i<=length(fmt);++i) { if (fmt[i]=="GL") GL_IDX=i }
1621
}
1722
split($NORMAL,N,":"); # split field 10 and put values into
1823
split(N[GL_IDX],NGL,",");
@@ -29,11 +34,11 @@ BEGIN{
2934

3035
if (DQUAL>=SSC_THRES && $NORMAL~"^0/0") {
3136
$7="PASS"
32-
$8="SSC="DQUAL";"$8
37+
$8="DQUAL="DQUAL";"$8
3338
print
3439
}
3540
else if (!ONLY_SOMATIC && $6>=MINQUAL && $10~"^0/0" && ! match($11,"^0/0")) {
36-
$8="SSC="DQUAL";"$8
41+
$8="DQUAL="DQUAL";"$8
3742
print
3843
}
3944
}

0 commit comments

Comments
 (0)