CompEpigen / figeno

Tool for plotting sequencing data along genomic coordinates.
GNU General Public License v3.0
248 stars 8 forks source link

Inverted BigWig and ASE #4

Closed Lijingtangbo closed 6 months ago

Lijingtangbo commented 6 months ago

Hi, thank you for creating figeno and making it public. It is very useful for me. I would like to ask you some suggestions.

Thanks!

e-sollier commented 6 months ago

Hi,

Thanks for the suggestion to allow inverted bigwig tracks. It was not possible, but I've just added a new version 1.0.8 for figeno, where I added an option to have the bigwig and coverage tracks upside down. You can install the new version with pip install figeno==1.0.8 and then include "upside_down":true in the config file, for the track that you want to be upside down.

Concerning allele-specific expression, what kind of figures do you want exactly ? Figeno currently has an undocument "ase" track type, which can generate this kind of figure: ASE_MECOM It shows the variant allele frequencies of heterozygous SNPs in DNA and RNA, and shows where on the chromosomes these SNPs lie. Is this the kind of figure that what you want ?

For now, this feature is undocumented because it requires inputs which are quite unusual:

I have the following nextflow workflow to generate these files: https://github.com/CompEpigen/wf_WGS (with run_ase: true), but this only supports human data. Here is the config file used to generate the figure above, together with the input files: config_ase.json inputs.zip

If you think this track type could be useful, I could add it to the documentation, but considering that the inputs are difficult to produce I don't think many users would be interested in it. Or if you have suggestions for alternative ASE plots, feel free to share them.

Lijingtangbo commented 6 months ago

Thank for your kind reply! I will definitely try "upside down" option. Actually, I realised that you already had an ase track. I tried but with a little changes.

peg10_ase

Lijingtangbo commented 6 months ago

Hi, I think in this version 1.0.8. The default setting for BigWig plot is"upside_down":true.

e-sollier commented 6 months ago

Oups, thanks for noticing this! I've fixed this is 1.0.9. I've also corrected the df_ase["altCount_DNA"] = refCount_DNA in ase.py and for the ase track, I added a "bar_width" option, which is by default at 0.7 but which you can set to 0.01 if you want to get narrower bars like you did in your figures.

Lijingtangbo commented 6 months ago

Thank you very much!

Lijingtangbo commented 5 months ago

I think 1.0.9 has a little problem. see attached. image

e-sollier commented 5 months ago

I think this should be fixed with 1.0.10, did you try it ?