featureCounts for aligned reads
1
0
Entering edit mode
5.8 years ago
rsafavi ▴ 60

Hi everyone,

I have paired-end RNAseq data, and I used STAR aligner to do alignment, so basically for each paired-end fastq files I ended-up creating one alignment file (bam). Now I would like to create a count matrix to do DE analysis. I would like to use featureCounts tool. I was wondering what are the optimal flags to use? I am not sure if I have to use -p flag, since my reads are already aligned to the reference.

Thanks!

featurecounts RNAseq differential expression DE • 4.5k views
ADD COMMENT
2
Entering edit mode
5.8 years ago
GenoMax 141k

You should use -p flag so as to count fragments. Don't use -M flag since you don't want to count multi-mapped reads. Use -t to count at exon level but summarize the counts per gene identifier using -g. If your library was stranded you will want to use appropriate -s option (most likely 2). Provide all BAM files (in the order that you want the columns to be in) in a single command to get read matrix. Your BAM files can be sorted or unsorted. If they are unsorted then featureCounts will sort them on the fly.

Here is a summary of possible command lines.

In future, you could use STAR itself to generate the counts.

ADD COMMENT
0
Entering edit mode

Works perfectly thank you very much!

ADD REPLY
0
Entering edit mode

One more question, is having this warning normal? I get it with -p option

WARNING: reads from the same pair were found not adjacent to each || || other in the input (due to read sorting by location or || || reporting of multi-mapping read pairs).

ADD REPLY
0
Entering edit mode

Were your BAM files sorted? featureCounts should sort the files as needed. You could always pre-sort them with samtools.

ADD REPLY
0
Entering edit mode

should allowMultiOverlap be used or not?

ADD REPLY

Login before adding your answer.

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