[med-svn] [Git][med-team/lefse][master] Add header to patch

Shayan Doust gitlab at salsa.debian.org
Fri Sep 6 21:30:10 BST 2019



Shayan Doust pushed to branch master at Debian Med / lefse


Commits:
9590ab80 by Shayan Doust at 2019-09-06T11:07:43Z
Add header to patch

- - - - -


1 changed file:

- debian/patches/2to3.patch


Changes:

=====================================
debian/patches/2to3.patch
=====================================
@@ -1,8 +1,13 @@
-diff --git a/format_input.py b/format_input.py
-index dd3d2e0..8873ecb 100755
---- a/format_input.py
-+++ b/format_input.py
-@@ -55,7 +55,7 @@ def read_input_file(inp_file, CommonArea):
+Description: use 2to3 to port from python2 to python3
+Author: Shayan Doust <hello at shayandoust.me>
+Bug-Debian: https://bugs.debian.org/936836
+Last-Update: 2019-09-06
+
+Index: lefse/format_input.py
+===================================================================
+--- lefse.orig/format_input.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/format_input.py	2019-09-06 12:01:19.010689029 +0100
+@@ -55,7 +55,7 @@
  		return CommonArea
  
  def transpose(data):
@@ -11,7 +16,7 @@ index dd3d2e0..8873ecb 100755
  
  def read_params(args):
  	parser = argparse.ArgumentParser(description='LEfSe formatting modules')
-@@ -170,24 +170,24 @@ def get_class_slices(data):
+@@ -170,24 +170,24 @@
  
  def numerical_values(feats,norm):
  	mm = []
@@ -42,7 +47,7 @@ index dd3d2e0..8873ecb 100755
  		feats[k] = [val*mul[i] for i,val in enumerate(v)]
  		if numpy.mean(feats[k]) and (numpy.std(feats[k])/numpy.mean(feats[k])) < 1e-10:
  			feats[k] = [ float(round(kv*1e6)/1e6) for kv in feats[k]]
-@@ -237,7 +237,7 @@ def add_missing_levels(ff):
+@@ -237,7 +237,7 @@
  				clades2leaves[n].append( f )
  			else:
  				clades2leaves[n] = [f]
@@ -51,7 +56,7 @@ index dd3d2e0..8873ecb 100755
  		if k and k not in ff:
  			ff[k] = [sum(a) for a in zip(*[[float(fn) for fn in ff[vv]] for vv in v])]
  	return ff
-@@ -306,7 +306,7 @@ def biom_processing(inp_file):
+@@ -306,7 +306,7 @@
  	for IDMetadataEntry in CommonArea['abndData'].funcGetMetadataCopy()[IDMetadataName]:  #* Loop on all the metadata values
  		IDMetadata.append(IDMetadataEntry)
  	ResolvedData.append(IDMetadata)					#Add the IDMetadata with all its values to the resolved area
@@ -60,7 +65,7 @@ index dd3d2e0..8873ecb 100755
  		if  key  != IDMetadataName:
  			MetadataEntry = list()		#*  Set it up
  			MetadataEntry.append(key)	#*	And post it to the area
-@@ -358,7 +358,7 @@ def  check_params_for_biom_case(params, CommonArea):
+@@ -358,7 +358,7 @@
  			else:
  				FlagError = True
  		if FlagError == True:		#* If the User passed an invalid class
@@ -69,7 +74,7 @@ index dd3d2e0..8873ecb 100755
  			params['class'] =  2
  			params['subclass'] =  3
  	return params
-@@ -375,8 +375,8 @@ if  __name__ == '__main__':
+@@ -375,8 +375,8 @@
  	#*************************************************************
  	if  params['input_file'].endswith('.biom'):
  		try:
@@ -80,7 +85,7 @@ index dd3d2e0..8873ecb 100755
  		except ImportError:
  			sys.stderr.write("************************************************************************************************************ \n")
  			sys.stderr.write("* Error:   Breadcrumbs libraries not detected - required to process biom files - run abnormally terminated * \n")
-@@ -403,16 +403,16 @@ if  __name__ == '__main__':
+@@ -403,16 +403,16 @@
  	if not params['subclass'] is None: ncl += 1	
  	if not params['subject'] is None: ncl += 1	
  
@@ -101,7 +106,7 @@ index dd3d2e0..8873ecb 100755
  #	data.insert(0,first_line)
  #	data = remove_missing(data,params['missing_p'])
  	cls = {}
-@@ -426,7 +426,7 @@ if  __name__ == '__main__':
+@@ -426,7 +426,7 @@
  	
  	cls['subclass'] = rename_same_subcl(cls['class'],cls['subclass'])
  #	if 'subclass' in cls.keys(): cls = group_small_subclasses(cls,params['subcl_min_card'])
@@ -110,7 +115,7 @@ index dd3d2e0..8873ecb 100755
      
  	feats = dict([(d[0],d[1:]) for d in data])
      
-@@ -446,7 +446,7 @@ if  __name__ == '__main__':
+@@ -446,7 +446,7 @@
  			if 'class' in cls: outf.write( "\t".join(list(["class"])+list(cls['class'])) + "\n" )
  			if 'subclass' in cls: outf.write( "\t".join(list(["subclass"])+list(cls['subclass'])) + "\n" )
  			if 'subject' in cls: outf.write( "\t".join(list(["subject"])+list(cls['subject']))  + "\n" )
@@ -119,11 +124,11 @@ index dd3d2e0..8873ecb 100755
  
  	with open(params['output_file'], 'wb') as back_file:
  		pickle.dump(out,back_file)    	
-diff --git a/lefse.py b/lefse.py
-index 0a29be0..75fc246 100755
---- a/lefse.py
-+++ b/lefse.py
-@@ -17,14 +17,14 @@ def init():
+Index: lefse/lefse.py
+===================================================================
+--- lefse.orig/lefse.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/lefse.py	2019-09-06 12:01:19.010689029 +0100
+@@ -17,14 +17,14 @@
  
  def get_class_means(class_sl,feats):
  	means = {}
@@ -141,7 +146,7 @@ index 0a29be0..75fc246 100755
  			out.write(k+"\t"+str(math.log(max(max(v),1.0),10.0))+"\t")
  			if k in res['lda_res_th']:
  				for i,vv in enumerate(v):
-@@ -64,7 +64,7 @@ def test_rep_wilcoxon_r(sl,cl_hie,feats,th,multiclass_strat,mul_cor,fn,min_c,com
+@@ -64,7 +64,7 @@
  	tot_ok =  0
  	alpha_mtc = th
  	all_diff = []
@@ -150,7 +155,7 @@ index 0a29be0..75fc246 100755
  		dir_cmp = "not_set" #
  		l_subcl1, l_subcl2 = (len(cl_hie[pair[0]]), len(cl_hie[pair[1]]))
  		if mul_cor != 0: alpha_mtc = th*l_subcl1*l_subcl2 if mul_cor == 2 else 1.0-math.pow(1.0-th,l_subcl1*l_subcl2)
-@@ -120,8 +120,8 @@ def test_rep_wilcoxon_r(sl,cl_hie,feats,th,multiclass_strat,mul_cor,fn,min_c,com
+@@ -120,8 +120,8 @@
  		if not diff and multiclass_strat: return False
  		if diff and not multiclass_strat: all_diff.append(pair)
  	if not multiclass_strat:
@@ -161,7 +166,7 @@ index 0a29be0..75fc246 100755
  			nk = 0
  			for a in all_diff:
  				if k in a: nk += 1
-@@ -132,7 +132,7 @@ def test_rep_wilcoxon_r(sl,cl_hie,feats,th,multiclass_strat,mul_cor,fn,min_c,com
+@@ -132,7 +132,7 @@
  
  
  def contast_within_classes_or_few_per_class(feats,inds,min_cl,ncl):
@@ -170,7 +175,7 @@ index 0a29be0..75fc246 100755
  	cols = [ff[i] for i in inds]
  	cls = [feats['class'][i] for i in inds]
  	if len(set(cls)) < ncl:
-@@ -147,8 +147,8 @@ def contast_within_classes_or_few_per_class(feats,inds,min_cl,ncl):
+@@ -147,8 +147,8 @@
  	return False 
  
  def test_lda_r(cls,feats,cl_sl,boots,fract_sample,lda_th,tol_min,nlogs):
@@ -181,7 +186,7 @@ index 0a29be0..75fc246 100755
          feats['class'] = list(cls['class'])
          clss = list(set(feats['class']))
          for uu,k in enumerate(fk):
-@@ -160,7 +160,7 @@ def test_lda_r(cls,feats,cl_sl,boots,fract_sample,lda_th,tol_min,nlogs):
+@@ -160,7 +160,7 @@
                                  if feats['class'][i] == c:
                                          feats[k][i] = math.fabs(feats[k][i] + lrand.normalvariate(0.0,max(feats[k][i]*0.05,0.01)))
          rdict = {}
@@ -190,7 +195,7 @@ index 0a29be0..75fc246 100755
                  if a == 'class' or a == 'subclass' or a == 'subject':
                          rdict[a] = robjects.StrVector(b)
                  else: rdict[a] = robjects.FloatVector(b)
-@@ -210,7 +210,7 @@ def test_lda_r(cls,feats,cl_sl,boots,fract_sample,lda_th,tol_min,nlogs):
+@@ -210,7 +210,7 @@
          for k in fk:
  		m = max([numpy.mean([means[k][kk][p] for kk in range(boots)]) for p in range(len(pairs))])
                  res[k] = math.copysign(1.0,m)*math.log(1.0+math.fabs(m),10)
@@ -199,10 +204,10 @@ index 0a29be0..75fc246 100755
  
  
  def test_svm(cls,feats,cl_sl,boots,fract_sample,lda_th,tol_min,nsvm):
-diff --git a/lefse2circlader.py b/lefse2circlader.py
-index 79cc2a0..db01218 100755
---- a/lefse2circlader.py
-+++ b/lefse2circlader.py
+Index: lefse/lefse2circlader.py
+===================================================================
+--- lefse.orig/lefse2circlader.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/lefse2circlader.py	2019-09-06 12:01:19.010689029 +0100
 @@ -1,6 +1,6 @@
  #!/usr/bin/env python
  
@@ -211,11 +216,11 @@ index 79cc2a0..db01218 100755
  
  import sys
  import os
-diff --git a/lefsebiom/AbundanceTable.py b/lefsebiom/AbundanceTable.py
-index 77c11aa..349af50 100755
---- a/lefsebiom/AbundanceTable.py
-+++ b/lefsebiom/AbundanceTable.py
-@@ -4,24 +4,24 @@ Description: Class to abstract an abundance table and methods to run on such a t
+Index: lefse/lefsebiom/AbundanceTable.py
+===================================================================
+--- lefse.orig/lefsebiom/AbundanceTable.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/lefsebiom/AbundanceTable.py	2019-09-06 12:01:19.018688976 +0100
+@@ -4,24 +4,24 @@
  """
  
  #####################################################################################
@@ -255,7 +260,7 @@ index 77c11aa..349af50 100755
  #####################################################################################
  
  __author__ = "Timothy Tickle"
-@@ -35,8 +35,8 @@ __status__ = "Development"
+@@ -35,8 +35,8 @@
  import csv
  import sys
  import blist
@@ -266,7 +271,7 @@ index 77c11aa..349af50 100755
  import copy
  from datetime import date
  import numpy as np
-@@ -44,690 +44,731 @@ import os
+@@ -44,690 +44,731 @@
  import re
  import scipy.stats
  import string
@@ -523,13 +528,61 @@ index 77c11aa..349af50 100755
 -
 -		#The original number of features in the table
 -		self._iOriginalFeatureCount = -1
-+    """
-+    Represents an abundance table and contains common function to perform on the object.
- 
+-
 -		#The name of the object relating to the file it was read from or would have been read from if it exists
 -		#Keeps tract of changes to the file through the name
 -		#Will be used to write out the object to a file as needed
 -		self._strOriginalName = strName
+-
+-		#The original number of samples in the table
+-		self._iOriginalSampleCount = -1
+-
+-		#Data sparsity type
+-		self.fSparseMatrix = dictFileMetadata.get(ConstantsBreadCrumbs.c_strSparsityKey,False) if dictFileMetadata else False
+-
+-		### Data metadata
+-		#The column (sample) metdata
+-		self._dictTableMetadata = dictMetadata
+-
+-		#The row (feature) metadata (Row Metadata object)
+-		self.rwmtRowMetadata = rwmtRowMetadata
++    """
++    Represents an abundance table and contains common function to perform on the object.
+ 
+-		### Data
+-
+-		#The abundance data
+-		self._npaFeatureAbundance = npaAbundance
+-
+-
+-		### Logistical
+-
+-		#Clade prefixes for biological samples
+-		self._lsCladePrefixes = ["k__","p__","c__","o__","f__","g__","s__"]
+-
+-		#This is not a hashable object
+-		self.__hash__ = None
+-
+-
+-		### Prep the object
+-
+-		self._fIsNormalized = self._fIsSummed = None
+-		#If contents is not a false then set contents to appropriate objects
+-		# Checking to see if the data is normalized, summed and if we need to run a filter on it.
+-		if ( self._npaFeatureAbundance != None ) and self._dictTableMetadata:
+-			self._iOriginalFeatureCount = self._npaFeatureAbundance.shape[0]
+-			self._iOriginalSampleCount = len(self.funcGetSampleNames())
+-		
+-			self._fIsNormalized = ( max( [max( list(a)[1:] or [0] ) for a in self._npaFeatureAbundance] or [0] ) <= 1 )
+-
+-			lsLeaves = AbundanceTable.funcGetTerminalNodesFromList( [a[0] for a in self._npaFeatureAbundance], self._cFeatureDelimiter )
+-			self._fIsSummed = ( len( lsLeaves ) != len( self._npaFeatureAbundance ) )
+-
+-			#Occurence filtering
+-			#Removes features that do not have a given level iLowestAbundance in a given amount of samples iLowestSampleOccurence
+-			if ( not self._fIsNormalized ) and lOccurenceFilter:
+-				iLowestAbundance, iLowestSampleOccurrence = lOccurenceFilter
+-				self.funcFilterAbundanceBySequenceOccurence( iLowestAbundance, iLowestSampleOccurrence )
 +    This class is made from an abundance data file. What is expected is a text file delimited by
 +    a character (which is given to the object). The first column is expected to be the id column
 +    for each of the rows. Metadata is expected before measurement data. Columns are samples and
@@ -537,15 +590,11 @@ index 77c11aa..349af50 100755
 +
 +    This object is currently not hashable.
 +    """
- 
--		#The original number of samples in the table
--		self._iOriginalSampleCount = -1
++
 +    def __init__(self, npaAbundance, dictMetadata, strName, strLastMetadata, rwmtRowMetadata=None, dictFileMetadata=None, lOccurenceFilter=None, cFileDelimiter=ConstantsBreadCrumbs.c_cTab, cFeatureNameDelimiter="|"):
 +        """
 +        Constructor for an abundance table.
- 
--		#Data sparsity type
--		self.fSparseMatrix = dictFileMetadata.get(ConstantsBreadCrumbs.c_strSparsityKey,False) if dictFileMetadata else False
++
 +        :param	npaAbundance:	Structured Array of abundance data (Row=Features, Columns=Samples)
 +        :type:	Numpy Structured Array abundance data (Row=Features, Columns=Samples)
 +        :param	dictMetadata:	Dictionary of metadata {"String ID":["strValue","strValue","strValue","strValue","strValue"]}
@@ -651,51 +700,11 @@ index 77c11aa..349af50 100755
 +
 +            self._fIsNormalized = (
 +                max([max(list(a)[1:] or [0]) for a in self._npaFeatureAbundance] or [0]) <= 1)
- 
--		### Data metadata
--		#The column (sample) metdata
--		self._dictTableMetadata = dictMetadata
++
 +            lsLeaves = AbundanceTable.funcGetTerminalNodesFromList(
 +                [a[0] for a in self._npaFeatureAbundance], self._cFeatureDelimiter)
 +            self._fIsSummed = (len(lsLeaves) != len(self._npaFeatureAbundance))
- 
--		#The row (feature) metadata (Row Metadata object)
--		self.rwmtRowMetadata = rwmtRowMetadata
--
--		### Data
--
--		#The abundance data
--		self._npaFeatureAbundance = npaAbundance
--
--
--		### Logistical
--
--		#Clade prefixes for biological samples
--		self._lsCladePrefixes = ["k__","p__","c__","o__","f__","g__","s__"]
--
--		#This is not a hashable object
--		self.__hash__ = None
--
--
--		### Prep the object
--
--		self._fIsNormalized = self._fIsSummed = None
--		#If contents is not a false then set contents to appropriate objects
--		# Checking to see if the data is normalized, summed and if we need to run a filter on it.
--		if ( self._npaFeatureAbundance != None ) and self._dictTableMetadata:
--			self._iOriginalFeatureCount = self._npaFeatureAbundance.shape[0]
--			self._iOriginalSampleCount = len(self.funcGetSampleNames())
--		
--			self._fIsNormalized = ( max( [max( list(a)[1:] or [0] ) for a in self._npaFeatureAbundance] or [0] ) <= 1 )
--
--			lsLeaves = AbundanceTable.funcGetTerminalNodesFromList( [a[0] for a in self._npaFeatureAbundance], self._cFeatureDelimiter )
--			self._fIsSummed = ( len( lsLeaves ) != len( self._npaFeatureAbundance ) )
--
--			#Occurence filtering
--			#Removes features that do not have a given level iLowestAbundance in a given amount of samples iLowestSampleOccurence
--			if ( not self._fIsNormalized ) and lOccurenceFilter:
--				iLowestAbundance, iLowestSampleOccurrence = lOccurenceFilter
--				self.funcFilterAbundanceBySequenceOccurence( iLowestAbundance, iLowestSampleOccurrence )
++
 +            # Occurence filtering
 +            # Removes features that do not have a given level iLowestAbundance in a given amount of samples iLowestSampleOccurence
 +            if (not self._fIsNormalized) and lOccurenceFilter:
@@ -1418,7 +1427,8 @@ index 77c11aa..349af50 100755
  +										The last dict is a collection of BIOM fielparameters when converting from a BIOM file
  +										[Numpy structured Array, Dictionary, Numpy structured array, dict]
 -		"""
--
++        """
+ 
 -		# Open file from a stream or file path
 -		istmInput = open( xInputFile, 'rU' ) if isinstance(xInputFile, str) else xInputFile
 -		# Flag that when incremented will switch from metadata parsing to data parsing
@@ -1529,8 +1539,6 @@ index 77c11aa..349af50 100755
 -                    ConstantsBreadCrumbs.c_strTypekey:ConstantsBreadCrumbs.c_strDefaultPCLFileTpe,
 -                    ConstantsBreadCrumbs.c_strURLKey:ConstantsBreadCrumbs.c_strDefaultPCLURL,
 -                    ConstantsBreadCrumbs.c_strSparsityKey:ConstantsBreadCrumbs. c_fDefaultPCLSparsity}]
-+        """
-+
 +        # Open file from a stream or file path
 +        istmInput = open(xInputFile, 'rU') if isinstance(
 +            xInputFile, str) else xInputFile
@@ -1654,7 +1662,7 @@ index 77c11aa..349af50 100755
  
  #	def funcAdd(self,abndTwo,strFileName=None):
  #		"""
-@@ -769,7 +810,7 @@ class AbundanceTable:
+@@ -769,7 +810,7 @@
  #		lsFeaturesCombined = list(set(lsFeatures1+lsFeature2))
  #
  #		#Add samples by features (Use 0.0 for empty data features, use NA for empty metadata features)
@@ -1663,7 +1671,7 @@ index 77c11aa..349af50 100755
  #
  #		#Combine metadata
  #		dictMetadata1 = self.funcGetMetadataCopy()
-@@ -797,1660 +838,1753 @@ class AbundanceTable:
+@@ -797,1660 +838,1753 @@
  #				strLastMetadata = self.funcGetLastMetadataName(),
  #				cFileDelimiter = self.funcGetFileDelimiter(), cFeatureNameDelimiter=self.funcGetFeatureDelimiter())
  
@@ -5074,11 +5082,11 @@ index 77c11aa..349af50 100755
 +
 +        BiomCommonArea[ConstantsBreadCrumbs.c_BiomFileInfo][strInsertKey] = PostBiomValue
 +        return BiomCommonArea
-diff --git a/lefsebiom/CClade.py b/lefsebiom/CClade.py
-index 5bd1c44..48e7031 100644
---- a/lefsebiom/CClade.py
-+++ b/lefsebiom/CClade.py
-@@ -85,7 +85,7 @@ class CClade:
+Index: lefse/lefsebiom/CClade.py
+===================================================================
+--- lefse.orig/lefsebiom/CClade.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/lefsebiom/CClade.py	2019-09-06 12:01:19.018688976 +0100
+@@ -85,7 +85,7 @@
              #Then take a copy of the child's
              #If they now have a copy of a child's but have other children
              #Sum their children with thier current values
@@ -5087,7 +5095,7 @@ index 5bd1c44..48e7031 100644
  				adChild = pChild.impute( )
  				if self.m_adValues:
  					for i in range( len( adChild or [] ) ):
-@@ -118,7 +118,7 @@ class CClade:
+@@ -118,7 +118,7 @@
                          #Union all the results from freeze of all children
                          #Call freeze but append the child clade to the clade in the call.
                          #And give an incremented depth
@@ -5096,7 +5104,7 @@ index 5bd1c44..48e7031 100644
  				setiRet |= pChild._freeze( hashValues, iTarget, astrClade + [strChild], iDepth, fLeaves )
  			setiRet = set( ( i + 1 ) for i in setiRet )
  		else:
-@@ -155,7 +155,7 @@ class CClade:
+@@ -155,7 +155,7 @@
  			if self.m_hashChildren:
  				strRet += " "
  		if self.m_hashChildren:
@@ -5105,11 +5113,11 @@ index 5bd1c44..48e7031 100644
  		
  		return ( strRet + ">" )
  		
-diff --git a/lefsebiom/ValidateData.py b/lefsebiom/ValidateData.py
-index 5943240..d95222f 100755
---- a/lefsebiom/ValidateData.py
-+++ b/lefsebiom/ValidateData.py
-@@ -449,7 +449,7 @@ class ValidateData:
+Index: lefse/lefsebiom/ValidateData.py
+===================================================================
+--- lefse.orig/lefsebiom/ValidateData.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/lefsebiom/ValidateData.py	2019-09-06 12:01:19.018688976 +0100
+@@ -449,7 +449,7 @@
  
          #Check elements
          listSize = len(parameterValue)
@@ -5118,7 +5126,7 @@ index 5943240..d95222f 100755
              if(not ValidateData.funcIsValidNumeric(parameterValue[i])):
                  return False
          return True
-@@ -472,7 +472,7 @@ class ValidateData:
+@@ -472,7 +472,7 @@
  
          #Check elements
          listSize = len(parameterValue)
@@ -5127,7 +5135,7 @@ index 5943240..d95222f 100755
              if(not ValidateData.funcIsValidString(parameterValue[i])):
                  return False
          return True
-@@ -520,7 +520,7 @@ class ValidateData:
+@@ -520,7 +520,7 @@
              return False
  
          #Check key elements
@@ -5136,7 +5144,7 @@ index 5943240..d95222f 100755
          keyListSize = len(keyList)
          for i in range(0,keyListSize):
              if keyList[i] == None:
-@@ -530,7 +530,7 @@ class ValidateData:
+@@ -530,7 +530,7 @@
                      return False
  
          #Check key elements
@@ -5145,10 +5153,10 @@ index 5943240..d95222f 100755
          itemListSize = len(itemList)
  
          for i in range(0,itemListSize):
-diff --git a/plot_cladogram.py b/plot_cladogram.py
-index 1b95358..0faba08 100755
---- a/plot_cladogram.py
-+++ b/plot_cladogram.py
+Index: lefse/plot_cladogram.py
+===================================================================
+--- lefse.orig/plot_cladogram.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/plot_cladogram.py	2019-09-06 12:01:19.018688976 +0100
 @@ -3,7 +3,7 @@
  import os,sys,matplotlib,argparse,string
  matplotlib.use('Agg')
@@ -5158,7 +5166,7 @@ index 1b95358..0faba08 100755
  import numpy as np
  
  colors = ['r','g','b','m','c',[1.0,0.5,0.0],[0.0,1.0,0.0],[0.33,0.125,0.0],[0.75,0.75,0.75],'k']
-@@ -261,7 +261,7 @@ def plot_names(father,params,depth,ax,u_i,seps):
+@@ -261,7 +261,7 @@
  		lab = ""
  		txt = father.last_name
  		if params['abrv_start_lev']  < l <= params['abrv_stop_lev'] + 1:
@@ -5167,7 +5175,7 @@ index 1b95358..0faba08 100755
  			lab = str(ide)+": "+father.last_name 
  			txt = str(ide)
  #		ax.bar(fr_0, clto, width = fr_1-fr_0, bottom = float(l-1)/float(depth-1), alpha = params['alpha'], color=col, edgecolor=col)
-@@ -288,7 +288,7 @@ def draw_tree(out_file,tree,params):
+@@ -288,7 +288,7 @@
  		params['clade_sep'] *= 0.75 	 
  		seps = [params['clade_sep']*sep/(float(depth-i+1)*0.25) for i in range(1,len(tree['nlev'])+1)]
  		totseps = sum([s*nlev[i] for i,s in enumerate(seps[:-1])])
@@ -5176,10 +5184,10 @@ index 1b95358..0faba08 100755
  
  	fig = plt.figure(edgecolor=params['back_color'],facecolor=params['back_color'])
  	ax = fig.add_subplot(111, polar=True, frame_on=False, axis_bgcolor=params['back_color'] )
-diff --git a/plot_features.py b/plot_features.py
-index 5371eb3..115cf61 100755
---- a/plot_features.py
-+++ b/plot_features.py
+Index: lefse/plot_features.py
+===================================================================
+--- lefse.orig/plot_features.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/plot_features.py	2019-09-06 12:01:19.018688976 +0100
 @@ -3,7 +3,7 @@
  import os,sys,matplotlib,zipfile,argparse,string
  matplotlib.use('Agg')
@@ -5189,7 +5197,7 @@ index 5371eb3..115cf61 100755
  import random as rand
  
  colors = ['r','g','b','m','c']
-@@ -40,7 +40,7 @@ def read_data(file_data,file_feats,params):
+@@ -40,7 +40,7 @@
  	with open(file_feats, 'r') as features:
  		feats_to_plot = [(f.split()[:-1],len(f.split()) == 5) for f in features.readlines()]
  	if not feats_to_plot:
@@ -5198,7 +5206,7 @@ index 5371eb3..115cf61 100755
  		sys.exit(0)
  	feats,cls,class_sl,subclass_sl,class_hierarchy,params['norm_v'] = load_data(file_data, True)	 	
  	if params['feature_num'] > 0: 
-@@ -51,7 +51,7 @@ def read_data(file_data,file_feats,params):
+@@ -51,7 +51,7 @@
  		if params['f'] == "one" and f[0][0] != params['feature_name']: continue
  		features[f[0][0]] = {'dim':float(f[0][1]), 'abundances':feats[f[0][0]], 'sig':f[1], 'cls':cls, 'class_sl':class_sl, 'subclass_sl':subclass_sl, 'class_hierarchy':class_hierarchy} 
  	if not features:
@@ -5207,7 +5215,7 @@ index 5371eb3..115cf61 100755
                  sys.exit(0)
  	return features
  
-@@ -62,7 +62,7 @@ def plot(name,k_n,feat,params):
+@@ -62,7 +62,7 @@
  
  	max_m = 0.0
  	norm = 1.0 if float(params['norm_v']) < 0.0 else float(params['norm_v'])
@@ -5216,7 +5224,7 @@ index 5371eb3..115cf61 100755
  		fr,to  = v[0], v[1]
  		median = numpy.mean(feat['abundances'][fr:to])
  		if median > max_m: max_m = median
-@@ -76,7 +76,7 @@ def plot(name,k_n,feat,params):
+@@ -76,7 +76,7 @@
  	if max_v == 0.0: max_v = 0.0001
  	if max_v == min_v: max_v = min_v*1.1 
  
@@ -5225,7 +5233,7 @@ index 5371eb3..115cf61 100755
  	seps = []
  	xtics = []
  	x2tics = []
-@@ -142,8 +142,8 @@ if __name__ == '__main__':
+@@ -142,8 +142,8 @@
  	params['fore_color'] = 'w' if params['back_color'] == 'k' else 'k'
  	features = read_data(params['input_file_1'],params['input_file_2'],params)
  	if params['archive'] == "zip": file = zipfile.ZipFile(params['output_file'], "w")
@@ -5236,11 +5244,11 @@ index 5371eb3..115cf61 100755
  		if params['archive'] == "zip":
  			of = plot("/tmp/"+str(int(f['sig']))+"_"+"-".join(k.split("."))+"."+params['format'],k,f,params)
  			file.write(of, os.path.basename(of), zipfile.ZIP_DEFLATED)
-diff --git a/plot_res.py b/plot_res.py
-index f87e79e..e67153c 100755
---- a/plot_res.py
-+++ b/plot_res.py
-@@ -6,7 +6,7 @@ matplotlib.use('Agg')
+Index: lefse/plot_res.py
+===================================================================
+--- lefse.orig/plot_res.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/plot_res.py	2019-09-06 12:01:19.022688949 +0100
+@@ -6,7 +6,7 @@
  from pylab import *
  from collections import defaultdict
  
@@ -5249,7 +5257,7 @@ index f87e79e..e67153c 100755
  import argparse
  
  colors = ['r','g','b','m','c','y','k','w']
-@@ -44,7 +44,7 @@ def read_data(input_file,output_file,otu_only):
+@@ -44,7 +44,7 @@
              rows = [line.strip().split()[:-1] for line in inp.readlines() if len(line.strip().split())>3 and len(line.strip().split()[0].split('.'))==8] # a feature with length 8 will have an OTU id associated with it
      classes = list(set([v[2] for v in rows if len(v)>2]))
      if len(classes) < 1: 
@@ -5258,7 +5266,7 @@ index f87e79e..e67153c 100755
          os.system("touch "+output_file)
          sys.exit()
      data = {}
-@@ -94,9 +94,9 @@ def plot_histo_hor(path,params,data,bcl,report_features):
+@@ -94,9 +94,9 @@
          ax.barh(pos[i],vv, align='center', color=col, label=lab, height=0.8, edgecolor=params['fore_color'])
      mv = max([abs(float(v[3])) for v in data['rows']])  
      if report_features:
@@ -5270,7 +5278,7 @@ index f87e79e..e67153c 100755
      for i,r in enumerate(data['rows']):
          indcl = cls.index(data['rows'][i][2])
          if params['n_scl'] < 0: rr = r[0]
-@@ -156,9 +156,9 @@ def plot_histo_ver(path,params,data,report_features):
+@@ -156,9 +156,9 @@
          vv = fabs(float(v[3])) 
          ax.bar(pos[i],vv, align='center', color=col, label=lab)
      if report_features:
@@ -5282,11 +5290,11 @@ index f87e79e..e67153c 100755
      xticks(pos,nam,rotation=-20, ha = 'left',size=params['feature_font_size'])  
      ax.set_title(params['title'],size=params['title_font_size'])
      ax.set_ylabel("LDA SCORE (log 10)")
-diff --git a/qiime2lefse.py b/qiime2lefse.py
-index dffecc3..cdd09ec 100755
---- a/qiime2lefse.py
-+++ b/qiime2lefse.py
-@@ -43,8 +43,8 @@ def read_params(args):
+Index: lefse/qiime2lefse.py
+===================================================================
+--- lefse.orig/qiime2lefse.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/qiime2lefse.py	2019-09-06 12:01:19.022688949 +0100
+@@ -43,8 +43,8 @@
  def qiime2lefse(  fin, fmd, fout, all_md, sel_md ):
      with (fin if fin==sys.stdin else open(fin)) as inpf :
          lines = [list(ll) for ll in 
@@ -5297,7 +5305,7 @@ index dffecc3..cdd09ec 100755
      for i,(l1,l2) in enumerate(zip( lines[0], lines[-1] )):
          if not l2 == 'Consensus Lineage':
              lines[-1][i] = l2+"|"+l1
-@@ -59,17 +59,17 @@ def qiime2lefse(  fin, fmd, fout, all_md, sel_md ):
+@@ -59,17 +59,17 @@
          mdf = mdlines[0][1:]
  
          for l in mdlines:
@@ -5318,10 +5326,10 @@ index dffecc3..cdd09ec 100755
          if k == 'Consensus Lineage':
              continue
          out_m.append( [md[k][kmd] for kmd in selected_md] + list(v) )
-diff --git a/run_lefse.py b/run_lefse.py
-index df248ef..98c42a3 100755
---- a/run_lefse.py
-+++ b/run_lefse.py
+Index: lefse/run_lefse.py
+===================================================================
+--- lefse.orig/run_lefse.py	2019-09-06 12:01:19.030688896 +0100
++++ lefse/run_lefse.py	2019-09-06 12:01:19.022688949 +0100
 @@ -1,7 +1,7 @@
  #!/usr/bin/env python
  
@@ -5331,7 +5339,7 @@ index df248ef..98c42a3 100755
  
  def read_params(args):
          parser = argparse.ArgumentParser(description='LEfSe 1.0')
-@@ -60,38 +60,38 @@ if __name__ == '__main__':
+@@ -60,38 +60,38 @@
  	wilcoxon_res = {}
  	kw_n_ok = 0
  	nf = 0
@@ -5381,7 +5389,7 @@ index df248ef..98c42a3 100755
  		lda_res,lda_res_th = {},{}
  	outres = {}
  	outres['lda_res_th'] = lda_res_th
-@@ -99,5 +99,5 @@ if __name__ == '__main__':
+@@ -99,5 +99,5 @@
  	outres['cls_means'] = cls_means
  	outres['cls_means_kord'] = kord
  	outres['wilcox_res'] = wilcoxon_res



View it on GitLab: https://salsa.debian.org/med-team/lefse/commit/9590ab80cef40ae65d05d49137bfd8b4b8a1ea28

-- 
View it on GitLab: https://salsa.debian.org/med-team/lefse/commit/9590ab80cef40ae65d05d49137bfd8b4b8a1ea28
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/20190906/e567b6a5/attachment-0001.html>


More information about the debian-med-commit mailing list