Skip to content
This repository has been archived by the owner on Feb 28, 2025. It is now read-only.

Commit

Permalink
Fixed issue 18
Browse files Browse the repository at this point in the history
  • Loading branch information
calizilla committed Jul 8, 2022
1 parent 47ddacf commit 8a56949
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 11 deletions.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified align_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified bqsr_apply_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified bqsr_gather_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified bqsr_merge_run_parallel.pbs
100644 → 100755
Empty file.
25 changes: 14 additions & 11 deletions bqsr_recal_make_input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@

cohort=../$1

group=false
group=true

if [[ $group =~ true ]]; then
printf "Creating group-based BQSR recalibration inputs from ${cohort}.config\n"
else
printf "Creating BQSR recalibration inputs from ${cohort}.config, no sample grouping applied\n"
fi

t_input=./Inputs/bqsr_recal.inputs-tumour
n_input=./Inputs/bqsr_recal.inputs-normal
Expand All @@ -36,43 +42,40 @@ rm -f $input
intervals=$(ls -1 ../Reference/BQSR_intervals/*list) #directory of text files generated by GATK SplitIntervals
intervals=($intervals)

# Collect sample IDs from samples.config
# Only collect IDs for germline variant calling (labids ending in -B or -N)
# Collect sample IDs from cohort.config
while read -r sampleid labid seq_center library; do
if [[ ! ${sampleid} =~ ^#.*$ && ! ${labid} =~ -T.*$ && ! ${labid} =~ -P.*$ && ! ${labid} =~ -M.*$ ]]; then
if [[ ! ${sampleid} =~ ^#.*$ ]]
then
if [[ $group =~ true ]]; then
if [[ $labid =~ *-N|B ]]; then
if [[ $labid =~ -N|-B ]]; then
samples_n+=("${labid}")
group_input=${n_input}
else
samples_t+=("${labid}")
group_input=${t_input}
fi
else
samples+=("${labid}")
group_input=${input}
fi
fi
done < "${cohort}.config"

for n_sample in ${samples_n[@]}; do
for ((i=0;i<${#intervals[@]};i++))
do
printf "${n_sample},${i},${intervals[i]}\n" >> ${group_input}
printf "${n_sample},${i},${intervals[i]}\n" >> ${n_input}
done
done

for t_sample in ${samples_t[@]}; do
for ((i=0;i<${#intervals[@]};i++))
do
printf "${t_sample},${i},${intervals[i]}\n" >> ${group_input}
printf "${t_sample},${i},${intervals[i]}\n" >> ${t_input}
done
done

for sample in ${samples[@]}; do
for ((i=0;i<${#intervals[@]};i++))
do
printf "${sample},${i},${intervals[i]}\n" >> ${group_input}
printf "${sample},${i},${intervals[i]}\n" >> ${input}
done

done
Expand Down
Empty file modified bqsr_recal_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified bwa-postalt.js
100644 → 100755
Empty file.
Empty file modified create_gatk_ref_intervals.pbs
100644 → 100755
Empty file.
Empty file modified dedup_sort_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified fastqc_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified index_reference.pbs
100644 → 100755
Empty file.
Empty file modified index_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified merge_align_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified split_fastq_check_fastq_input_vs_split_output_run_parallel.pbs
100644 → 100755
Empty file.
Empty file modified split_fastq_run_parallel.pbs
100644 → 100755
Empty file.

0 comments on commit 8a56949

Please sign in to comment.