stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
326 stars 88 forks source link

PBMC Tutorial/vignette... features and samples output don't match #293

Closed Garrobocel closed 3 years ago

Garrobocel commented 3 years ago

Hi, I got a different number of features and samples when working with the vignette's data.

pbmc An object of class Seurat 78612 features across 9276 samples within 1 assay Active assay: ### peaks (78612 features, 0 variable features)

Based on the tutorial I should have the next info:

pbmc

An object of class Seurat

87405 features across 8728 samples within 1 assay

Active assay: peaks (87405 features, 0 variable features)

P.S.: I am working with data provided on the website.

timoast commented 3 years ago

Are you sure you're using the same dataset as used in the PBMC vignette? Can you provide a reproducible example?

Garrobocel commented 3 years ago

Yes, I am using all datasets from the PMBC vignette. In the chrom_assay appears S4 [78612 X 9276] (Signac::ChromatinAssay).

If I continue with the tutorial I can visualize TSSPlot, FragmentHistogram, etc. But they are a little different, likely due to "features and samples" don't match with the vignette.

What do you mean by a reproducible example?

timoast commented 3 years ago

When I run the code in the vignette I get the results shown on the website, so I'd like to see the exact code you're running and a link to the dataset you're using.

Garrobocel commented 3 years ago

setwd("C:/Users/.../scATAC-seq tutorial/SIGNAC") library(Seurat) library(Signac) library(GenomeInfoDb) library(EnsDb.Hsapiens.v75)

library(EnsDb.Mmusculus.v79)

library(ggplot2) library(patchwork) set.seed(1234)

Open 10x file peak/cell matrix

counts <- Read10X_h5(filename = "atac_v1_pbmc_10k_filtered_peak_bc_matrix.h5")

read metadata file

metadata <- read.csv(file = "atac_v1_pbmc_10k_singlecell.csv", header = T, row.names = 1)

Chromatin assay

chrom_assay <- CreateChromatinAssay (counts = counts, sep = c(":", "-"), genome = 'hg19', fragments = 'atac_v1_pbmc_10k_fragments.tsv.gz', min.cells = 10, min.features = 200)

timoast commented 3 years ago

I think the wrong link was given in the vignette, the correct dataset is this one: https://support.10xgenomics.com/single-cell-atac/datasets/1.0.1/atac_v1_pbmc_10k

I'll update the links at the next release

Garrobocel commented 3 years ago

You are right, that was the issue.

Thank you so much.