1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Author: Andreas Tille <tille@debian.org>
Last-Update: 2017-03-01
Bug-Debian: https://bugs.debian.org/856479
Description: Do not fail if search string contains special shell characters
--- a/scripts/srst2.py
+++ b/scripts/srst2.py
@@ -23,6 +23,7 @@ from argparse import (ArgumentParser, Fi
import logging
from subprocess import call, check_output, CalledProcessError, STDOUT
import os, sys, re, collections, operator
+import subprocess
from scipy.stats import binom, linregress
from math import log
from itertools import groupby
@@ -1499,7 +1500,7 @@ def map_fileSet_to_db(args, sample_name,
if args.no_gene_details:
# get annotation info
- header_string = os.popen(" ".join(["grep",allele,fasta]))
+ header_string = subprocess.check_output(["grep",allele,fasta])
try:
header = header_string.read().rstrip().split()
header.pop(0) # remove allele name
|