Comments (7)
From the output, it looks like the cell barcodes from the Sierra workflow don't match the cell barcodes in the Seurat object. This is probably due to a discrepancy in the sample labels appended to the cell barcode - e.g. CCAAAGAC-1 from one pipeline and CCAAAGAC-conditionA from another. If you've aggregated multiple experiments together just check that the exp.labels variable in AggregatePeakCounts matches what is in the Seurat object.
I've added an extra check to print a more meaningful error message in this situation.
from sierra.
That fixed it! Congrats on a very cool piece of work.
Just a warning other users, the change was the addition of a "-1" at the end of the cellname/barcode so "[barcode]-1". And it was on the Sierra processing side. So I just added the same "-1" to the end of the barcodes on the Seurat side.
from sierra.
Hi JBreunig
Did you have an aggregate seurat object? Can you kindly share the script you used to correct the "-1" addition. thank you
from sierra.
Hi @nbahlis,
I might be able to make a change to the code if this is an ongoing issue. Would you be able to provide some more detail on your data and problem? Are you comparing runs merged with the CellRanger aggr program to the Sierra AggregatePeakCounts function?
from sierra.
No, it wasn't an aggregate object. The Seurat object didn't have the "-1" but I added it to match the Sierra elements
This was all I did:
genes.seuratJB_data <- Read10X(data.dir = "/[my local dir]/neuron_9k_filtered_gene_bc_matrices/filtered_gene_bc_matrices/mm10")
genes.seuratJB_data #to check input
colnames(genes.seuratJB_data) #to check column names
colnames(genes.seuratJB_data) <- paste0(colnames(genes.seuratJB_data),"-1") #add "-1" to match
genes.seuratJB <- CreateSeuratObject(counts = genes.seuratJB_data)
.
from sierra.
thank you for the quick reply. I merged 2 cellranger objects with Seurat after importing their h5 matrices as such and created a Seurat object as such:
h5.matrices <- sapply(input.h5, Read10X_h5)
seurat.matrices <- sapply(h5.matrices, CreateSeuratObject, min.cells = 3, min.features = 200)
for(i in 1:length(seurat.matrices)){ seurat.matrices[[i]]@meta.data$orig.ident <- sample.names[[i]]}
MM.merge <- merge(seurat.matrices[[1]], seurat.matrices[2:length(seurat.matrices)])
followed the seurat pipeline and filtered unwanted cells (different lineage, contaminants), after SCTransform saved object as rds.
In SIERRA, I corrected the "-1" issue in the barcodes and the barcodes now match.
I do import my seurat object to sierra as readRDS:
P1675_P1608_seurat <- readRDS('/MM.merge.rds')
followed by
peaks.seurat <- PeakSeuratFromTransfer(peak.data = peak.counts,
genes.seurat = P1675_P1608_seurat,
annot.info = peak.annotations,
min.cells = 0, min.peaks = 0)
In my peaks.seurat object I do not see any on the metadata and id I had in my seurat object are imported into the peaks.seurat object. Only the UMAP dims are imported. Is there a way to keep or import all the metadata I had stored in my seurat rds object?
For example my peaks,seurat @metadata looks like this:
[email protected]
orig.ident nCount_RNA nFeature_RNA geneLvlID
AAACCCAGTGGCTTGC-1_2 PolyA 24666 5348 2
AAACGAAGTGGCGTAA-1_2 PolyA 41474 8216 0
Note that the orig.ident is also changed from my seurat object.
from sierra.
Hi @nbahlis,
Ah okay, we have been following the CellRanger aggr format for adding experiment identifiers to the barcodes, I believe the Seurat merge function is a little different.
Regarding the meta data, you can add additional info to the peaks object using the Seurat AddMetaData function. The following commands will add all meta data from your original Seurat object.
md <- [email protected][colnames(peaks.seurat), ]
peaks.seurat <- AddMetaData(peaks.seurat, md)
Thanks for the feedback, I will make some adjustments to increase flexibility around the barcode identifiers and including additional data from the original Seurat object.
Cheers,
Ralph
from sierra.
Related Issues (20)
- 3'end database HOT 2
- Using data with batch effects in Sierra HOT 2
- Error in peak calling HOT 2
- peak discrepancy HOT 1
- Error when running CountPeaks HOT 8
- CoveragePlot error with 'zoom_3UTR=TRUE ' HOT 1
- Which alignment method and indexing options are suitable to use with Sierra? HOT 3
- Does the Sierra package have a detailed protocol, I would like to find. HOT 1
- Chromosome name in FindPeaks // Help with Output HOT 3
- Generate GitHub Releases HOT 2
- Cellranger mkref function parameters for Sierra HOT 1
- FindPeaks Error--'x' values larger than vector length 'sum(width)' HOT 2
- DUTest function Error HOT 1
- Sierra dataframe has 0 length HOT 1
- [E::hts_open_format] Failed to open file HOT 1
- is it possible to generate a plot that shows global 3'UTR length change?
- issues with generating splice junction file HOT 7
- MergePeakCoordinates takes long time๏ผ HOT 9
- Paired-end & PlotRelativeExpression functions. HOT 1
- Getting "Error in (function (x) : attempt to apply non-function" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sierra.