Git Product home page Git Product logo

Comments (8)

xiaonalu avatar xiaonalu commented on September 27, 2024 1

I use a small script as below, then sbatch it.

module load miniconda
conda activate swan
python Swan_visualization.py

In the Swan_visualization.py, I use swan.save_fig('figures/PB.13560.539.png') to save the figure.

I will try the prefix. Thank you so much, and good night

from swan_vis.

fairliereese avatar fairliereese commented on September 27, 2024

Is this the sort of plot you're trying to make? Can you send me a screenshot of your output, as well as your code? Thanks!

from swan_vis.

xiaonalu avatar xiaonalu commented on September 27, 2024

Yes, exactly~ However, when I want to have other transcripts as background for one of my transcript, it looks as the second fig. Thank you
image

from swan_vis.

fairliereese avatar fairliereese commented on September 27, 2024

Whoa, yeah this doesn't look correct. Can you please send me the code you used starting from loading your SwanGraph up through the call that you made to produce the weird figure? Additionally, could you please tell me how and when you installed Swan?

As a side note, Swan has some "clever" code to try and prevent from having to recompute the plotted representation of a gene for which (as you've found out) not all cases are accounted for. A workaround that commonly fixes this in my experience is just reloading the SwanGraph and remaking the plot that's giving you trouble.

from swan_vis.

xiaonalu avatar xiaonalu commented on September 27, 2024

Hi, here is the code.
import swan_vis as swan
sg = swan.read('swan.p')
cmap = {'exon': '#003476'}
sg.set_plotting_colors(cmap)
sg.plot_graph('full_gene', indicate_novel=True)
sg.plot_transcript_path('PB.13560.539', indicate_novel=True)
swan.save_fig('figures/PB.13560.539.png')

I installed the swan around 2 months ago I think. I load miniconda module first, create conda environment, activate conda environment, then install swan_vis with pip... It's a sever at school...

from swan_vis.

fairliereese avatar fairliereese commented on September 27, 2024

One more question -- is 'full_gene' the gene that 'PB.13560.539' is from?

from swan_vis.

xiaonalu avatar xiaonalu commented on September 27, 2024

Hi, there are multiple transcripts of the 'full_gene', it's a single gene. 'PB.13560.539' is one of the transcripts. Thank you very much

from swan_vis.

fairliereese avatar fairliereese commented on September 27, 2024

I was unfortunately not able to reproduce your problem. However I did encounter some difficulty using Swan's save_fig function where I was getting blank figures. I was able to solve this by calling save_fig in the same Jupyter notebook cell as the plot that was produced (see this post where there is a comment mentioning that that's the case. Because of this I wanted to ask -- are you running Swan from a Python notebook? The command line? A script?

Additionally, I wanted to ask you to try providing the prefix argument to plot_transcript_path. This strategy should automatically generate a file name for your figure and save it which circumvents some of the issues I encountered using iPython notebooks. Please let me know if this works for you!

from swan_vis.

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.