Skip to content
Permalink
Browse files

Adding -n flag for specifying the number of primer pairs (default: 10)

  • Loading branch information...
tjakobi committed Apr 16, 2019
1 parent 72fd96c commit 1d53e4950c78c76162d7c55fb7e02603d7ced4f3
Showing with 12 additions and 2 deletions.
  1. +7 −0 circtools/circtools.py
  2. +2 −1 circtools/primex/primex.py
  3. +3 −1 scripts/circtools_primex_wrapper.R
@@ -317,6 +317,13 @@ def primex():
default=False,
action='store_true'
)
group.add_argument("-n",
"--num-pairs",
dest="num_pairs",
help="Number of primer pairs to be designed",
type=int,
default=10
)

args = parser.parse_args(sys.argv[2:])

@@ -49,6 +49,7 @@ def __init__(self, argparse_arguments, program_name, version):
self.no_blast = self.cli_params.blast
self.experiment_title = self.cli_params.experiment_title
self.input_circRNA = self.cli_params.sequence_file
self.num_pairs = self.cli_params.num_pairs

if self.id_list and self.gene_list:
print("Please specify either host genes via -G or circRNA IDs via -i.")
@@ -343,7 +344,7 @@ def run_module(self):
script_result = os.popen(primer_script + " " +
exon_storage_tmp + " " +
str(self.product_range[0]) + "," + str(self.product_range[1]) + " " +
self.junction).read()
self.junction + " " + str(self.num_pairs)).read()

# this is the first time we look through the input file
# we collect the primer sequences and unify everything in one blast query
@@ -12,6 +12,8 @@ args <- commandArgs(trailingOnly = TRUE)
data_file_name <- args[1]
product_size <- unlist(lapply(strsplit(args[2],","), as.numeric))
junction_mode <- args[3]
num_pairs <- args[4]


# open file for reading
con <- file(data_file_name, open = "r")
@@ -67,7 +69,7 @@ while (length(current_line <- readLines(con, n = 1, warn = FALSE)) > 0) {
}

# return 10 pairs at max
seqOpts$PRIMER_NUM_RETURN = 10
seqOpts$PRIMER_NUM_RETURN = num_pairs

# mute primer3 output, we only want the variable later
sink("/dev/null")

0 comments on commit 1d53e49

Please sign in to comment.
You can’t perform that action at this time.