Skip to content

Commit

Permalink
Merge pull request #263 from RoanKanninga/master
Browse files Browse the repository at this point in the history
added new compareWith VKGL b38 script to tortilla
  • Loading branch information
pneerincx authored Feb 26, 2024
2 parents 84676f3 + 28c2c07 commit 5fa9309
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions bin/compareWithVKGL_gatk4_b38.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ function showHelp() {
#
cat <<EOH
===============================================================================================================
Script to compare a vcf file with the VKGL data
Script to compare a vcf file with the GIAB HC callset(HG002_GRCh38_1_22_v4.2.1) for the VKGL veldnorm
Usage:
$(basename "${0}") OPTIONS
Options:
-h Show this help.
-i inputFile
-t workDir working directory (default= CURRENTDIR)
-b which build, ucsc (chr1, chr2,chrX etc) or regular (1,2,X etc) default is regular
-b which build, UCSC (chr1, chr2,chrX etc) or regular (1,2,X etc) default is UCSC
-o outputFolder (default:\${workDir}/output/)
===============================================================================================================
Expand Down
8 changes: 4 additions & 4 deletions bin/gvcf2bed2.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def read_targets(bed,gVCF,outputFile):
# gVCF = cyvcf2.VCF(gVCF)
content=[]
with open(outputFile, "w") as ohandle:
ohandle.write(str("chr\tstart\tstop\tgene\tGQ_low\tGQ_medium\tGQ_high\tavgDp\tpercentage DP<20\tpercentage DP>20\tsummedDP\ttargetSize\tnumberBasesDPInCategoryLow\tnumberBasesZeroCoverage" + "\n" ))
ohandle.write(str("chr\tstart\tstop\tgene\tGQ_low\tGQ_medium\tGQ_high\tavgDp\tpercentage DP<10\tpercentage DP>10\tsummedDP\ttargetSize\tnumberBasesDPInCategoryLow\tnumberBasesZeroCoverage" + "\n" ))
with open(bed)as f:
for line in f:
content= line.strip().split()
Expand Down Expand Up @@ -223,7 +223,7 @@ def main():
global dictGQThresholds
global dictDPThresholds
dictGQThresholds = {'low': 20, 'medium': 50, 'high': 50}
dictDPThresholds = {'low': 20}
dictDPThresholds = {'low': 10}

parser = argparse.ArgumentParser(description=desc)

Expand All @@ -238,8 +238,8 @@ def main():
parser.add_argument("-q", "--qualityThresholds", type=list, default=[20,50],
help="Genotype quality range per category low, medium, high. default: [20,50]"
"This results in GQ categories: low: 0 <-> 20, medium: 21 <-> 50, high: > 51")
parser.add_argument("-d", "--depthThresholds", type=list, default=[20],
help="DepthThreshold, default=[20] this results in GQ categories: low: 0 <-> 20,high: > 20")
parser.add_argument("-d", "--depthThresholds", type=list, default=[10],
help="DepthThreshold, default=[10] this results in GQ categories: low: 0 <-> 10,high: > 10")
parser.add_argument("-b", "--bedfile", type=str,required=True,help="target bedfile to calculate percentage per quality threshold."
"Bedfile must contain colunms: chr \t start \t stop \t gene")
parser.add_argument("-g", "--bedgraph", type=bool, default=True,
Expand Down
28 changes: 17 additions & 11 deletions bin/tortilla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ cat <<EOH
Script requires one initial argument:
-m|--makeSamplesheet Go to tortilla_makeSamplesheet, for different make samplesheet options. (tortilla_makeSamplesheet.sh)
-b|--bamout Recreating the bam file for a certain region where the variant calling is based on (bamout.sh)
-c|--countCoverage Counting coverage (avg,med,sd,percentage 10/20/30/50/100x coverage) per Gene and target based on the panel that is given (countCoverage.sh)
-v|--vcfCompare Comparing 2 vcf files with eachother, this will output the differences + a vcf stats file (vcf-compare_2.0.sh)
-n|--validateNGS Script to check the known SNPs back in the NGS_DNA_Verification (checkValidationNGS_DNA_v7.sh)
-cv|--compareWithVKGL script that compares vcf files with the VKGL standard
-cv4|--compareWithVKGL_GATK4 same as compareWithVKGL but with gatk4 commands
-r|--revertBamToFastQ go back from bam to fastq (paired end only)
-cc|--calculateCoverage CoveragePerBase or per Target calculations for a specific targetpanel
-d|--cramToBam Converting cram files to bam(CramConversion.sh)
-l|--liftover Liftover vcf file (LiftoverVcf.sh)
-m|--makeSamplesheet Go to tortilla_makeSamplesheet, for different make samplesheet options. (tortilla_makeSamplesheet.sh)
-b|--bamout Recreating the bam file for a certain region where the variant calling is based on (bamout.sh)
-c|--countCoverage Counting coverage (avg,med,sd,percentage 10/20/30/50/100x coverage) per Gene and target based on the panel that is given (countCoverage.sh)
-v|--vcfCompare Comparing 2 vcf files with eachother, this will output the differences + a vcf stats file (vcf-compare_2.0.sh)
-n|--validateNGS Script to check the known SNPs back in the NGS_DNA_Verification (checkValidationNGS_DNA_v7.sh)
-cv|--compareWithVKGL script that compares vcf files with the VKGL standard
-cv4|--compareWithVKGL_GATK4 same as compareWithVKGL but with gatk4 commands
-cv438|--compareWithVKGL_GATK4 compareWithVKGL, with GATK and GRCh38
-r|--revertBamToFastQ go back from bam to fastq (paired end only)
-cc|--calculateCoverage CoveragePerBase or per Target calculations for a specific targetpanel
-d|--cramToBam Converting cram files to bam(CramConversion.sh)
-l|--liftover Liftover vcf file (LiftoverVcf.sh)
===============================================================================================================
EOH
trap - EXIT
Expand Down Expand Up @@ -66,6 +67,11 @@ then
shift
# shellcheck disable=SC2154
"${EBROOTNGSMINUTILS}/bin/compareWithVKGL_gatk4.sh" "${@}"
elif [[ "${1}" == "--compareWithVKGL_GATK4_38" || "${1}" == "-cv438" ]]
then
shift
# shellcheck disable=SC2154
"${EBROOTNGSMINUTILS}/bin/compareWithVKGL_gatk4_b38.sh" "${@}"
elif [[ "${1}" == "--revertBamToFastQ" || "${1}" == "-r" ]]
then
shift
Expand Down

0 comments on commit 5fa9309

Please sign in to comment.