Skip to content

Commit

Permalink
Merge pull request #193 from RoanKanninga/master
Browse files Browse the repository at this point in the history
added managevariantlist parser + updated makebedfordiagnostics
  • Loading branch information
marieke-bijlsma authored Feb 13, 2018
2 parents 85559b5 + 1d62328 commit 87aed73
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
1 change: 1 addition & 0 deletions countCoverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ fi
for i in "${REJECTEDSAMPLES[@]}"
do
echo "removed ${WORKDIR}/coverage/${i}.coverage"
echo "removed ${WORKDIR}/coverage/${i}.coverage" > ${WORKDIR}/rejectedSamples.txt
rm ${WORKDIR}/coverage/${i}.coverage
done

Expand Down
21 changes: 12 additions & 9 deletions makeBedForDiagnostics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Options:
-h Show this help.
-b Name of the BED file
-n Name of the new BED file
-w Bedfile directory --> where to write to (default: this directory)
-e Making BED file for exomekit true/false [default=false]
===============================================================================================================
EOH
Expand All @@ -24,9 +25,9 @@ EOH
}


while getopts "b:d:e:h" opt;
while getopts "b:n:e:w:h" opt;
do
case $opt in h)showHelp;; b)bedfile="${OPTARG}";; n)name="${OPTARG}";; e)exome="${OPTARG}";;
case $opt in h)showHelp;; b)bedfile="${OPTARG}";; n)name="${OPTARG}";; w)workDir="${OPTARG}";; e)exome="${OPTARG}";;
esac
done

Expand All @@ -51,6 +52,10 @@ if [[ -z "${exome:-}" ]]
then
exome="false"
fi
if [[ -z "${workdir:-}" ]]
then
workdir=$(pwd)
fi


if [ -d "/apps/data/Agilent/${name}" ]
Expand All @@ -63,22 +68,20 @@ then
exit 1
fi

thisDir=$(pwd)
umcgDir=/apps/data/UMCG/Diagnostics/

mkdir -p "${name}/human_g1k_v37/"
mkdir -p "${workdir}/${name}/human_g1k_v37/"
echo "created ${name}/human_g1k_v37/"
cp "${bedfile}" "${name}"/
echo "copied ${bedfile} ${name}/"
cp "${bedfile}" "${workdir}/${name}"/
echo "copied ${bedfile} ${workdir}/${name}/"
## navigate to folder
cd "${name}"
cd ${workdir}/"${name}"


cp "${bedfile}" "human_g1k_v37/captured.bed"
echo "copied ${bedfile} to human_g1k_v37/captured.bed"

module load ngs-utils

cd human_g1k_v37/

## Run the prepare step
Expand All @@ -97,7 +100,7 @@ else
fi

##
cd "${thisDir}"
cd "${workdir}"
echo "copied ${name} to ${umcgDir}"
cp -r "${name}" ${umcgDir}

Expand Down
20 changes: 20 additions & 0 deletions parseManVarList.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set -eu
manList=$1

ml ngs-utils
EBROOTNGSMINUTILS=$HOME/github/ngs-utils
if ls -d /apps/data/UMCG/ManVarList* 1> /dev/null 2>&1
then
version=$(ls -d /apps/data/UMCG/ManVarList* | tail -1 | awk 'BEGIN {FS="_v"}{print $2+1}')
else
version=1
fi
## UMCG-MVL_VKGLconsensusMVL-2017-11-27.txt
awk '{print $1,$2}' "${manList}" \
| awk -F ':' '{print $1"\t"$2"\t"$3"\t"$4}' | awk '{if ($2 ~ /-/){print $1"\t"$2"\t"$3}else {print $1"\t"$2"-"$2"\t"$3}}' | awk -F '-' '{print $1"\t"$2}' | awk '{print $1"\t"($2-1)"\t"$3"\t"$4}' | sed '1d' > /apps/data/UMCG/ManVarList_v${version}_target.bed
cd /apps/data/UMCG/

sh ${EBROOTNGSMINUTILS}/makeBedForDiagnostics.sh -b ManVarList_v${version}_target.bed -n ManVarList_v${version} -w /apps/data/UMCG/

cd -

0 comments on commit 87aed73

Please sign in to comment.