using featureCounts to have raw counts of the reads
2
0
Entering edit mode
8.6 years ago
zizigolu ★ 4.3k

sorry friends,

using

[izadi@lbox161 bin]$ featureCounts -t exon -g gene_id -a genes.gtf -o counts.txt accepted_hits.bam

command, I have a counts.txt.summary in the first row I see like this

#Program:featureCounts v1.4.6-p5; Command:"featureCounts" "-t" "exon" "-g" "gene_id" "-a" "genes.gtf" "-o" "counts.txt" "accepted_hits.bam" 
Geneid    Chr    Start    End    Strand    Length    accepted_hits.bam
AT1G01010    1;1;1;1;1;1    3631;3996;4486;4706;5174;5439    3913;4276;4605;5095;5326;5899    +;+;+;+;+;+    1688    31

I need the raw counts, RPKM and VST files...then how i extract the raw counts file as an input for DEseq package to get RPKM and VST files??

thank you

featurecounts RNA-Seq • 5.5k views
ADD COMMENT
2
Entering edit mode
8.6 years ago

You need to run featureCounts on all your libraries. Then you extract and merge the first and last columns of your counts.txt.summary files. It shoud looks like this:

GeID          library_1     library_2     library_3    library_4
AT1G01010     31             50           24            21
ADD COMMENT
0
Entering edit mode

sorry, with the below command I extracted the column one and the last column this is like below, do you think I should separate the columns because they are too close to each other

cat counts.txt | awk '{ print $1 $7 }' > file.txt2
#"-g"
Geneid accepted_hits.bam
AT1G01010 31
AT1G01020 153
AT1G01030 10
AT1G01040 88
AT1G0104 60
AT1G01050228
ADD REPLY
1
Entering edit mode

try to add tabulations:

cat counts.txt | awk '{ print $1 "\t" $7 }' > file.txt2

But it might be easier to do this with R if you are familiar with it :)

ADD REPLY
0
Entering edit mode

unfortunately I am not familiar with R,

I used this command

paste file1 file2 | awk '{print $1,$2,$3,$5}'

for merging the file, for example the column one and two from file1 and column 2 from file2 in the same file name file3

am I right?

ADD REPLY
0
Entering edit mode

yesssssssssssss the column were separated thank uuuuuuuuuuuuuuuu

ADD REPLY
1
Entering edit mode

Hi, sorry for the late answer. If your command works, then its right ! But it is probably not the most efficient solution : You first paste all your columns then extract the columns you need. It would be more efficient to do something like this:

paste <(cut -f1,7 file1) <(cut -f7 file2) <(cut -f7 file3) <(cut -f7 file4) > summary.txt

That way you first extract the columns you need, then merge them into one file.

ADD REPLY
0
Entering edit mode

thank uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu extend to the world, because I have many difficulties in each step but at least in providing the count files you solved my problem kindly.

ADD REPLY
2
Entering edit mode
8.6 years ago
zizigolu ★ 4.3k

this is another way

cut -f1,7 counts018347.txt > tmp1
cut -f7 counts019035.txt > tmp2
cut -f7 SRR074122.txt > tmp3
cut ...
paste tmp1 tmp2 tmp3 tmp... > summary.txt
ADD COMMENT

Login before adding your answer.

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