How can I create a count matrix?
1
0
Entering edit mode
6 months ago
pavelasquezv ▴ 20

Hi, I hope you are well

Please, I need to create a count matrix for RNAseq analyses. My input is in .bam format. Do you have any suggestions to do it in R or Linux?

This is the example:

gene_id, sample1, sample2, sample3
gene1, 203, 204, 304
gene2, 12, 324, 434

Many thanks,

All the best Alex

dna workflow genome database gene • 695 views
ADD COMMENT
1
Entering edit mode

You can also use salmon in alignment-based mode (LINK). Only requirement is that you have a transcriptome file available that you want to quantify against. You will need to create the said matrix by using tximport (LINK).

ADD REPLY
1
Entering edit mode

Hi!

You can use some R packages such as Tximport or Tximeta. The last allows you to store metadata related to the reference transcriptome (in case you align with Salmon) employed for alignment. After importing the counts, Tximeta creates a SummarizedExperiment object in which you are able to summarize your counts at transcript or gene level, store your metadata and have information related to the transcript/gene coordinates.

Hope it works!

ADD REPLY
0
Entering edit mode

Tximport will handle getting the counts from separate files into a single object in R, but it won't generate the count files.

ADD REPLY
0
Entering edit mode

Many thanks, my friend!

I will see those packages

Kind regards, Alex

ADD REPLY
3
Entering edit mode
6 months ago

featureCounts or htseq-count should do the trick. You need a genome annotation in gff/gtf format too. Rsubread can count directly in R.

ADD COMMENT

Login before adding your answer.

Traffic: 987 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