Skip to content

Commit

Permalink
Merge pull request #160 from RoanKanninga/master
Browse files Browse the repository at this point in the history
added GavinStandAlone + cleaning up folder
  • Loading branch information
Gerbenvandervries authored Sep 8, 2017
2 parents c7f6101 + d377502 commit b9c510b
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 13 deletions.
10 changes: 5 additions & 5 deletions protocols/CopyResultsGavinStandAlone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#string tmpDataDir
#string inputVcf

cp ${intermediateDir}/*.GAVIN.rlv.vcf ${tmpDataDir}/GavinSA/output/
echo "copied ${intermediateDir}/*.GAVIN.rlv.vcf ${tmpDataDir}/GavinSA/output/"

name=$(basename "${inputVcf}" ".vcf")
mv ${tmpDataDir}/GavinSA/input/${name}.{started,finished}
cp ${intermediateDir}/*.GAVIN.rlv.vcf ${tmpDataDir}/GavinStandAlone/output/
echo "copied ${intermediateDir}/*.GAVIN.rlv.vcf ${tmpDataDir}/GavinStandAlone/output/"

name=$(basename ${inputVcf})
mv ${tmpDataDir}/GavinStandAlone/input/${name}.{started,finished}
mv ${tmpDataDir}/GavinStandAlone/input/processing/${name} ${tmpDataDir}/GavinStandAlone/input/done/
6 changes: 3 additions & 3 deletions protocols/PrepareVcf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#list externalSampleID
#string projectPrefix
#list batchID
#string inputVCF
#string inputVcf

awk '{if ($1 ~ /#/){print $0}}' "${inputVCF}" > "${intermediateDir}/header.vcf"
awk '{if ($1 ~ /#/){print $0}}' "${inputVcf}" > "${intermediateDir}/header.vcf"

awk -v var="${intermediateDir}" '{if ($1 !~ /#/){print $0 >> var"/captured.batch-"$1".vcf"}}' "${inputVCF}"
awk -v var="${intermediateDir}" '{if ($1 !~ /#/){print $0 >> var"/captured.batch-"$1".vcf"}}' "${inputVcf}"

for i in ${batchID[@]}
do
Expand Down
8 changes: 4 additions & 4 deletions startFromVcf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set -e
set -u
module load NGS_DNA/3.4.3-beta
module load NGS_DNA/3.4.2
module list
host=$(hostname -s)
environmentParameters="parameters_${host}"
Expand Down Expand Up @@ -46,7 +46,7 @@ if [[ -z "${vcfFile:-}" ]]; then echo -e '\nERROR: Must specify an inputFile (vc
if [[ -z "${tmpDirectory:-}" ]]; then tmpDirectory=$(basename $(cd ../../ && pwd )) ; fi ; echo "tmpDirectory=${tmpDirectory}"
if [[ -z "${group:-}" ]]; then group=$(basename $(cd ../../../ && pwd )) ; fi ; echo "group=${group}"
if [[ -z "${workDir:-}" ]]; then workDir="/groups/${group}/${tmpDirectory}" ; fi ; echo "workDir=${workDir}"
if [[ -z "${filePrefix:-}" ]]; then filePrefix=$(basename $(pwd )) ; fi ; echo "filePrefix=${filePrefix}"
if [[ -z "${filePrefix:-}" ]]; then filePrefix=$(basename $(pwd )) ;elif [ "${filePrefix}" == "Gavin" ];then filePrefix="Gavin_"$(basename $(pwd ));fi ; echo "filePrefix=${filePrefix}"
if [[ -z "${runID:-}" ]]; then runID="run01" ; fi ; echo "runID=${runID}"

vcfExtension=${vcfFile##*.}
Expand Down Expand Up @@ -118,9 +118,9 @@ ${EBROOTMOLGENISMINCOMPUTE}/molgenis_compute.sh \
--header "${EBROOTNGS_DNA}/templates/slurm/header.ftl" \
--footer "${EBROOTNGS_DNA}/templates/slurm/footer.ftl" \
--submit "${EBROOTNGS_DNA}/templates/slurm/submit.ftl" \
-w "${EBROOTNGS_DNA}/workflow_startWithVcf.csv" \
-w "${EBROOTNGS_DNA}/workflow_startFromVcf.csv" \
-b slurm \
-g \
-weave \
-runid "${runID}" \
-o "ngsversion=${ngsversion};groupname=${group};inputVCF=${intermediateDir}/${vcfFile}"
-o "ngsversion=${ngsversion};groupname=${group};inputVcf=${intermediateDir}/${vcfFile}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function preparePipeline(){
fi
mkdir ${workfolder}/generatedscripts/${_projectName}/

cp ${workfolder}/tmp/NGS_DNA/generate_template.sh ${workfolder}/generatedscripts/${_projectName}/generate_template.sh
cp ${workfolder}/tmp/NGS_DNA/templates/generate_template.sh ${workfolder}/generatedscripts/${_projectName}/generate_template.sh
fgrep "computeVersion," ${workfolder}/tmp/NGS_DNA/parameters.csv > ${workfolder}/generatedscripts/${_projectName}/mcVersion.txt

module load ${NGS_DNA_VERSION}
Expand Down
11 changes: 11 additions & 0 deletions workflow_GavinStandAlone.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
step,protocol,dependencies
s01_PrepareVcf,protocols/PrepareVcf.sh,
s02_SnpEff,protocols/SnpEff.sh,s01_PrepareVcf
s03_CmdLineAnnotator,protocols/CmdLineAnnotator.sh,s02_SnpEff
s04_MergeBatches,protocols/MergeBatches.sh,s03_CmdLineAnnotator;extension=annotatedExtension
s05_SplitIndelsAndSNPs,protocols/SplitIndelsAndSNPs.sh,s04_MergeBatches
s06a_SnpFiltration,protocols/SnpFiltration.sh,s05_SplitIndelsAndSNPs
s06b_IndelFiltration,protocols/IndelFiltration.sh,s05_SplitIndelsAndSNPs
s07_MergeIndelsAndSnps,protocols/MergeIndelsAndSnps.sh,s06b_IndelFiltration;s06a_SnpFiltration
s08_Gavin,protocols/Gavin.sh,s07_MergeIndelsAndSnps
s09_CopyGavinStandAloneResults,protocols/CopyResultsGavinStandAlone.sh,s08_Gavin
File renamed without changes.

0 comments on commit b9c510b

Please sign in to comment.