Skip to content

Commit

Permalink
Merge pull request #323 from RoanKanninga/master
Browse files Browse the repository at this point in the history
removed duplicated coverage reports
  • Loading branch information
pneerincx authored Aug 21, 2023
2 parents c054aa8 + dec35a2 commit 2c94e89
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions protocols/CopyToResultsDir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ do
done
printf '%s' " finished\n"

#copy vcf file + coveragePerBase.txt + gender determination
printf "Copying vcf files, gender determination, coverage per base and per target files "
#copy vcf file
printf "Copying vcf files"
for sa in "${UNIQUESAMPLES[@]}"
do

Expand All @@ -131,20 +131,6 @@ do
rsync -a "${intermediateDir}/${sa}.final.vcf.gz.tbi" "${projectResultsDir}/variants/"
printf '.'

mapfile -t coveragePerBaseFiles < <(find "${intermediateDir}" -name "${sa}*.coveragePerBase.txt")
if [[ "${#coveragePerBaseFiles[@]}" -eq '0' ]]
then
echo "there are no coveragePerBase files for sample: ${sa}"
continue
else
for coveragePerBaseFile in "${coveragePerBaseFiles[@]}"
do
rsync -a "${coveragePerBaseFile}" "${projectResultsDir}/coverage/CoveragePerBase/"
printf '.'
done
fi


## copy the rejected samples (with less 90% of the targets with > 20x coverage)
mapfile -t rejectedSamples < <(find "${intermediateDir}" -name "${sa}*.rejected")
if [[ "${#rejectedSamples[@]}" -eq '0' ]]
Expand All @@ -158,24 +144,10 @@ do
done
cat "${intermediateDir}/${sa}"*.rejected > "${projectResultsDir}/coverage/rejectedSamplesResult.txt"
fi

mapfile -t coveragePerTargetFiles < <(find "${intermediateDir}" -name "${sa}*.coveragePerTarget.txt")
if [[ "${#coveragePerTargetFiles[@]}" -eq '0' ]]
then
echo "there are no coveragePerTarget files for sample: ${sa}"
continue
else
for coveragePerTargetFile in "${coveragePerTargetFiles[@]}"
do
rsync -a "${coveragePerTargetFile}" "${projectResultsDir}/coverage/CoveragePerTarget/"
printf '.'
done
fi

done
printf " finished\n"


# print README.txt files
printf "Copying QC report to results directory "

Expand Down

0 comments on commit 2c94e89

Please sign in to comment.