Skip to content

Instantly share code, notes, and snippets.

@grmwld
Created March 16, 2011 11:54
Show Gist options
  • Select an option

  • Save grmwld/872368 to your computer and use it in GitHub Desktop.

Select an option

Save grmwld/872368 to your computer and use it in GitHub Desktop.
track = myGlyph.AnnotationLine(glyph='xyplot', subtype='density', height=60, min_score=0, shadow=True, foreground='crimson', label='PET coverage')
items = [(p['head']['fref'], p['head']['fstart'], p['tail']['fend'], p['tail']['fend'] - p['head']['fstart'], 'PET') for p in pets.pets]
for i in items:
track.add(i)
svg = myGlyph.mySVGRenderer(annotation_lines=[track],
documentWidth=800,
documentHeight=300,
genomic_span=30000,
fref='scaffold_1',
genome_offset=pets.pets[0]['head']['fstart']-2000,
legend=True)
svg.render()
with open(name+'.svg', 'w') as off:
print >>off, svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment