huangyh09 / brie

BRIE: Bayesian Regression for Isoform Estimate in Single Cells
https://brie.readthedocs.io
Apache License 2.0
41 stars 15 forks source link

visualize sashimi plot with brie2 #50

Open TuoCai2000 opened 2 years ago

TuoCai2000 commented 2 years ago

Hello!Thank you for developing Brie! Recently I tried to visualize sashimi plot with Brie2's h5ad files. However,I noticed that I had to use Brie1's results(samples.csv.gz)to draw the sashimi plot with miso's sashimi_plot command. Samples.csv.gz includes the MCMC samples of posterior distribution of Psi,however,h5ad files don't contain this information given that Brie2 doesn't use Metropolis-Hastings algorithm to approximate the posterior. So I would like to verify if sashimi plot can only be generated with Brie1's result? Thank you so much!

yiyisun682 commented 2 years ago

Hello!Thank you for developing Brie! Following up on the previous question raised by TuoCai2000, I would like to ask if there is a script that can directly use the .h5ad file generated by Brie2 to draw the sashimiplot?

huangyh09 commented 2 years ago

Thanks @TuoCai2000 and @yiyisun682 for being interested in the sashimi function. Unfortunately, it's indeed only available for brie1's results and doesn't support h5ad file.

Potentially, you can extract the specific cell types into sub-bam file(s) and make sashimi plots by treating them as bulk samples: https://github.com/huangyh09/briekit/tree/master/sashimi_plot Note, this only supports Python 2 (which you can create with conda environment).

For extracting cells from a bam file with samtools view:

samtools view -D BC:barcodes.txt -o /data_folder/data.barcodes.bam /data_folder/data.bam

Yuanhua

yiyisun682 commented 2 years ago

Thank you very much for your answer and we will make further attempts according to your suggestions.