Code Monkey home page Code Monkey logo

Comments (11)

axbazin avatar axbazin commented on June 20, 2024 1

The latest commit introduces the new filter 'product' to display what can be found in the 'product' field of annotation files, which is what you were looking for I believe.

You need to install it from git, like last time, and you can use it as such:

ppanggolin spot -p ./pangenome.h5 --draw_hotspots --force -o ./hotspots-fuso-1/ --label_priority product,name,ID

for example, which will display the product if there is one, if not the gene name if there is one, and if not the gene ID.

I've updated the margins as well so that the display is not too bad, but there will probably be some overlapping labels.
Adelme

from ppanggolin.

axbazin avatar axbazin commented on June 20, 2024

Hi,

I managed to replicate the error, it comes from the '&' special character in the RAST annotations apparently. I've updated PPanGGOLiN's gexf writing functions to remove this character and managed to open the gexf generated by PPanGGOLiN afterwards.

The latest commit on the master branch should fix the issue. If you used conda to install ppanggolin, you can install the new version in your conda environment by cloning the repository and install as such:

git clone https://github.com/labgem/PPanGGOLiN.git .
pip install .

and then reuse the 'write' function to obtain the gexf again, as such:

ppanggolin write -p pangenome.h5 --gexf --output MYOUTPUTDIR

I saw in the gexf file which you provided that you use an older version of PPanGGOLiN (1.1.96). If you are in a constrained environment where you cannot update the tool easily, an alternative solution is to remove the '&' character from the annotation files which breaks the gexf format for some reason. It should work well after that.

Thank you for the bug report and your nice comment :)

Adelme

from ppanggolin.

jdakota1305 avatar jdakota1305 commented on June 20, 2024

Hi,

Thank you for quickly replying to this! I was able to render the graph after removing the '&' special character. I am now trying to generate the Spots of insertion figures using the --draw_hotspots command, but I am generating figures without any labels. Is this another issue related to the annotations, or am I using the command incorrectly?

I am running

ppanggolin spot -p ./pangenome.h5 --draw_hotspots --force -o ./hotspots-fuso-1/

The file appears to be too large to share here, so I can email if it would be helpful.

from ppanggolin.

jdakota1305 avatar jdakota1305 commented on June 20, 2024

Additionally, if I am using PPanGGOLiN in a conda environment, can I update to add the fix you just pushed? Thank you!

from ppanggolin.

axbazin avatar axbazin commented on June 20, 2024

For the hotspot command, i've done multiple changes lately (related to other issues), so updating PPanGGOLiN will likely help you with the figure labels. There's actually an additional option to the spot command to control which information to use as labels, which makes things simpler. Details on how to use this option were given in this message: #56 (comment) (I've not updated the wiki yet)

If you are in a conda environment, you can just use the two lines I wrote in my first message while the environment is activated, it should work nicely. For the 'conda update' to work it involves making a new release, and then updating the bioconda recipe, which involves additional work for people other than me so I avoid doing it too often.

from ppanggolin.

jdakota1305 avatar jdakota1305 commented on June 20, 2024

Hi Adelme,

Thank you for the guidance on this! I was able to generate figures with labels, but they seem to be only general ID's such as CDS_xxxx--is there any way to have the labels be the "Annotation" seen in the matrix like this:
image

from ppanggolin.

axbazin avatar axbazin commented on June 20, 2024

Hi,

It is not currently possible, but I can add it as an additional filter quite easily, I'll do that later today.
I'd expect the figures to be a bit hard to read though, but we'll see.

I'll tell you when the feature is on the master branch.

Adelme

from ppanggolin.

jdakota1305 avatar jdakota1305 commented on June 20, 2024

Hi Adelme,

This is great! This is exactly what my PI was hoping for, so I am very thankful that you pushed that change through so quickly.

Is there by chance a way you could add the ability to scale the label font size down as an optional parameter/argument? This screenshot is of a particularly crowded figure:
image

If that is not something that can be changed, feel free to close this issue! Thank you again!
Dakota

from ppanggolin.

axbazin avatar axbazin commented on June 20, 2024

Indeed that's quite unreadable. It's probably possible to do that, I'll take a look at it within a few days.

from ppanggolin.

axbazin avatar axbazin commented on June 20, 2024

The latest commit on the repository adds a new option to the spot command "--fig_margin" which can help you increase the space between the represented RGPs.
Default is 100.
You can install the new version with the same method as previously.

I'll try to think of a better way to customize the figures in the futur.

Adelme

from ppanggolin.

jdakota1305 avatar jdakota1305 commented on June 20, 2024

Hi Adelme,

This is great! I appreciate your willingness to work on this and to push all of these commits through so quickly. The new '--fig_margin' option is working perfectly for our purposes.

Cheers,
Dakota

from ppanggolin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.