mortazavilab / swan_vis

A Python library to visualize and analyze long-read transcriptomes
https://freese.gitbook.io/swan/
MIT License
57 stars 11 forks source link

Missing case for plottedgraph init #8

Closed fairliereese closed 3 years ago

fairliereese commented 3 years ago

Case:

Minimal working (or non-working) example:

sg = swan.SwanGraph('swan.p')
sg.plot_graph('SARS', indicate_novel=True, display=True, prefix='figures/SARS')
sg.plot_transcript_path('ENCODEHT000445064', indicate_novel=True, display=True, prefix='figures/SARS')
fairliereese commented 3 years ago

Another case missing: Gaby gets an error on the last plot when she does the following:

dataset_groups = [["Cortex_WT_M_1","Cortex_WT_M_2","Cortex_WT_F_1","Cortex_WT_F_2"],["Hippocampus_WT_M_2","Hippocampus_WT_M_1","Hippocampus_WT_F_1","Hippocampus_WT_F_2",],["Hippocampus_5x_M_2","Hippocampus_5x_M_1","Hippocampus_5x_F_1","Hippocampus_5x_F_2"]]
dataset_group_names = ['CortexWT','Cortex5x','HippoWT','Hippo5x']
sg = swan.SwanGraph(‘swan_gbg.p’)
sg.gen_report(‘Kif5a’,prefix=‘reports/Kif5a’,heatmap=True, browser=True, dataset_groups=dataset_groups, dataset_group_names=dataset_group_names, novelty=True)
sg.gen_report(‘Kif5a’,prefix=‘reports/Kif5a’, heatmap=True, browser=False, dataset_groups=dataset_groups,dataset_group_names, dataset_group_names=[‘CortexWT’,‘Cortex5x’,‘HippoWT’,‘Hippo5x’], novelty=True)
sg.gen_report(‘Kif5a’,prefix=‘reports/Kif5a’, heatmap=True, dataset_groups=dataset_groups, dataset_group_names=dataset_group_names,novelty=True)
fairliereese commented 3 years ago

Case:

  • Plot gene summary graph for gene
  • Plot transcript path graph for transcript of same gene
  • Try to plot gene summary graph for same gene again --> it plots the transcript path graph!

Minimal working (or non-working) example:

sg = swan.SwanGraph('swan.p')
sg.plot_graph('SARS', indicate_novel=True, display=True, prefix='figures/SARS')
sg.plot_transcript_path('ENCODEHT000445064', indicate_novel=True, display=True, prefix='figures/SARS')

Fixed by https://github.com/mortazavilab/swan_vis/commit/d847a72aa33d7f271418ba12e226b8a69bb23e26