Description Usage Arguments Details Author(s) References See Also Examples
Splits SD Files into any number of smaller SD Files
1 | write.SDFsplit(x, filetag, nmol)
|
x |
object of class |
filetag |
string to prepend to file names |
nmol |
integer specifying number of molecules in split SD files |
To split an SD File into smaller ones, one can read the source file into R with read.SDFstr
and write out smaller ones with write.SDFsplit
. Note: when importing big SD Files, read.SDFstr
will be much faster than read.SDFset
, and there is no need to go through an SDFset object instance
in this case.
Thomas Girke
SDF format definition: http://www.symyx.com/downloads/public/ctfile/ctfile.jsp
Import/export functions: read.SDFset
, read.SDFstr
, read.SDFstr
, read.SDFset
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Load sample data
library(ChemmineR)
data(sdfsample)
## Not run: ## Create sample SD File with 100 molecules
write.SDF(sdfsample, "test.sdf")
## Read in sample SD File
sdfstr <- read.SDFstr("test.sdf")
## Run export on SDFstr object
write.SDFsplit(x=sdfstr, filetag="myfile", nmol=10)
## Run export on SDFset object
write.SDFsplit(x=sdfsample, filetag="myfile", nmol=10)
## End(Not run)
|
from to filename
1 1 10 myfile001_010.sdf
2 11 20 myfile011_020.sdf
3 21 30 myfile021_030.sdf
4 31 40 myfile031_040.sdf
5 41 50 myfile041_050.sdf
6 51 60 myfile051_060.sdf
7 61 70 myfile061_070.sdf
8 71 80 myfile071_080.sdf
9 81 90 myfile081_090.sdf
10 91 100 myfile091_100.sdf
from to filename
1 1 10 myfile001_010.sdf
2 11 20 myfile011_020.sdf
3 21 30 myfile021_030.sdf
4 31 40 myfile031_040.sdf
5 41 50 myfile041_050.sdf
6 51 60 myfile051_060.sdf
7 61 70 myfile061_070.sdf
8 71 80 myfile071_080.sdf
9 81 90 myfile081_090.sdf
10 91 100 myfile091_100.sdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.