buildMemberLabels: Build Labels for Members of a Homologue Series

Description Usage Arguments Value Author(s) See Also Examples

View source: R/BuildStructandSeries.R

Description

This function generates labels for members of a homologue series generated with the buildSmiles function (or also in general).

Usage

1
buildMemberLabels(SeriesName, n_start, n_total, smiles_list=NULL, addFormula=FALSE)

Arguments

SeriesName

A general name for the series, preferably short (abbreviation).

n_start

The starting number for the members in the series.

smiles_list

(optional) If present, used to calculate formulas for addFormula=TRUE.

nR1toN

The total number of members that need names.

RDB_R1toN

(optional) If TRUE, adds molecular formula to the labels.

Value

Returns a label that can be used to annotate individual structures in CDK Depict

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

buildSmiles, buildSeriesLabel.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
genSmiles <- "OS(=O)(=O)c1ccc(cc1)C([R1])[R2]"
nR1toN_in <- splitRrange(genSmiles,"{9-13}")
LAS_smiles <- buildSmiles(genSmiles,"{C,C}",nR1toN_in)
LAS_smiles_trim <- trimBuiltSmiles(LAS_smiles)

# now create labels
buildMemberLabels("LAS",9,5)
LAS_trim_labels <- buildMemberLabels("LAS",9,5, LAS_smiles_trim, addFormula = TRUE)
# to write a file that can be copied directly to CDK depict:
# write.table(cbind(LAS_smiles_trim, LAS_trim_labels),"LAS_trim_smiles_labels.smi",
# quote=F, row.names=F, col.names=F)

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