Skip to content

Commit

Permalink
expose pair support args
Browse files Browse the repository at this point in the history
  • Loading branch information
jluebeck committed Dec 9, 2024
1 parent a0471da commit 53af67f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions AmpliconSuite-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ def run_AA(amplified_interval_bed, AA_outdir, sname, args):
insert_sdevs = args.AA_insert_sdevs
sv_vcf = args.sv_vcf
sv_vcf_no_filter = args.sv_vcf_no_filter
pair_support = args.pair_support_min
fb_pair_support = args.foldback_pair_support_min


AA_version = \
Popen([AA_interpreter, AA_SRC + "/AmpliconArchitect.py", "--version"], stdout=PIPE, stderr=PIPE).communicate()[0].rstrip()
Expand All @@ -304,6 +307,12 @@ def run_AA(amplified_interval_bed, AA_outdir, sname, args):
if sv_vcf_no_filter:
cmd += " --sv_vcf_no_filter"

if pair_support:
cmd += " --pair_support_min {}".format(str(pair_support))

if fb_pair_support:
cmd += " --foldback_pair_support_min {}".format(str(fb_pair_support))

logging.info(cmd + "\n")
aa_exit_code = call(cmd, shell=True)
if aa_exit_code != 0:
Expand Down Expand Up @@ -619,6 +628,13 @@ def contains_spaces(file_path):
parser.add_argument("--AA_insert_sdevs", help="Number of standard deviations around the insert size. May need to "
"increase for sequencing runs with high variance after insert size selection step. (default "
"3.0)", metavar="FLOAT", type=float, default=None)
parser.add_argument('--pair_support_min', dest='pair_support_min', help="Number of read pairs for "
"minimum breakpoint support (default 2 but typically becomes higher due to coverage-scaled "
"cutoffs)", metavar='INT', action='store', type=int, default=2)
parser.add_argument('--foldback_pair_support_min', help="Number of read pairs for minimum foldback SV support "
"(default 2 but typically becomes higher due to coverage-scaled cutoffs). Used value will be the maximum"
" of pair_support and this argument. Raising to 3 will help dramatically in heavily artifacted samples.",
metavar='INT', action='store', type=int, default=2)
parser.add_argument("--normal_bam", metavar='FILE', help="Path to matched normal bam for CNVKit (optional)")
parser.add_argument("--ploidy", metavar='FLOAT', type=float, help="Ploidy estimate for CNVKit (optional). This is not used outside of CNVKit.",
default=None)
Expand Down
13 changes: 13 additions & 0 deletions docker/run_paa_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ def metadata_helper(metadata_args):
parser.add_argument("--AA_insert_sdevs", help="Number of standard deviations around the insert size. May need to "
"increase for sequencing runs with high variance after insert size selection step. (default "
"3.0)", type=float, default=None)
parser.add_argument('--pair_support_min', dest='pair_support_min', help="Number of read pairs for "
"minimum breakpoint support (default 2 but typically becomes higher due to coverage-scaled "
"cutoffs)", metavar='INT', action='store', type=int, default=2)
parser.add_argument('--foldback_pair_support_min', help="Number of read pairs for minimum foldback SV support "
"(default 2 but typically becomes higher due to coverage-scaled cutoffs). Used value will be the maximum"
" of pair_support and this argument. Raising to 3 will help dramatically in heavily artifacted samples.",
metavar='INT', action='store', type=int, default=2)
parser.add_argument(
"--normal_bam", help="Path to matched normal bam for CNVKit (optional)", default=None)
parser.add_argument("--ploidy", type=int,
Expand Down Expand Up @@ -238,6 +245,12 @@ def metadata_helper(metadata_args):
if args.AA_insert_sdevs:
argstring += " --AA_insert_sdevs " + str(args.AA_insert_sdevs)

if args.pair_support_min:
argstring += " --pair_support_min " + str(args.pair_support_min)

if args.foldback_pair_support_min:
argstring += " --foldback_pair_support_min " + str(args.foldback_pair_support_min)

# To use, would need to mount the directory of this file. Users should just modify as needed afterwards.
# if args.sample_metadata:
# args.sample_metadata = os.path.abspath(args.sample_metadata)
Expand Down
13 changes: 13 additions & 0 deletions singularity/run_paa_singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ def metadata_helper(metadata_args):
parser.add_argument("--AA_insert_sdevs", help="Number of standard deviations around the insert size. May need to "
"increase for sequencing runs with high variance after insert size selection step. (default "
"3.0)", type=float, default=None)
parser.add_argument('--pair_support_min', dest='pair_support_min', help="Number of read pairs for "
"minimum breakpoint support (default 2 but typically becomes higher due to coverage-scaled "
"cutoffs)", metavar='INT', action='store', type=int, default=2)
parser.add_argument('--foldback_pair_support_min', help="Number of read pairs for minimum foldback SV support "
"(default 2 but typically becomes higher due to coverage-scaled cutoffs). Used value will be the maximum"
" of pair_support and this argument. Raising to 3 will help dramatically in heavily artifacted samples.",
metavar='INT', action='store', type=int, default=2)
parser.add_argument(
"--normal_bam", help="Path to matched normal bam for CNVKit (optional)", default=None)
parser.add_argument("--ploidy", type=int,
Expand Down Expand Up @@ -236,6 +243,12 @@ def metadata_helper(metadata_args):
if args.AA_insert_sdevs:
argstring += " --AA_insert_sdevs " + str(args.AA_insert_sdevs)

if args.pair_support_min:
argstring += " --pair_support_min " + str(args.pair_support_min)

if args.foldback_pair_support_min:
argstring += " --foldback_pair_support_min " + str(args.foldback_pair_support_min)

# To use, would need to mount the directory of this file. Users should just modify as needed afterwards.
# if args.sample_metadata:
# args.sample_metadata = os.path.abspath(args.sample_metadata)
Expand Down

0 comments on commit 53af67f

Please sign in to comment.