Skip to content

Commit 59cbc3c

Browse files
committed
Merge branch 'master' of lsource2.decode.is:stat/popSTR
Conflicts: Makefile
2 parents 4de799b + 310204d commit 59cbc3c

8 files changed

Lines changed: 18 additions & 64 deletions

File tree

checkExpansions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MaxRepLength=$2
44
HG38=$3
55
for i in {1,2,3,4,5,6,7,8,9,10,12,13,14,16,18,19,20,21,22,X}
66
do
7-
./computeReadAttributes $BAM . ./panelMarkerInfo/chr${i}markerInfo 4 $MaxRepLength chr${i} $HG38 ./markerInfo/longRepeats Y
7+
./popSTR computeReadAttributes $BAM . <(cut -d ' ' -f 1-11,14- ./panelMarkerInfo/chr${i}markerInfo) 4 $MaxRepLength chr${i} $HG38 ./markerInfo/longRepeats Y
88
done
99

1010
while read -r fileName limit
@@ -13,4 +13,4 @@ do
1313
motifLength=`echo $fileName | cut -d '_' -f 2 | awk '{print length($1)}'`
1414
lineAtLengthLimit=`awk -v motifLength="$motifLength" -v maxRepLength="$MaxRepLength" 'NF==8 && substr($1,1,3) != "chr" && $1>=maxRepLength/motifLength' ./attributes/${fileName} | wc -l`
1515
echo "Marker $fileName has $lineAboveLimit reads supporting a pathogenic expansion and $lineAtLengthLimit reads with repeat longer than $MaxRepLength bases."
16-
done < ./markersAndLimits
16+
done < ./panelMarkerInfo/markersAndLimits

markersAndLimits

Lines changed: 0 additions & 31 deletions
This file was deleted.

panelMarkerInfo.tar.gz

4.71 KB
Binary file not shown.

panelTable.pdf

-38.9 KB
Binary file not shown.

run.sh

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
#!/bin/bash
22
BAMLIST=$1
33
REFERENCE=$2
4+
MARKERS_PER_JOB=$3
45
CODE_DIR=`dirname $0`
56
CURR_DIR=`pwd`
67

7-
#run computeReadAttributes for all chromosomes in parallel
8-
echo "Computing read attributes."
8+
#call runPerChrom for all autosomes sequentially
99
for i in {1..22}
1010
do
11-
echo "${CODE_DIR}/computeReadAttributes ${BAMLIST} ${CURR_DIR} ${CODE_DIR}/markerInfo/chr${i}markerInfo 8 135 chr${i} ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
12-
done | parallel
13-
14-
#run computePnSlippageDefault to get pnSlipps using kernel
15-
echo "Computing pn-slippage rates."
16-
${CODE_DIR}/computePnSlippageDefault -PL <(cols 1 $BAMLIST) -AD ${CURR_DIR}/attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels
17-
18-
#make directory for vcf files
19-
echo "Making directory for vcf file."
20-
mkdir -p vcfs
21-
22-
#run msGenotyper on all chromosomese using attributes and pnSlippage we now have
23-
echo "Genotyping markers."
24-
for i in {1..22}
25-
do
26-
echo "${CODE_DIR}/msGenotyperDefault -ADCN ${CURR_DIR}/attributes/chr${i} -PNS pnSlippage -MS markerSlippageChr${i} -VD ./vcfs -VN chr${i} -ML <(cols 1,2,3,4 ${CODE_DIR}/markerInfo/chr${i}markerInfo) -I 0 -FP 1"
27-
done | parallel
11+
${CODE_DIR}/runPerChrom.sh $BAMLIST $REFERENCE chr${i} $MARKERS_PER_JOB
12+
done

runPerChrom.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ for ((i=1; i<=$lastJobIdx; i++))
2020
do
2121
if [ $i -eq $lastJobIdx ]
2222
then
23-
echo "${CODE_DIR}/computeReadAttributes ${BAMLIST} ${CURR_DIR} <(tail -n ${tailNum} ${CODE_DIR}/markerInfo/${CHROM}markerInfo | cut -d ' ' -f 1-11,14-) 8 135 ${CHROM} ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
23+
echo "${CODE_DIR}/popSTR computeReadAttributes ${BAMLIST} ${CURR_DIR} <(tail -n ${tailNum} ${CODE_DIR}/markerInfo/${CHROM}markerInfo | cut -d ' ' -f 1-11,14-) 8 135 ${CHROM} ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
2424
else
2525
headNum=`calc ${i}*${MARKERS_PER_JOB} | cut -d ' ' -f 3 | cut -d '.' -f 1`
26-
echo "${CODE_DIR}/computeReadAttributes ${BAMLIST} ${CURR_DIR} <(head -n ${headNum} ${CODE_DIR}/markerInfo/${CHROM}markerInfo | tail -n ${MARKERS_PER_JOB} | cut -d ' ' -f 1-11,14-) 8 135 ${CHROM} ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
26+
echo "${CODE_DIR}/popSTR computeReadAttributes ${BAMLIST} ${CURR_DIR} <(head -n ${headNum} ${CODE_DIR}/markerInfo/${CHROM}markerInfo | tail -n ${MARKERS_PER_JOB} | cut -d ' ' -f 1-11,14-) 8 135 ${CHROM} ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
2727
fi
2828
done | parallel
2929

3030
#Check if attributes for kernel markers have been computed
3131
chr21dir=${CURR_DIR}/attributes/chr21
3232
if [ ! -d "$chr21dir" ]; then
3333
echo "Attributes have not been computed for kernel markers and will be computed now."
34-
${CODE_DIR}/computeReadAttributes ${BAMLIST} ${CURR_DIR} <(cut -d ' ' -f 1-11,14- ${CODE_DIR}/kernel/kernelMarkersInfo) 8 135 chr21 ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N
34+
${CODE_DIR}/popSTR computeReadAttributes ${BAMLIST} ${CURR_DIR} <(cut -d ' ' -f 1-11,14- ${CODE_DIR}/kernel/kernelMarkersInfo) 8 135 chr21 ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N
3535
fi
3636

3737
#check if pnSlippage has been computed
3838
pnSlippageFile=${CURR_DIR}/pnSlippage
3939
if [ ! -f "$pnSlippageFile" ]; then
4040
echo "pn-slippage rates have not been estimated and will be estimated now."
41-
${CODE_DIR}/computePnSlippageDefault -PL <(awk '{print $1}' $BAMLIST) -AD ${CURR_DIR}/attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels
41+
${CODE_DIR}/popSTR computePnSlippageDefault -PL <(awk '{print $1}' $BAMLIST) -AD ${CURR_DIR}/attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels
4242
fi
4343

4444

@@ -52,10 +52,10 @@ for ((i=1; i<=$lastJobIdx; i++))
5252
do
5353
if [ $i -eq $lastJobIdx ]
5454
then
55-
echo "${CODE_DIR}/msGenotyperDefault -ADCN ${CURR_DIR}/attributes/${CHROM} -PNS pnSlippage -MS markerSlippage${CHROM} -VD ${CURR_DIR}/vcfs -VN ${CHROM} -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/markerInfo/${CHROM}markerInfo | tail -n ${tailNum}) -I ${lastJobIdx} -FP 1"
55+
echo "${CODE_DIR}/popSTR msGenotyperDefault -ADCN ${CURR_DIR}/attributes/${CHROM} -PNS pnSlippage -MS markerSlippage${CHROM} -VD ${CURR_DIR}/vcfs -VN ${CHROM} -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/markerInfo/${CHROM}markerInfo | tail -n ${tailNum}) -I ${lastJobIdx} -FP 1"
5656
else
5757
headNum=`calc ${i}*${MARKERS_PER_JOB} | cut -d ' ' -f 3 | cut -d '.' -f 1`
58-
echo "${CODE_DIR}/msGenotyperDefault -ADCN ${CURR_DIR}/attributes/${CHROM} -PNS pnSlippage -MS markerSlippage${CHROM} -VD ${CURR_DIR}/vcfs -VN ${CHROM} -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/markerInfo/${CHROM}markerInfo | head -n ${headNum} | tail -n ${MARKERS_PER_JOB}) -I ${i} -FP 1"
58+
echo "${CODE_DIR}/popSTR msGenotyperDefault -ADCN ${CURR_DIR}/attributes/${CHROM} -PNS pnSlippage -MS markerSlippage${CHROM} -VD ${CURR_DIR}/vcfs -VN ${CHROM} -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/markerInfo/${CHROM}markerInfo | head -n ${headNum} | tail -n ${MARKERS_PER_JOB}) -I ${i} -FP 1"
5959
fi
6060
done | parallel
6161

runSmall.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ REFERENCE=$2
44
CODE_DIR=`dirname $0`
55

66
#Compute attributes for chr21 markers (from kernel)
7-
echo "${CODE_DIR}/computeReadAttributes ${BAMLIST} . <(cut -d ' ' -f 1-11,14- ${CODE_DIR}/kernel/kernelMarkersInfo) 8 135 chr21 ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
8-
${CODE_DIR}/computeReadAttributes ${BAMLIST} . <(cut -d ' ' -f 1-11,14- ${CODE_DIR}/kernel/kernelMarkersInfo) 8 135 chr21 ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N
7+
echo "${CODE_DIR}/popSTR computeReadAttributes ${BAMLIST} . <(cut -d ' ' -f 1-11,14- ${CODE_DIR}/kernel/kernelMarkersInfo) 8 135 chr21 ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N"
8+
${CODE_DIR}/popSTR computeReadAttributes ${BAMLIST} . <(cut -d ' ' -f 1-11,14- ${CODE_DIR}/kernel/kernelMarkersInfo) 8 135 chr21 ${REFERENCE} ${CODE_DIR}/markerInfo/longRepeats N
99

1010
#Compute pnSlippage for samples in BAMLIST
11-
echo "${CODE_DIR}/computePnSlippageDefault -PL <(awk '{print $1}' $BAMLIST) -AD ./attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels"
12-
${CODE_DIR}/computePnSlippageDefault -PL <(awk '{print $1}' $BAMLIST) -AD ./attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels
11+
echo "${CODE_DIR}/popSTR computePnSlippageDefault -PL <(awk '{print $1}' $BAMLIST) -AD ./attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels"
12+
${CODE_DIR}/popSTR computePnSlippageDefault -PL <(awk '{print $1}' $BAMLIST) -AD ./attributes/chr21 -OF pnSlippage -FP 1 -MS ${CODE_DIR}/kernel/kernelSlippageRates -MD ${CODE_DIR}/kernel/kernelModels
1313

1414
#make directory for vcf files
1515
echo "mkdir -p vcfs"
1616
mkdir -p vcfs
1717

1818
#run msGenotyper
19-
echo "${CODE_DIR}/msGenotyperDefault -ADCN ./attributes/chr21 -PNS pnSlippage -MS markerSlippageChr21 -VD ./vcfs -VN chr21_small -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/kernel/kernelMarkersInfo) -I 0 -FP 1"
20-
${CODE_DIR}/msGenotyperDefault -ADCN ./attributes/chr21 -PNS pnSlippage -MS markerSlippageChr21 -VD ./vcfs -VN chr21_small -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/kernel/kernelMarkersInfo) -I 0 -FP 1
19+
echo "${CODE_DIR}/popSTR msGenotyperDefault -ADCN ./attributes/chr21 -PNS pnSlippage -MS markerSlippageChr21 -VD ./vcfs -VN chr21_small -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/kernel/kernelMarkersInfo) -I 0 -FP 1"
20+
${CODE_DIR}/popSTR msGenotyperDefault -ADCN ./attributes/chr21 -PNS pnSlippage -MS markerSlippageChr21 -VD ./vcfs -VN chr21_small -ML <(cut -d ' ' -f 1,2,3,4,12,13 ${CODE_DIR}/kernel/kernelMarkersInfo) -I 0 -FP 1

runtimeAnalysis.pdf

-29.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)