Entering edit mode
6.7 years ago
kamel
▴
70
Hi, I used featureocunts for quantization but its output is complicated. PLEASE I need to generate a count matrix with featurecounts
If you used featureCounts and got a complicated output, maybe it is already the count matrix? How did you run it? Whyyou think the output you got is not a counts matrix? Can you show a snippet of the output?
maybe I did not explain it well. I want to keep only the gene-id and the number of reads assigned
Here are the results I found:
The output of featureCounts is a tab-separated file, you can use
cut
to get the columns you want. By the way, you know if you input several bams to featureCounts, its output will include one column of counts for each input bam?I do not know how I can do cat in this situation. would it be possible to give me the command that I can use to have that number of reads of each gene-id.
I used two bam files and my results fit like this:
Numbers under the columns with
.library2/bam and ./library1/bam
should be the counts for genes in column 1. (How did you end up with strange sample file names like that?)here is the command I used: Program:featureCounts v1.6.1; Command: featureCounts" "-T" "12" "-s" "2" "-t" "exon" "-g" "gene_id" "-a" "/annotation.gtf" "-o" "counts.txt" "/library1.bam" "library2.bam"
enter code here
While slightly mangled by the quotes you included around each option the command looks ok. Like I said above last two columns in your file have the counts. You can read this matrix file into DESeq2 etc and manipulate it there (or use
cut -f1,7-8 your_file > new_file
to extract gene_ID and count columns in a new file).Thank you very much, you helped me. yes I will use DESeq2 so easily.
a quick question for multimapper reads, I had the idea that featureCounts does not count reads but I found that with the option "-M" it's what it allows to count all reads multimappers.
While that is correct you should not count multi-mapping alignments for RNAseq (featureCounts for paired bam files and dealing with multimapping reads? ).
Or if you want to count multi-mappers, do it with a program that distributes the counts properly, such as RSEM or Salmon - however, you need to map to the transcriptome, then.
I can not count the multimappers reads by a mapping on the genome?
Thank you for your reply genomax. I think I need to count multimapper reads because I'm working on a hexaploid genome
Those recommendations are for any genome in general.
cut
is notcat
.SorryI wanted to write cut. can you give me the command that I can use
cut -f
and the column numbers you want to select, separated by commas (,
).man cut
for details.Thank you very much.