Skip to content

Commit

Permalink
added a few fixes to the per-gene analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
swvanderlaan committed Apr 18, 2024
1 parent e3a2d03 commit 759629e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions gwastoolkit.analyzer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ echobold "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echobold " GWASTOOLKIT ANALYZER"
echobold " individual variant, per-gene, regional, or genome-wide association study of a trait"
echobold ""
echobold " Version : v1.3.7"
echobold " Version : v1.3.8"
echobold ""
echobold " Last update: 2023-11-29"
echobold " Last update: 2024-04-18"
echobold " Written by : Sander W. van der Laan (s.w.vanderlaan-2@umcutrecht.nl)."
echobold ""
echobold " Testers : - Saskia Haitjema (s.haitjema@umcutrecht.nl)"
Expand Down Expand Up @@ -704,8 +704,8 @@ fi

echo ""
### Run SNPTEST for each gene and phenotype
FINAL_JOB_ID=""
FINAL_JOB_ID_c=0
FINAL_JOB_ID=""
FINAL_JOB_ID_c=0
while IFS='' read -r REGIONOFINTEREST || [[ -n "$REGIONOFINTEREST" ]]; do
LINE=${REGIONOFINTEREST}
GENELOCUS=$(echo "${LINE}" | awk '{print $1}')
Expand Down
40 changes: 20 additions & 20 deletions gwastoolkit.run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ echobold "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echobold " GWASTOOLKIT"
echobold " individual variant, per-gene, regional, or genome-wide association study of a trait"
echobold ""
echobold " Version : v1.4.2"
echobold " Version : v1.4.3"
echobold ""
echobold " Last update: 2023-11-29"
echobold " Last update: 2024-04-18"
echobold " Written by : Sander W. van der Laan (s.w.vanderlaan-2@umcutrecht.nl)."
echobold ""
echobold " Testers: - Saskia Haitjema (s.haitjema@umcutrecht.nl)"
Expand Down Expand Up @@ -276,13 +276,13 @@ else
##### Create cleaner bash-script to send to qsub
printf "%s\n" "#!/bin/bash" "#" "${GWASTOOLKITDIR}/gwastoolkit.cleaner.sh ${CONFIGURATIONFILE} ${PHENOTYPE} " > ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.sh
JOB_ID_CLEANER_i=$(sbatch --parsable -J CLEANER.${STUDY_TYPE}.${ANALYSIS_TYPE}.${EXCLUSION} --depend=afterany:$(squeue --noheader --format %i --name ANALYZER.DONE.${DATE_TRACK}) -o ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.log -e ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.errors --mem=${QMEMVARCLEANER} -t ${QTIMEVARCLEANER} --mail-user=${YOUREMAIL} --mail-type=${MAILSETTINGS} -D ${PHENO_OUTPUT_DIR} ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.sh)
if [[ ${JOB_IDS_c} == 0 ]]; then
JOB_IDS_PHENO="${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
else
JOB_IDS_PHENO="${JOB_IDS_PHENO},${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
fi
if [[ ${JOB_IDS_c} == 0 ]]; then
JOB_IDS_PHENO="${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
else
JOB_IDS_PHENO="${JOB_IDS_PHENO},${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
fi
done
###### Create summariser bash-script to send to qsub -- SEE REMARKS ABOVE
printf "%s\n" "#!/bin/bash" "#" "${GWASTOOLKITDIR}/summariser.sh ${CONFIGURATIONFILE} " > ${PROJECT}/summariser.${STUDY_TYPE}.${ANALYSIS_TYPE}.${EXCLUSION}.sh
Expand All @@ -300,10 +300,10 @@ else
echo "Creating jobs to perform a per-analysis on your phenotype(s)..."
${GWASTOOLKITDIR}/gwastoolkit.analyzer.sh ${CONFIGURATIONFILE} ${DATE_TRACK}

### Create QC bash-script to send to qsub
JOB_IDS_c=0
### This variable holds the Job_IDs which we will use for setting dependency on the wrapper script
JOB_IDS_PHENO=""
### Create QC bash-script to send to qsub
JOB_IDS_c=0
### This variable holds the Job_IDs which we will use for setting dependency on the wrapper script
JOB_IDS_PHENO=""
while IFS='' read -r GENEOFINTEREST || [[ -n "$GENEOFINTEREST" ]]; do
for GENE in ${GENEOFINTEREST}; do
for PHENOTYPE in ${PHENOTYPES}; do
Expand All @@ -328,13 +328,13 @@ else
##### Submit cleaner script
JOB_ID_CLEANER_i=$(sbatch --parsable -J CLEANER.${STUDY_TYPE}.${ANALYSIS_TYPE}.${EXCLUSION}.${GENE}_${RANGE} --depend=afterany:${JOB_ID_LZ} -o ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.${GENE}_${RANGE}.log -e ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.${GENE}_${RANGE}.errors --mem=${QMEMGENECLEANER} -t ${QTIMEGENECLEANER} --mail-user=${YOUREMAIL} --mail-type=${MAILSETTINGS} -D ${PHENO_OUTPUT_DIR} ${PHENO_OUTPUT_DIR}/cleaner.${STUDY_TYPE}.${ANALYSIS_TYPE}.${PHENOTYPE}.${EXCLUSION}.${GENE}_${RANGE}.sh)
echo ""
if [[ ${JOB_IDS_c} == 0 ]]; then
JOB_IDS_PHENO="${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
else
JOB_IDS_PHENO="${JOB_IDS_PHENO},${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
fi
if [[ ${JOB_IDS_c} == 0 ]]; then
JOB_IDS_PHENO="${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
else
JOB_IDS_PHENO="${JOB_IDS_PHENO},${JOB_ID_CLEANER_i}"
JOB_IDS_c=$((JOB_IDS_c + 1))
fi
done
done
done < ${GENES_FILE}
Expand Down

0 comments on commit 759629e

Please sign in to comment.