Hi everyone,
I'm trying to export the featureCounts output results of Rsubread to a .xls format (excel), but I'm not having success. I have got the counts of the reads from my RNASeq experiment, but I can't export the result. I used the command below, but it did not work. It appears that warning message.
I know the reportReads argument saves my output, but the generated files are so big and I know that exists a different and simpler way to do that. So, really appreciate if someone could help me.
Used function
> featureCounts(file="T_reesei_F24-2_GTGGCC_L008_R1_001.cleanreads.fastq.gz_tophat2/F24h-2_accepted_hits.bam",
annot.ext = "TrireRUTC30_1_GeneCatalog_genes_20110526.fix2.gtf",
isGTFAnnotationFile = TRUE,
GTF.featureType = "CDS",
GTF.attrType = "transcript_id")
Output results
1664 +;+;+ 3186
1665 +;+ 234
1666 + 1362
[ reached getOption("max.print") -- omitted 8186 rows ]
$targets
[1] "T_reesei_F24.2_GTGGCC_L008_R1_001.cleanreads.fastq.gz_tophat2.F24h.2_accepted_hits.bam"
$stat
Status
1 Assigned
2 Unassigned_Ambiguity
3 Unassigned_MultiMapping
4 Unassigned_NoFeatures
5 Unassigned_Unmapped
6 Unassigned_MappingQuality
7 Unassigned_FragementLength
8 Unassigned_Chimera
T_reesei_F24.2_GTGGCC_L008_R1_001.cleanreads.fastq.gz_tophat2.F24h.2_accepted_hits.bam
1 34914980
2 8021
3 88386
4 11354142
5 0
6 0
7 0
8 0
Used command to export
> res <- write.table(res$table, file = "F24.xls")
Warning message
Error in res$counts : object of type 'closure' is not subsettable
Thanks
Gustavo Borin
thanks, Wei Shi! your option worked for me