Skip to content

Instantly share code, notes, and snippets.

@ConradStack
Last active July 12, 2016 20:45
Show Gist options
  • Save ConradStack/aee89e7b46f9441a3fe41bd7a88180ae to your computer and use it in GitHub Desktop.
Save ConradStack/aee89e7b46f9441a3fe41bd7a88180ae to your computer and use it in GitHub Desktop.
Export Granges(List) to gff3 with rtracklayer
import(rtracklayer)
# Where syn is a list of GRanges objects:
test = GenomicRangesList(syn)
export.gff(test,"~/tmp/tmp.gff3", version="3")
# ... or a single GRanges element:
export.gff(syn[[1]],"~/tmp/tmp.gff3", version="3")
# For more information on gff3, see:
# https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment