PPanGGOLiN icon indicating copy to clipboard operation
PPanGGOLiN copied to clipboard

Shell partitions

Open seajane opened this issue 2 years ago • 10 comments

I upgraded to the newest version of ppanggolin, which is working well, but unfortunately the different shades of green for the shell partitions isn't showing up on the tile plot or the gexf anymore. Is there a way to get them to appear? This feature was very useful for our analyses. Thanks!

seajane avatar Jul 22 '22 19:07 seajane

Hi ! Could you give me the old version number and the new version number ? It will really help to fix quickly ! Thanks

jpjarnoux avatar Jul 25 '22 14:07 jpjarnoux

1.2.78 is the "older" version number and the "newer" version is 1.2.74 -- hmm maybe I didn't upgrade at all -- apologies!

seajane avatar Jul 25 '22 16:07 seajane

We didn't push an official new release. I suggest you to come back to 1.2.78 and come back to me if there is any problem. To do that, look back to my comment here : https://github.com/labgem/PPanGGOLiN/issues/80#issuecomment-1091993882

Thanks

jpjarnoux avatar Jul 26 '22 12:07 jpjarnoux

Hi, I am now trying to align a set of sequences to my pangenome using 1.2.78 (I am writing here because I want to make sure that we are talking about the same version). This pangenome has been aligned, graphed, partioned, rgp, spotted and moduled. When I run ppanggolin info -p pangenome.h5 --status

I get the following error :

genomes annotated : true genes clustered : true genes have their sequences : true gene families have their sequences : true neighbors graph : true Traceback (most recent call last): File "/Users/hbouzek/opt/anaconda3/envs/ppgg-dev/bin/ppanggolin", line 8, in <module> sys.exit(main()) File "/Users/hbouzek/opt/anaconda3/envs/ppgg-dev/lib/python3.8/site-packages/ppanggolin/main.py", line 237, in main ppanggolin.info.launch(args) File "/Users/hbouzek/opt/anaconda3/envs/ppgg-dev/lib/python3.8/site-packages/ppanggolin/info/info.py", line 48, in launch printInfo(args.pangenome, args.status, args.content, args.parameters) File "/Users/hbouzek/opt/anaconda3/envs/ppgg-dev/lib/python3.8/site-packages/ppanggolin/info/info.py", line 25, in printInfo print(f"pangenome partitioned : {'true' if statusGroup._v_attrs.Partitionned else 'false'}") File "/Users/hbouzek/opt/anaconda3/envs/ppgg-dev/lib/python3.8/site-packages/tables/attributeset.py", line 283, in __getattr__ raise AttributeError(f"Attribute {name!r} does not exist " AttributeError: Attribute 'Partitionned' does not exist in node: '/status' Closing remaining open files:pangenome.h5...done

This is the same error I get when I try to align, so am assuming there is a status check in the alignment.

The --content option gives this output: ppanggolin info -p pangenome.h5 --content Genes: 158504 Organisms: 76 Families: 6354 Edges: 12063 Persistent ( min:0.78, max:1.0, sd:0.03, mean:0.99 ): 1405 Shell ( min:0.11, max:0.87, sd:0.19, mean:0.32 ): 1638 Cloud ( min:0.01, max:0.12, sd:0.03, mean:0.04 ): 3311 Number of partitions: 5 Shell S1 : 364 Shell S3 : 1060 Shell S2 : 214 RGPs: 3506 Spots: 242 Modules: 293 Families in Modules: 1607

seajane avatar Jul 29 '22 23:07 seajane

Hi, Indeed there is always a status check before any operation, to know what analysis steps were conducted, and to eventually raise an error if something unexpected happened along the way

The fact that you manage to get everything done, especially including operations that require a partition (rgp spot module), but that it now raises an error is a bit surprising to me because it should've either raised such error before, or warned about something going wrong. So, if all of your operations ended as expected without error, there's possibly a problem on PPanGGOLiN's side.

Did you run all steps with the same PPanGGOLiN version ?

Adelme

axbazin avatar Aug 03 '22 08:08 axbazin

Thanks for getting back to me, I've been using 1.2.78 for everything, but needed to make a new conda environment recently. (and I have lost the ability to make tile plots that show the different shell partitions). Wondering if it isn't an internal spelling error (AttributeError: Attribute 'Partitionned' does not exist in node: '/status' ) in this older version.

seajane avatar Aug 03 '22 15:08 seajane

Alright, indeed you are correct thank you for the hint, this was tricky, but I found the reason.

Before this new conda environment update, I believe your were using a branch version, possibly branch 80-partitioning ? In that branch, I see that the spelling has been fixed, which... well makes pangenomes generated with any other versions incompatible.

Sadly, they are both tagged as 1.2.78, which is very missleading.

axbazin avatar Aug 04 '22 07:08 axbazin

Hi ! I create this error and try to fix this, but it continues to happen. I suggest you to recreate your pangenome with your current version, it will be the more easy way. Sorry for this bug. Jerome

jpjarnoux avatar Aug 04 '22 13:08 jpjarnoux

Unfortunately this leads me back to a situation where the "fixed" versions are missing the partitioning information on the tile plots and subsequent gexf graph. This information has been really crucial for our analysis and I would very much like to get a version that will retain the sub-partitions of the shell.

seajane avatar Aug 04 '22 18:08 seajane

if you re-install the 80-partitioning branch, everything should work as it did. The ICL not displaying shell partitions is fixed in that branch.

We'll try to get all the branches merged so that it's not as messy in the futur.

axbazin avatar Aug 05 '22 07:08 axbazin

I have a new computer and lost access to the developmental branch with the shell sub-partitioning intact. Is there a branch where this still works? This is such a useful feature for our analyses.

seajane avatar Feb 03 '23 00:02 seajane

I'll cleanup all the branches within the next few days, and we've planned to do a bugfix release with this feature among others that have been fixed since the latest release.

The branch called "release1.3" includes this fix, but I'm not 100% it is compatible with your pangenomes as it includes some changes with the data structure of ppanggolin.

There will be a proper one compatible with the current version in the next few days, I'll add a message here when it's done.

axbazin avatar Feb 03 '23 08:02 axbazin

I reran ppanggolin on a new set of data using the "release1.3" branch and the partitions didn't get assigned.

seajane avatar Feb 03 '23 20:02 seajane

Alright thanks for letting me now I'll check this

axbazin avatar Feb 05 '23 12:02 axbazin

So, if I'm not completely mistaken, the version now in master should display partitions nicely in the tile_plots and the other files that had that info. As long as partitions were computed with a ppanggolin version that had that working, it should work.

I've tested that with the chlamydia genomes in the testingDataset directory and it worked nicely. Hopefully the same goes with your pangenome.

Please let me know if it does!

axbazin avatar Feb 07 '23 22:02 axbazin

Closing as this is now in master and soon in the next release.

If it comes back don't hesitate to just reopen it :)

axbazin avatar Feb 15 '23 16:02 axbazin