[med-svn] [Git][med-team/srst2][master] remove dependency on python3-mock

Alexandre Detiste (@detiste-guest) gitlab at salsa.debian.org
Sun Jan 7 16:23:07 GMT 2024



Alexandre Detiste pushed to branch master at Debian Med / srst2


Commits:
f5ce5399 by Alexandre Detiste at 2024-01-07T17:21:24+01:00
remove dependency on python3-mock

- - - - -


2 changed files:

- debian/control
- debian/patches/2to3.patch


Changes:

=====================================
debian/control
=====================================
@@ -10,7 +10,6 @@ Build-Depends: debhelper-compat (= 13),
                python3-setuptools,
                markdown,
                dos2unix,
-               python3-mock <!nocheck>,
                python3-scipy <!nocheck>,
                bowtie2 <!nocheck>,
                samtools <!nocheck>


=====================================
debian/patches/2to3.patch
=====================================
@@ -6,7 +6,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
 
 --- a/README.md
 +++ b/README.md
-@@ -70,7 +70,7 @@ Current release - v0.2.0 - July 28, 2016
+@@ -70,7 +70,7 @@
  -----
  
  Dependencies:
@@ -15,7 +15,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  * scipy, numpy   http://www.scipy.org/install.html
  * bowtie2 (v2.1.0 or later)   http://bowtie-bio.sourceforge.net/bowtie2/index.shtml
  * SAMtools v0.1.18   https://sourceforge.net/projects/samtools/files/samtools/0.1.18/ (NOTE: later versions can be used, but better results are obtained with v0.1.18, especially at low read depths (<20x))
-@@ -171,7 +171,7 @@ Updates in v0.1.3
+@@ -171,7 +171,7 @@
  
  ### 1 - Install dependencies
  
@@ -24,7 +24,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  * scipy http://www.scipy.org/install.html
  * bowtie2 v2.1.0 http://bowtie-bio.sourceforge.net/bowtie2/index.shtml
  * SAMtools v0.1.18 https://sourceforge.net/projects/samtools/files/samtools/0.1.18/ (NOTE 0.1.19 DOES NOT WORK)
-@@ -541,13 +541,13 @@ IN ADDITION TO THE NOVEL ALLELES FILE OU
+@@ -541,13 +541,13 @@
  For genes:
  
  ```
@@ -40,7 +40,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  ```
  
  # More basic usage examples
-@@ -787,7 +787,7 @@ cdhit-est -i rawseqs.fasta -o rawseqs_cd
+@@ -787,7 +787,7 @@
  2 - Parse the cluster output and tabulate the results, check for inconsistencies between gene names and the sequence clusters, and generate individual fasta files for each cluster to facilitate further checking:
  
  ```
@@ -49,7 +49,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  ```
  
  For comparing gene names to cluster assignments, this script assumes very basic nomenclature of the form gene-allele, ie a gene symbol followed by '-' followed by some more specific allele designation. E.g. adk-1, blaCTX-M-15. The full name of the gene (adk-1, blaCTX-M-15) will be stored as the allele, and the bit before the '-' will be stored as the name of the gene cluster (adk, blaCTX). This won't always give you exactly what you want, because there really are no standards for gene nomenclature! But it will work for many cases, and you can always modify the script if you need to parse names in a different way. Note though that this only affects how sensible the gene cluster nomenclature is going to be in your srst2 results, and will not affect the behaviour of the clustering (which is purely sequence based using cdhit) or srst2 (which will assign a top scoring allele per cluster, the cluster name may not be perfect but the full allele name will always be reported anyway).
-@@ -820,13 +820,13 @@ To type these virulence genes using SRST
+@@ -820,13 +820,13 @@
  1 - Extract virulence genes by genus from the main VFDB file, `CP_VFs.ffn`:
  
  ```
@@ -65,7 +65,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  ```
  
  2 - Run CD-HIT to cluster the sequences for this genus, at 90% nucleotide identity:
-@@ -838,13 +838,13 @@ cd-hit -i Clostridium.fsa -o Clostridium
+@@ -838,13 +838,13 @@
  3 - Parse the cluster output and tabulate the results using the specific Virulence gene DB compatible script:
  
  ```
@@ -83,7 +83,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  The output file, `Clostridium_VF_clustered.fasta`, should now be ready to use with srst2 (`--gene_db Clostridium_VF_clustered.fasta`).
 --- a/database_clustering/README.md
 +++ b/database_clustering/README.md
-@@ -59,7 +59,7 @@ cdhit-est -i rawseqs.fasta -o rawseqs_cd
+@@ -59,7 +59,7 @@
  
  2 - Parse the cluster output and tabulate the results, check for inconsistencies between gene names and the sequence clusters, and generate individual fasta files for each cluster to facilitate further checking:
  
@@ -92,7 +92,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  For comparing gene names to cluster assignments, this script assumes very basic nomenclature of the form gene-allele, ie a gene symbol followed by '-' followed by some more specific allele designation. E.g. adk-1, blaCTX-M-15. The full name of the gene (adk-1, blaCTX-M-15) will be stored as the allele, and the bit before the '-' will be stored as the name of the gene cluster (adk, blaCTX). This won't always give you exactly what you want, because there really are no standards for gene nomenclature! But it will work for many cases, and you can always modify the script if you need to parse names in a different way. Note though that this only affects how sensible the gene cluster nomenclature is going to be in your srst2 results, and will not affect the behaviour of the clustering (which is purely sequence based using cdhit) or srst2 (which will assign a top scoring allele per cluster, the cluster name may not be perfect but the full allele name will always be reported anyway).
  
-@@ -89,11 +89,11 @@ To type these virulence genes using SRST
+@@ -89,11 +89,11 @@
  
  gunzip VFDB_setB_nt.fas.gz
  
@@ -106,7 +106,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  - Run CD-HIT to cluster the sequences for this genus, at 90% nucleotide identity:
  
-@@ -101,8 +101,8 @@ cd-hit-est -i Clostridium.fsa -o Clostri
+@@ -101,8 +101,8 @@
  
  - Parse the cluster output and tabulate the results using the specific Virulence gene DB compatible script:
  
@@ -119,7 +119,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
 +python3 csv_to_gene_db.py -t Clostridium_cdhit90.csv -o Clostridium_VF_clustered.fasta -s 5
 --- a/database_clustering/align_plot_tree_min3.py
 +++ b/database_clustering/align_plot_tree_min3.py
-@@ -11,44 +11,44 @@ fasta_directory = "/home/UNIMELB/hdashno
+@@ -11,44 +11,44 @@
  # Get the filenames of all files in the input directory "fasta_directory"
  files = []
  for f in os.listdir(fasta_directory):
@@ -196,7 +196,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  # take csv table detailing clustering etc and sequences for gene DB, write as fasta
  # expected csv file format:
  # seqID,clusterid,gene,allele,(DNAseq),other....
-@@ -45,18 +45,18 @@ if __name__ == "__main__":
+@@ -45,18 +45,18 @@
  	if options.output_file == "":
  		DoError("Please specify output fasta file using -o")
  	if options.seq_col != "":
@@ -218,7 +218,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  	# read contents of a table and print as fasta
  	f = file(options.table_file,"r")
-@@ -82,7 +82,7 @@ if __name__ == "__main__":
+@@ -82,7 +82,7 @@
  				if seqs_file_id in input_seqs:
  					record = SeqRecord(input_seqs[seqs_file_id],id=db_id, description=db_id)
  				else:
@@ -239,7 +239,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  #example usage:
  #/srst2/database_clustering/get_all_vfdb.sh ./CP_VFs.ffn ./VFDB
  
-@@ -12,7 +12,7 @@ fi
+@@ -12,7 +12,7 @@
  
  VFDBFILE=$(readlink -e $1)
  OUTPUTFOLDER=$2
@@ -248,7 +248,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  DBCLUSTERINGSCRIPTFOLDER=$(dirname $(readlink -e $0))
  
  #if the specified output folder doesn't exist, then create it
-@@ -22,7 +22,7 @@ fi
+@@ -22,7 +22,7 @@
  cd ${OUTPUTFOLDER}
  
  #extract virulence genes from all available genera into separate files
@@ -257,7 +257,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  #loop over each genus' *.fsa file and generate the gene database fasta file
  for FSAFILE in *.fsa; do
-@@ -36,10 +36,10 @@ for FSAFILE in *.fsa; do
+@@ -36,10 +36,10 @@
    cd-hit -i ${FILENAME} -o ${GENUS}/${GENUS}_cdhit90 -c 0.9 > ${GENUS}/${GENUS}_cdhit90.stdout
  
    #Parse the cluster output and tabulate the results using the specific Virulence gene DB compatible script:
@@ -280,7 +280,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  #example usage:
  #/srst2/database_clustering/get_genus_vfdb.sh ./CP_VFs.ffn Bacillus ./VFDB
  
-@@ -12,7 +12,7 @@ fi
+@@ -12,7 +12,7 @@
  VFDBFILE=$(readlink -e $1)
  GENUS=$2
  OUTPUTFOLDER=$3
@@ -289,7 +289,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  DBCLUSTERINGSCRIPTFOLDER=$(dirname $(readlink -e $0))
  
  #if the specified output folder doesn't exist, then create it
-@@ -24,13 +24,13 @@ cd ${OUTPUTFOLDER}
+@@ -24,13 +24,13 @@
  echo Generating virulence gene database for ${GENUS}
  FILENAME=${GENUS}.fsa
  #extract virulence genes from all available genera into separate files
@@ -317,7 +317,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  #
  # Basic analysis of SRST2 output
  # Authors - Kathryn Holt (kholt at unimelb.edu.au)
-@@ -62,7 +62,7 @@ def compile_results(args,mlst_results,db
+@@ -62,7 +62,7 @@
  				if mlst_cols == 0:
  					mlst_header_string = test_string
  			else:
@@ -326,7 +326,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			test_string_split = test_string.split("\t")
  			this_mlst_cols = len(test_string)
  			
-@@ -107,7 +107,7 @@ def compile_results(args,mlst_results,db
+@@ -107,7 +107,7 @@
  					if variable not in variable_list:
  						variable_list.append(variable)
  						
@@ -335,7 +335,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  						
  	if "Sample" in sample_list:
  		sample_list.remove("Sample")
-@@ -177,8 +177,8 @@ def compile_results(args,mlst_results,db
+@@ -177,8 +177,8 @@
  	
  	# log ST counts
  	if len(mlst_results_master) > 0:
@@ -354,7 +354,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  '''
  Download MLST datasets from this site: http://pubmlst.org/data/ by
-@@ -23,7 +23,7 @@ from argparse import ArgumentParser
+@@ -23,7 +23,7 @@
  import xml.dom.minidom as xml
  import urllib2 as url
  import re, os, glob
@@ -363,7 +363,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  def parse_args():
  	parser = ArgumentParser(description='Download MLST datasets by species'
-@@ -125,12 +125,12 @@ def main():
+@@ -125,12 +125,12 @@
  		if info != None:
  			found_species.append(info)
  	if len(found_species) == 0:
@@ -379,7 +379,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  		exit(2)
  
  	assert len(found_species) == 1
-@@ -176,22 +176,22 @@ def main():
+@@ -176,22 +176,22 @@
  	log_file.close()
  	species_all_fasta_file.close()
  
@@ -423,7 +423,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  '''
  This script generates SRST2 jobs for the Grid Engine (qsub) scheduling system
  (http://gridscheduler.sourceforge.net/). It allows many samples to be processed in parallel. After
-@@ -98,7 +98,7 @@ def read_file_sets(args):
+@@ -98,7 +98,7 @@
  						(baseName,read) = m.groups()
  						reverse_reads[baseName] = fastq
  					else:
@@ -432,7 +432,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			else:
  				# matches default Illumina file naming format, e.g. m.groups() = ('samplename', '_S1', '_L001', '_R1', '_001')
  				baseName, read = m.groups()[0], m.groups()[3]
-@@ -107,8 +107,8 @@ def read_file_sets(args):
+@@ -107,8 +107,8 @@
  				elif read == "_R2":
  					reverse_reads[baseName] = fastq
  				else:
@@ -443,7 +443,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  					fileSets[file_name_before_ext] = fastq
  					num_single_readsets += 1
  		# store in pairs
-@@ -119,17 +119,17 @@ def read_file_sets(args):
+@@ -119,17 +119,17 @@
  			else:
  				fileSets[sample] = [forward_reads[sample]] # no reverse found
  				num_single_readsets += 1
@@ -465,7 +465,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  	return fileSets
  
-@@ -139,7 +139,7 @@ class CommandError(Exception):
+@@ -139,7 +139,7 @@
  def run_command(command, **kwargs):
  	'Execute a shell command and check the exit status and any O/S exceptions'
  	command_str = ' '.join(command)
@@ -474,7 +474,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  	try:
  		exit_status = call(command, **kwargs)
  	except OSError as e:
-@@ -209,9 +209,9 @@ def bowtie_index(fasta_files):
+@@ -209,9 +209,9 @@
  	for fasta in fasta_files:
  		built_index = fasta + '.1.bt2'
  		if os.path.exists(built_index):
@@ -486,7 +486,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			run_command([get_bowtie_execs()[1], fasta, fasta])
  
  def get_samtools_exec():
-@@ -229,9 +229,9 @@ def samtools_index(fasta_files):
+@@ -229,9 +229,9 @@
  	for fasta in fasta_files:
  		built_index = fasta + '.fai'
  		if os.path.exists(built_index):
@@ -498,7 +498,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			run_command([get_samtools_exec(), 'faidx', fasta])
  
  def main():
-@@ -283,7 +283,7 @@ def main():
+@@ -283,7 +283,7 @@
  		cmd += " " + args.other_args
  
  		# print and run command
@@ -515,7 +515,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  '''
  This script generates SRST2 jobs for the SLURM scheduling system (http://slurm.schedmd.com/). It
  allows many samples to be processed in parallel. After they all complete, the results can be
-@@ -102,7 +102,7 @@ def read_file_sets(args):
+@@ -102,7 +102,7 @@
  						(baseName,read) = m.groups()
  						reverse_reads[baseName] = fastq
  					else:
@@ -524,7 +524,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			else:
  				# matches default Illumina file naming format, e.g. m.groups() = ('samplename', '_S1', '_L001', '_R1', '_001')
  				baseName, read = m.groups()[0], m.groups()[3]
-@@ -111,8 +111,8 @@ def read_file_sets(args):
+@@ -111,8 +111,8 @@
  				elif read == "_R2":
  					reverse_reads[baseName] = fastq
  				else:
@@ -535,7 +535,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  					fileSets[file_name_before_ext] = fastq
  					num_single_readsets += 1
  		# store in pairs
-@@ -123,17 +123,17 @@ def read_file_sets(args):
+@@ -123,17 +123,17 @@
  			else:
  				fileSets[sample] = [forward_reads[sample]] # no reverse found
  				num_single_readsets += 1
@@ -557,7 +557,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  	return fileSets
  
-@@ -143,7 +143,7 @@ class CommandError(Exception):
+@@ -143,7 +143,7 @@
  def run_command(command, **kwargs):
  	'Execute a shell command and check the exit status and any O/S exceptions'
  	command_str = ' '.join(command)
@@ -566,7 +566,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  	try:
  		exit_status = call(command, **kwargs)
  	except OSError as e:
-@@ -213,9 +213,9 @@ def bowtie_index(fasta_files):
+@@ -213,9 +213,9 @@
  	for fasta in fasta_files:
  		built_index = fasta + '.1.bt2'
  		if os.path.exists(built_index):
@@ -578,7 +578,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			run_command([get_bowtie_execs()[1], fasta, fasta])
  
  def get_samtools_exec():
-@@ -233,9 +233,9 @@ def samtools_index(fasta_files):
+@@ -233,9 +233,9 @@
  	for fasta in fasta_files:
  		built_index = fasta + '.fai'
  		if os.path.exists(built_index):
@@ -590,7 +590,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			run_command([get_samtools_exec(), 'faidx', fasta])
  
  def main():
-@@ -292,10 +292,10 @@ def main():
+@@ -292,10 +292,10 @@
  		cmd += " " + args.other_args
  
  		# print and run command
@@ -616,7 +616,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  #
  # Authors - Michael Inouye (minouye at unimelb.edu.au), Harriet Dashnow (h.dashnow at gmail.com),
  #	Kathryn Holt (kholt at unimelb.edu.au), Bernie Pope (bjpope at unimelb.edu.au)
-@@ -30,7 +30,7 @@ from itertools import groupby
+@@ -30,7 +30,7 @@
  from operator import itemgetter
  from collections import OrderedDict
  try:
@@ -625,7 +625,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  except:
  	srst2_version = "version unknown"
  
-@@ -306,8 +306,8 @@ def parse_fai(fai_file,db_type,delimiter
+@@ -306,8 +306,8 @@
  				gene_clusters.append(gene_cluster)
  
  	if len(delimiter_check) > 0:
@@ -636,7 +636,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  	return size, gene_clusters, unique_gene_symbols, unique_allele_symbols, gene_cluster_symbols
  
-@@ -505,12 +505,12 @@ def score_alleles(args, mapping_files_pr
+@@ -505,12 +505,12 @@
  		avg_depth_allele, coverage_allele, mismatch_allele, indel_allele, missing_allele,
  		size_allele, next_to_del_depth_allele, run_type,unique_gene_symbols, unique_allele_symbols):
  	# sort into hash for each gene locus
@@ -651,7 +651,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			)
  	allele_to_gene = dict_of_dicts_inverted_ind(depth_by_gene)
  
-@@ -553,7 +553,7 @@ def score_alleles(args, mapping_files_pr
+@@ -553,7 +553,7 @@
  			# Fit linear model to observed Pval distribution vs expected Pval distribution (QQ plot)
  			pvals.sort(reverse=True)
  			len_obs_pvals = len(pvals)
@@ -660,7 +660,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			exp_pvals2 = [-log(float(ep) / (len_obs_pvals + 1), 10) for ep in exp_pvals]
  
  			# Slope is score
-@@ -698,7 +698,7 @@ def run_bowtie(mapping_files_pre,sample_
+@@ -698,7 +698,7 @@
  		try:
  			command += ['-u',str(int(args.stop_after))]
  		except ValueError:
@@ -669,7 +669,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  	if args.other:
  		x = args.other
-@@ -732,7 +732,7 @@ def get_pileup(args, mapping_files_pre,
+@@ -732,7 +732,7 @@
  	logging.info('Generate and sort BAM file...')
  	out_file_bam = mapping_files_pre + ".unsorted.bam"
  	view_command = [samtools_exec, 'view']
@@ -678,7 +678,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  		view_command += ['-@', str(args.threads)]
  	view_command += ['-b', '-o', out_file_bam, '-q', str(args.mapq), '-S', bowtie_sam_mod]
  	run_command(view_command)
-@@ -806,12 +806,12 @@ def calculate_ST(allele_scores, ST_db, g
+@@ -806,12 +806,12 @@
  		try:
  			clean_st = ST_db[allele_string]
  		except KeyError:
@@ -695,7 +695,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			clean_st = "NF"
  	else:
  		clean_st = "ND"
-@@ -848,7 +848,7 @@ def parse_ST_database(ST_filename,gene_n
+@@ -848,7 +848,7 @@
  	ST_db = {} # key = allele string, value = ST
  	gene_names = []
  	num_gene_cols_expected = len(gene_names_from_fai)
@@ -704,7 +704,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  	with open(ST_filename) as f:
  		count = 0
  		for line in f:
-@@ -858,23 +858,23 @@ def parse_ST_database(ST_filename,gene_n
+@@ -858,23 +858,23 @@
  				gene_names = line_split[1:min(num_gene_cols_expected+1,len(line_split))]
  				for g in gene_names_from_fai:
  					if g not in gene_names:
@@ -735,7 +735,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  		return (ST_db, gene_names)
  
  def get_allele_name_from_db(allele,run_type,args,unique_allele_symbols=False,unique_cluster_symbols=False):
-@@ -936,7 +936,7 @@ def group_allele_dict_by_gene(by_allele,
+@@ -936,7 +936,7 @@
  
  def dict_of_dicts_inverted_ind(dd):
  	res = dict()
@@ -744,7 +744,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  		res.update(dict((key2,key) for key2 in val))
  	return res
  
-@@ -946,7 +946,7 @@ def parse_scores(run_type,args,scores, h
+@@ -946,7 +946,7 @@
  					unique_cluster_symbols,unique_allele_symbols, pileup_file):
  
  	# sort into hash for each gene locus
@@ -753,7 +753,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			if coverage_allele[allele] > args.min_coverage ),
  			run_type,args,
  			unique_cluster_symbols,unique_allele_symbols)
-@@ -957,7 +957,7 @@ def parse_scores(run_type,args,scores, h
+@@ -957,7 +957,7 @@
  	for gene in scores_by_gene:
  
  		gene_hash = scores_by_gene[gene]
@@ -762,7 +762,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  		(top_allele,top_score) = scores_sorted[0]
  
  		# check if depth is adequate for confident call
-@@ -1462,7 +1462,7 @@ def map_fileSet_to_db(args, sample_name,
+@@ -1462,7 +1462,7 @@
  			logging.info("Printing all MLST scores to " + scores_output_file)
  			scores_output = file(scores_output_file, 'w')
  			scores_output.write("Allele\tScore\tAvg_depth\tEdge1_depth\tEdge2_depth\tPercent_coverage\tSize\tMismatches\tIndels\tTruncated_bases\tDepthNeighbouringTruncation\tMmaxMAF\n")
@@ -771,7 +771,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  				score = scores[allele]
  				scores_output.write('\t'.join([allele, str(score), str(avg_depth_allele[allele]), \
  					str(hash_edge_depth[allele][0]), str(hash_edge_depth[allele][1]), \
-@@ -1547,7 +1547,7 @@ def compile_results(args,mlst_results,db
+@@ -1547,7 +1547,7 @@
  				if mlst_cols == 0:
  					mlst_header_string = test_string
  			else:
@@ -780,7 +780,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  			test_string_split = test_string.split("\t")
  			this_mlst_cols = len(test_string_split)
  			if (mlst_cols == 0) or (mlst_cols == this_mlst_cols):
-@@ -1637,8 +1637,8 @@ def compile_results(args,mlst_results,db
+@@ -1637,8 +1637,8 @@
  
  	# log ST counts
  	if len(mlst_results_master) > 0:
@@ -791,7 +791,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  		sts.sort()
  		for st in sts:
  			logging.info("ST" + st + "\t" + str(st_counts[st]))
-@@ -1656,9 +1656,9 @@ def main():
+@@ -1656,9 +1656,9 @@
  		if not os.path.exists(output_dir):
  			try:
  				os.makedirs(output_dir)
@@ -803,7 +803,7 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
  	if args.log is True:
  		logfile = args.output + ".log"
-@@ -1703,9 +1703,9 @@ def main():
+@@ -1703,9 +1703,9 @@
  		if not args.mlst_definitions:
  
  			# print warning to screen to alert user, may want to stop and restart
@@ -826,12 +826,19 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  
 --- a/tests/test_slurm_srst2.py
 +++ b/tests/test_slurm_srst2.py
-@@ -1,4 +1,4 @@
+@@ -1,10 +1,10 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
  
  import os
  import sys
+ import unittest
+ 
+-from mock import patch
++from unittest.mock import patch
+ 
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'scripts')))
+ 
 --- a/tests/test_srst2.py
 +++ b/tests/test_srst2.py
 @@ -1,11 +1,11 @@
@@ -842,8 +849,9 @@ Bug-Upstream: https://github.com/katholt/srst2/issues/122
  import sys
  import unittest
  
- from mock import MagicMock, patch
+-from mock import MagicMock, patch
 -from StringIO import StringIO
++from unittest.mock import MagicMock, patch
 +from io import StringIO
  
  sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'scripts')))



View it on GitLab: https://salsa.debian.org/med-team/srst2/-/commit/f5ce539956acde49fc10b57f4d358560d1f3c4a5

-- 
View it on GitLab: https://salsa.debian.org/med-team/srst2/-/commit/f5ce539956acde49fc10b57f4d358560d1f3c4a5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240107/ff3abd52/attachment-0001.htm>


More information about the debian-med-commit mailing list