This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Work story Object Save

Hello all, I've done features count with Rsubread package and got counts objects in my work story, Now I want to save each object as a txt files for another steps

Any help will be good to me.

Best regard

r rsubread

Type in R:

?write.table

Hello, I done this :

> seq_M2<-featureCounts("M2.bam",
                      annot.inbuilt="hg38",
                      annot.ext="Homo_sapiens.GRCh38.95.gtf",
                      isGTFAnnotationFile=TRUE,
                      GTF.featureType="exon",
                      GTF.attrType="gene_id",
                      chrAliases=NULL)

For feature counts, it works goodly, and to export results I done :

>write.table(seq_M2=data.frame(seq_M2$annotation[,c("GeneID","Length")],seq_M2$counts,stringsAsFactors=FALSE),file="c_M2.txt",quote=FALSE,sep="\t",row.names=FALSE)

And I got this message :

Error in write.table(seq_M2 = data.frame(seq_M2$annotation[, c("GeneID",  : 
  unused argument (seq_M2 = data.frame(seq_M2$annotation[, c("GeneID", "Length")], seq_M2$counts, stringsAsFactors = FALSE))

I don't know why

Help please. Thinks

Just remove the first seq_2M = Write.table does not have an argument of that name.

0 answers

No answers yet.

Log in to answer this question.