SAF format error

361 views
Skip to first unread message

Ina Hoeschele

unread,
Jun 10, 2020, 5:59:26 PM6/10/20
to Subread
Hi,
I created a SAF file a few months ago without any issues but now I cannot get it to work ... I get this error message:
Error: Line 1 contains a format error. The expected annotation format is SAF.
Error in featureCounts(files = mapped.flist, annot.ext = "/home/inah/RefGTF_38_96/ExonPlus.SAF",  :
  No counts were generated.
Execution halted

I am creating a SAF file because my features are individual bases in specific exons. Below is the code for creating a SAF file:

Start <- seq(from=47395490, to=47395608)
End <- Start
GeneID <- paste("exon1_", Start, sep="")
Chr <- rep("11",length(Start))
Strand <- rep("+",length(Start))
ExonPlus <- data.frame(GeneID=GeneID,Chr=Chr,Start=Start,End=End,Strand=Strand)
write.table(ExonPlus,row.names=FALSE,sep="\t",file="/home/inah/RefGTF_38_96/ExonPlus.SAF")

What is wrong with the format?

Here is how the SAF file looks like:
"GeneID"        "Chr"   "Start" "End"   "Strand"
"exon1_47395490"        "11"    47395490        47395490        "+"
"exon1_47395491"        "11"    47395491        47395491        "+"
"exon1_47395492"        "11"    47395492        47395492        "+"
...

Thanks, Ina

Yang LIAO

unread,
Jun 10, 2020, 6:39:17 PM6/10/20
to Subread
You should remove the quotation marks in the SAF file -- the columns are delimited by TAB characters hence quotation marks are unnecessary and disallowed in the SAF file.

Also please make sure that the delimiter is TAB, but not SPACE.
Reply all
Reply to author
Forward
0 new messages