PopCOGenT icon indicating copy to clipboard operation
PopCOGenT copied to clipboard

PopCOGenT

Open malihaaziz opened this issue 4 years ago • 9 comments

Im running into an error copy pasted below. I am running PopCOGenT on 3 assemblies

Ouput directory does not exist. Creating new directory. Traceback (most recent call last): File "/GWSPH/groups/liu_price_lab/tools/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2646, in get_loc return self._engine.get_loc(key) File "pandas/_libs/index.pyx", line 111, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1618, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1626, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Larger genome'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "cluster.py", line 315, in main() File "cluster.py", line 70, in main linear_model=negative_selection_linear_fit()) File "cluster.py", line 227, in make_edgefile predict_df['Genome_size'] = trn_table['Larger genome'] / 1e6 File "/GWSPH/groups/liu_price_lab/tools/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py", line 2800, in getitem indexer = self.columns.get_loc(key) File "/GWSPH/groups/liu_price_lab/tools/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2648, in get_loc return self._engine.get_loc(self._maybe_cast_indexer(key)) File "pandas/_libs/index.pyx", line 111, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1618, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1626, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Larger genome'

malihaaziz avatar Mar 27 '20 04:03 malihaaziz

Hello! I think the problem is that your 3 genomes only formed a single clonal cluster, i.e., they were all too closely related to infer population structure by gene flow. If you share the contents of your *length_bias.txt file, I can confirm.

philarevalo avatar Mar 27 '20 13:03 philarevalo

Thankyou for responding so quickly.. the 'FUTI_PopCOGenT.length_bias.txt ' is actually empty.. is there a log that I can check to see if the code doesnt like something or missing some inputs?

[mlaziz@log003 PopCOGenT]$ cat output/FUTI_PopCOGenT.length_bias.txt Strain 1 Strain 2 Initial divergence Alignment size Genome 1 size Genome 2 size Observed SSD SSD 95 CI low SSD 95 CI high

malihaaziz avatar Mar 27 '20 14:03 malihaaziz

Unfortunately there isn't a logfile at the moment, but I will get back to you on what might be going on.

philarevalo avatar Mar 27 '20 16:03 philarevalo

Can you list the contents of the ./proc/ directory?

philarevalo avatar Mar 29 '20 21:03 philarevalo

im running the tool on the university's HPC. There are a lot of files in /proc. Are you looking for any one particular file?

malihaaziz avatar Mar 31 '20 12:03 malihaaziz

Hi,

I got exactly the same error, then I checked the steps and found in the script get_alignment_and_length_bias.py there is one lineglob.glob(genome_directory + '*' + genome_extension) which assumes your genome_directory ends with / to work properly, so first you need to give it like this genome_dir=genomes/ in the config.sh file.

If it still doesn't work, that's probably because your mugsy wasn't configured properly. You probably need to modify the export MUGSY_INSTALL=./mugsy_x86-64-v1r2.3 line to the absolute path in the mugsyenv.sh file.

Hope it helps.

Best, Shengwei

housw avatar Apr 12 '20 08:04 housw

@maziz2 if the solution that @housw suggested doesn't work, a useful file from proc to see would be any *.txt file. In theory, there should have been one created for each alignment. If there are no *.txt files, then I suspect that the above solution will work.

philarevalo avatar Apr 12 '20 14:04 philarevalo

The solution by Shengwei fixed it! Thankyou so much Shengwei and Phil!

malihaaziz avatar May 08 '20 19:05 malihaaziz

@housw solution worked. Thank you all for your help!

dvorikus avatar Apr 29 '22 06:04 dvorikus