splitPFAS: Split Chemical (as SMILES) into Perfluorinated Part and...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SplitPFAS.R

Description

A small wrapper function to run the SplitPFAS Jar to split perfluorinated compounds (PFAS) into PFAS chain and functional group, by given SMARTS group(s). NOTE this is under development: Please contact the authors for more information. The jar is available from https://msbi.ipb-halle.de/~cruttkie/metfrag/MetFrag2.4.5-Tools.jar

Usage

1
2
splitPFAS(smiles, splitPFAStools_name, incl_image=FALSE, smarts_file="", 
splitPFAStools_dir="")

Arguments

smiles

The SMILES code of the PFAS to split. Preferably an "MS-ready" form (no salts etc)

splitPFAStools_name

The name of the SplitPFAS Jar file (e.g. "MetFrag2.4.5-Tools.jar").

incl_image

If TRUE, a PNG image showing the bond broken is saved in a subdirectory "SplitPFAS_PNGs" in the current directory. The jar creates a file in the temp directory which is copied over and deleted from the temp dir. Default FALSE switches off image creation.

smarts_file

If empty, PFAS are split at the end of the perfluorinated chain. If a path is given, the SMILES is split according to the matching SMARTS in the file, where order of the SMARTS in the file indicates priority matching order (first match is processed)

splitPFAStools_dir

The directory containing the jar file; if empty assumes the currect directory.

Value

Returns a list containing the processed SMILES (SMILES_in), the (non-PFAS) functional group (Func_Group), the PFAS Group(s) split off (PFAS_Groups), both of which are pipe-separated ("|") if different groups are present; the number of PFAS groups split off (n_PFAS_Groups), the SMARTS string used to do the splitting SplitSMARTS, the PNG location (PNG_location), which is empty if PNG creation is off and finally Error_msg, which contains an error message if issues were encountered.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu> in partnership with Christoph Ruttkies (MetFragTools) and Zhanyun Wang (ETHZ, PFAS examples).

See Also

splitPFAS.help

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
splitPFAStools_name <- "MetFrag2.4.5-Tools.jar"
smarts_file <- system.file("extdata","SplitPFAS_smarts.txt",package="RChemMass")
pfas_smiles <- "CN(CCOC(=O)C(C)=C)S(=O)(=O)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F"
pfas_smiles <- "FC(F)(F)C(F)(F)C(F)(F)C(F)(F)S(=O)(=O)CS(=O)(=O)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F"
pfas_smiles <- "FC(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)CCOP(O)(OCCC(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F)OCCC(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)C(F)(F)F"
pfas_smiles <- "FCC(F)(F)C(F)C(F)(F)F"
pfas_smiles <- "CCC(CN)C(F)(F)C(F)(F)C(F)(F)F"

splitPFAS(pfas_smiles,splitPFAStools_name)
splitPFAS(pfas_smiles,splitPFAStools_name,smarts_file = smarts_file)
splitPFAS(pfas_smiles,splitPFAStools_name,smarts_file = smarts_file,incl_image = TRUE)

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