writeConFile {cosmo} | R Documentation

## Converts an object of class 'constraintSet' into a text file

### Description

This function converts an object of class `constraintSet` or a list of such objects into a text file.

### Usage

      writeConFile(constraints, stringOutput=TRUE, outputFile="constraints.txt")

### Arguments

`constraints` | object of class `constraintSet` or list of objects of class `constraintSet` which is to be converted in a text format
`stringOutput` | logical, whether the constraint should be written as a string. If FALSE, the constraint is written as a text file
`outputFile` | path and name of the constraint text file to be created

### Details

Both the string and the text file can be used to submit constraints directly to the COSMO web application, which is an alternative to the GUI application. The text file has the advantage of being more easy to read and to load for future use.

### Value

NULL A single text file is created, by default in the working directory.

### Author(s)

Fabian Gallusser, fgallusser@berkeley.edu

### See Also

`constraintSet`, `readConFile`

### Examples

    set <- makeConSet(4,c("B","P","V","B"),c(4,50,NA,4))
    con1 <- makeBoundCon(1,2)
    con2 <- makePalCon(1,4,0.5)
    con3 <- makeSubMotifCon("TATA",0.6)
    con4 <- makePosFreqCon("2","A",0.5)
    con5 <- makePosFreqCon("All","G",0.4)
    conSet <- addCon(set,list(con1,con2,con3,con4,con5),c(2,NA,NA,1,3))
    conString <- writeConFile(conSet)

[Package cosmo version 1.6.0 Index]