renderSMILES.CDKdepict: Render SMILES into 2D image for plotting via CDK Depict

Description Usage Arguments Value Author(s) See Also Examples

View source: R/StructurePlotting.R

Description

This function uses the URL built with buildCDKdepictURL to create an image for direct use in plotting, via a temporary svg file and given coordinates. Output requires that plot.new has been called.

Usage

1
renderSMILES.CDKdepict(depictURL,coords=c(0,0,100,100), filename="tmp.svg")

Arguments

depictURL

A URL created with buildCDKdepictURL

coords

This is used to control the size of the image within the plot. Values c(xmin,ymin,xmax,ymax).

filename

Name of the temporary svg file for saving the image. Can be used to save all image files if renamed for every instance.

Value

Returns an image for use during plotting

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

buildCDKdepictURL to create the URL, renderSMILES.rcdk for alternative plotting direct from SMILES.

Examples

1
2
3
4
5
6
plot.new()
plot.window(xlim=c(0,200), ylim=c(0,100))
test_url <- buildCDKdepictURL("OS(=O)(=O)c1ccc(cc1)C(CC(=O)O)CC(=O)O |Sg:n:15:m:ht,Sg:n:11:n:ht|",
style="cow",title="SPADCs, n+m=0-5", abbr="off",suppressh=TRUE,showtitle=TRUE,zoom=5,annotate="off",
smarts="C(=O)O")
renderSMILES.CDKdepict(test_url)

schymane/RChemMass documentation built on Jan. 25, 2021, 5:45 a.m.