philarevalo / PopCOGenT

Microbial Populations as Clusters Of Gene Transfer
GNU General Public License v3.0
42 stars 12 forks source link

FileNotFoundError #15

Closed lyy005 closed 4 years ago

lyy005 commented 4 years ago

Hi there, Thank you for making this great tool. I'm running PopCOGenT on 190 bacterial genomes. And I got the error information as follows. I attached the complete log file here PopCOGenT.Gilliamella.log.

I was able to run PopCOGenT on the test dataset and another dataset with 80 genomes without any problem.

Thank you for any suggestions!

Yiyuan

multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/yli/miniconda3/envs/PopCOGenT/lib/python3.6/site-packages/joblib/parallel.py", line 130, in call return self.func(*args, kwargs) File "/home/yli/miniconda3/envs/PopCOGenT/lib/python3.6/site-packages/joblib/parallel.py", line 72, in call return [func(*args, *kwargs) for func, args, kwargs in self.items] File "/home/yli/miniconda3/envs/PopCOGenT/lib/python3.6/site-packages/joblib/parallel.py", line 72, in return [func(args, kwargs) for func, args, kwargs in self.items] File "/User/yli/PopCoGenT/PopCOGenT/src/PopCOGenT/length_bias_functions.py", line 20, in align_and_calculate_length_bias random_seed) File "/User/yli/PopCoGenT/PopCOGenT/src/PopCOGenT/length_bias_functions.py", line 90, in align_genomes remove('{align_directory}/{prefix}'.format(prefix=prefix, align_directory=alignment_dir)) FileNotFoundError: [Errno 2] No such file or directory: '/User/yli/Startover/step10_PopCOGenT/Gilliamella/proc//bl26xmXEZE6LhLqtpVeqoPmYmSCzNPVO'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/yli/miniconda3/envs/PopCOGenT/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/home/yli/miniconda3/envs/PopCOGenT/lib/python3.6/site-packages/joblib/parallel.py", line 140, in call raise TransportableException(text, e_type) joblib.my_exceptions.TransportableException: TransportableException


FileNotFoundError Sat May 30 00:30:33 2020 PID: 41436Python 3.6.10: /home/yli/miniconda3/envs/PopCOGenT/bin/python ........................................................................... /home/yli/miniconda3/envs/PopCOGenT/lib/python3.6/site-packages/joblib/parallel.py in call(self=) 67 def init(self, iterator_slice): 68 self.items = list(iterator_slice) 69 self._size = len(self.items) 70 71 def call(self): ---> 72 return [func(*args, **kwargs) for func, args, kwargs in self.items] self.items = [(, ('/User/yli/S...ella/Gilliamella_zhB3022_Acerana.fa.renamed.mugsy', '/User/yli/S...liamella_zhP0221M0141_Amellifera.fa.renamed.mugsy', '/User/yli/Startover/step10_PopCOGenT/Gilliamella/ 73 74 def len(self): 75 return self._size 76

lyy005 commented 4 years ago

Hello, I was able to resolve this issue. There're several input genomes that are too divergent to the rest of the genomes. After removing the divergent genomes, I was able to get the output without any error.

Yiyuan

susheelbhanu commented 3 years ago

Hi,

I have the same issue. However, in my use case it makes sense to see if HGT occurred in divergent genomes, so it will be beneficial to either just state as an output that they are too divergent or create an empty folder to not run into the error.

If it's not too much trouble, could you include an if-else flag to check divergence first with something like MASH and then proceed as appropriate?

Thanks, Susheel