MarioniLab / DropletUtils

Clone of the Bioconductor repository for the DropletUtils package.
https://bioconductor.org/packages/devel/bioc/html/DropletUtils.html
56 stars 27 forks source link

How to run barcodeSwapping and ChimericReads with no h5 info? #70

Open mortunco opened 3 years ago

mortunco commented 3 years ago

Hi,

First of all thank you for coming up with such a critical procedure that would effect almost all single cell study.

Background: We implemented 10x to our in-house method that gives read out as RNAs to make "single cell" version of our method. Because our method contains couple additional multiplexing steps and mainly based on non-coding regions we simply couldn't implement cell-ranger standardized method pipeline.

Problem: Please see the sample dataframe below. We observe same moleculer UMIs from the barcode(droplet) are pointing different transcript fragments which doesnt make sense. Instead of some arbitrary filtration, i think this problem is similar to problems in "Removing Swapping Events" section. But I see that most of your tools are built to process standard cell-ranger output (barcode, gene, matrix.mtx or h5) which makes becomes a little problematic for us.

Attempt: We successfully generated a dataframe like below. rindex and cindex are similar to transcript~ gene info. We were able to create barcode, gene tsvs and matrix.mtx files. Using these I created sce object with read10xCounts. Droputils allows me to run empty drops but for Swapping i need mol.info, but i dont know how to convert my data into h5 format.

cellb   molb tindex n
AAAAAAGGTATGGTTC    TAAATCAAAAAA    A   5
AAAAAAGGTATGGTTC    TATCTCAAAGAA    B   10
AAAAAAGGTATGGTTC    TCACTCAAAGAA    C   1

Question: Pretty much, I would be glad to hear any ideas about problem or h5 conversion.

Thank you very much for your time,

Tunc.

LTLA commented 3 years ago

For barcode swapping: the swappedDrops just loads the data from the molinfo file and then calls removeSwappedDrops. The latter function doesn't care where the data comes from, so you can just call it directly with your data. The same idea applies with chimericDrops, which just calls removeChimericDrops.