You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is: denoising_resized_seeds = tmpFiles.add( filename_woext + '_denoising_resizedSeeds.fasta' )
But it should be: denoising_resized_seeds = tmp_files.add( filename_woext + '_denoising_resizedSeeds.fasta' )
Issue 2: Missing Functions
Two functions that were previously available in clustering.py (before FROGS v5.0.0) are missing as well in denoising.py:
resizeSeed()
agregate_composition()
The script uses them, but they are not included in denoising.py anymore.
def resizeSeed(seed_in, seed_in_compo, seed_out):
"""
@summary: add read abundance to seed sequence name
@param seed_in : [str] Path to seed input fasta file
@param seed_in_compo : [str] Path to seed input composition swarm file
@param seed_out : [str] Path to seed output fasta file with abundance in name and sorted
"""
dict_cluster_abond=dict()
with open(seed_in_compo,"rt") as f:
for idx,line in enumerate(f.readlines()):
if not line.startswith("#"):
cluster_name = "Cluster_" + str(idx+1) if not "FROGS_combined" in line.split()[0] else "Cluster_" + str(idx+1) + "_FROGS_combined"
dict_cluster_abond[cluster_name]=sum([ int(n.split("_")[-1]) for n in line.strip().split()])
f.close()
FH_input = FastaIO( seed_in )
FH_out=FastaIO(seed_out , "wt" )
for record in FH_input:
record.id += "_" + str(dict_cluster_abond[record.id])
FH_out.write( record )
FH_input.close()
FH_out.close()
def agregate_composition(step1_compo , step2_compo, out_compo):
"""
@summary: convert cluster composition in cluster in cluster composition in read (in case of two steps clustering)
@param step1_compo : [str] Path to cluster1 composition in read (clustering step1)
@param step2_compo : [str] Path to cluster2 composition in cluster1 (clustering step2)
@param out_composition : [str] Path to cluster2 composition in read
"""
dict_cluster1_compo=dict()
with open(step1_compo,"rt") as f:
for idx,line in enumerate(f.readlines()):
if "FROGS_combined" in line.split()[0]:
dict_cluster1_compo["Cluster_"+str(idx+1)+"_FROGS_combined"]=line.strip()
else:
dict_cluster1_compo["Cluster_"+str(idx+1)]=line.strip()
f.close()
FH_out=open(out_compo,"wt")
with open(step2_compo,"rt") as f:
for line in f.readlines():
compo=" ".join([dict_cluster1_compo["_".join(n.split('_')[0:-1])] for n in line.strip().split(" ")])
FH_out.write(compo+"\n")
I hope you can fix this soon! Thanks for your hard work on FROGS.
The text was updated successfully, but these errors were encountered:
Hi I want to inform you, that the denoising.py tool throws exceptions if I use it with --denoising and --distance 3 arguments.
The issue appears to be caused by a typo in the variable name and missing functions that were available in previous versions.
Issue 1: Typo in Variable Name
The error occurs on line 1855 of denoising.py
It is:
denoising_resized_seeds = tmpFiles.add( filename_woext + '_denoising_resizedSeeds.fasta' )
But it should be:
denoising_resized_seeds = tmp_files.add( filename_woext + '_denoising_resizedSeeds.fasta' )
Issue 2: Missing Functions
Two functions that were previously available in clustering.py (before FROGS v5.0.0) are missing as well in denoising.py:
resizeSeed()
agregate_composition()
The script uses them, but they are not included in denoising.py anymore.
I hope you can fix this soon! Thanks for your hard work on FROGS.
The text was updated successfully, but these errors were encountered: