You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am using Cellranger output to create the SummarizedExperiment object for chromvar. Instead of using the bam/bed file (as it was not working), I used the count and peakranges from a chromatin assay from seurat to create the object and it seems to work. However, when I try filtering the low reads from the sample I get the following error:
Error in filterSamples(fragment_counts) : colData for object must have column named depth with total reads per sample
Is there a function to add depth to the object@coldata?
This is my code:
#create a chromatin assay for these specific peaks
granges_pax5_pos_peaks <- StringToGRanges(PAX5_positive_peaks)
##create new count matrix based on the peaks above
macs2_counts_peaks <- FeatureMatrix(
fragments = Fragments(bm_1121_int),
features = granges_pax5_pos_peaks,
cells = colnames(bm_1121_int)
)
##subset the atac assay to only include the above peaks
peak_counts <- CreateChromatinAssay(
counts = macs2_counts_peaks,
fragments = "atac_fragments.tsv.gz",
annotation = annotation
)
Hi, I am using Cellranger output to create the SummarizedExperiment object for chromvar. Instead of using the bam/bed file (as it was not working), I used the count and peakranges from a chromatin assay from seurat to create the object and it seems to work. However, when I try filtering the low reads from the sample I get the following error:
Error in filterSamples(fragment_counts) : colData for object must have column named depth with total reads per sample
Is there a function to add depth to the object@coldata?
This is my code:
#create a chromatin assay for these specific peaks
granges_pax5_pos_peaks <- StringToGRanges(PAX5_positive_peaks)
##create new count matrix based on the peaks above
macs2_counts_peaks <- FeatureMatrix(
fragments = Fragments(bm_1121_int),
features = granges_pax5_pos_peaks,
cells = colnames(bm_1121_int)
)
##subset the atac assay to only include the above peaks
peak_counts <- CreateChromatinAssay(
counts = macs2_counts_peaks,
fragments = "atac_fragments.tsv.gz",
annotation = annotation
)
create summarized experiment
fragment_counts <- SummarizedExperiment(assays = list(counts = peak_counts@counts),
rowRanges = peak_counts@ranges)
#Computes GC content for peaks
fragment_counts <- addGCBias(fragment_counts, genome = BSgenome.Hsapiens.UCSC.hg38)
counts_filtered <- filterSamples(fragment_counts)
-----error------
Error in filterSamples(fragment_counts) :
colData for object must have column named depth with total reads per sample
The text was updated successfully, but these errors were encountered: