sc-RNA matrix appears to be empty
1
0
Entering edit mode
2.6 years ago
rtrujillo123 ▴ 10

I'm trying to load the gene count sparse matrix from this source in R:

https://oncoscape.v3.sttrcancer.org/atlas.gs.washington.edu.mouse.rna/downloads

However the matrix's contents appear to be empty. To download I used wget on the command line:

wget -O - https://shendure-web.gs.washington.edu/content/members/cao1025/public/mouse_embryo_atlas/gene_count.txt | head > data.txt

And then load matrix like so:

matrix <- Matrix::readMM(file="~/scratch/rtrujillo/RNA-seq/sci-seq/data.txt")

To ensure these two steps are successful I attempted to graph the counts per cell:

counts_per_cell <- Matrix::colSums(matrix)

plot <- ggplot() + aes(counts_per_cell)+ geom_histogram(binwidth=0.5, colour="black", fill="white") ggsave(plot,file="counts_per_cell.png")

Which returns this plot.enter image description here

My interpretation is that there are zero counts for all 2 millions of the cells. Am I performing any of these steps incorrectly or is the matrix really completely empty?

MatrixMarket sc-RNA-seq gene matrix RNA-seq • 863 views
ADD COMMENT
1
Entering edit mode

Why are you piping your wget command? Save the file locally and then perform additional operations on it once you have a stable local copy. More importantly, you have head in that pipe, so you are not keeping most of the rows.

ADD REPLY
1
Entering edit mode
2.5 years ago
ATpoint 82k

Hey look, you should try to understand code users provided. I used head here converting a sc-RNA matrix from .txt to MatrixMarket .mtx file. simply because I did not want to download gigabytes of data for this example post to demonstrate that the format is correct. You of course have to remove that to download the entire dataset rather than the first 10 lines. Just download the entire file with wget and load the output, without any manipulation.

ADD COMMENT

Login before adding your answer.

Traffic: 2517 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6