Error in export.gff from rtracklayer
0
0
Entering edit mode
Jon Bråte ▴ 260
@jon-brate-6263
Last seen 6 months ago
Norway

Hi,

I imported a gtf-file using makeTxDbFromGFF() and made a GRangesList of introns by:

introns = intronsByTranscript(object, use.names=TRUE)

But I get an error trying to export the introns as gff/gtf file:

export.gff(introns, "introns.gff", format="gff")

Error in .local(x, ...) :
  Elements in a group must be on same sequence and strand

If I for instance extract genes the export works fine. How can the introns be on different strands/sequences when the genes are not? Btw, all the features in my imported gtf-file are on the same strand.

Thanks, Jon

 

Edit: I converted the introns object to a GRanges object and it seems to work...

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] C

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BiocInstaller_1.18.4   rtracklayer_1.28.10    seqinr_3.1-3           ade4_1.7-2             Biostrings_2.36.4     
 [6] XVector_0.8.0          GenomicFeatures_1.20.5 AnnotationDbi_1.30.1   Biobase_2.28.0         GenomicRanges_1.20.8  
[11] GenomeInfoDb_1.4.3     IRanges_2.2.7          S4Vectors_0.6.6        BiocGenerics_0.14.0   

loaded via a namespace (and not attached):
 [1] zlibbioc_1.14.0         GenomicAlignments_1.4.1 BiocParallel_1.2.21     tools_3.2.1            
 [5] DBI_0.3.1               lambda.r_1.1.7          futile.logger_1.4.1     futile.options_1.0.0   
 [9] bitops_1.0-6            RCurl_1.95-4.7          biomaRt_2.24.1          RSQLite_1.0.0          
[13] Rsamtools_1.20.4        XML_3.98-1.3 
rtracklayer gff • 1.5k views
ADD COMMENT
0
Entering edit mode

Would help to get a hold of your actual data for reproducing this. But I will say that you probably want to output to "gff3" rather than "gff", which implies gff2. Note that exporting a GRangesList of introns that way will represent them as exons in the GFF3, which will be a bit strange. This could be made more flexible, if needed.

ADD REPLY

Login before adding your answer.

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