import pyRserve
conn = pyRserve.connect()
conn.r("library(httpgd)")
r_code = '''
library(maftools)
laml.maf = system.file('extdata', 'tcga_laml.maf.gz', package = 'maftools')
laml.clin = system.file('extdata', 'tcga_laml_annot.tsv', package = 'maftools')
laml = read.maf(maf = laml.maf, clinicalData = laml.clin)
s <- hgd_inline({
plot.new()
oncoplot(maf = laml)
})
'''
res = conn.r(r_code)
print(res)